LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
urloperator.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <QUrl>
12#include <QUrlQuery>
13#include "sllconfig.h"
14
15namespace LC
16{
17namespace Util
18{
45 {
46 QUrl& Url_;
47
48 QUrlQuery Query_;
49 public:
54 UrlOperator (QUrl& url);
55
62 ~UrlOperator ();
63
66 void Flush ();
67
82 UrlOperator& operator() (const QString& key, const QString& value);
83
95 UrlOperator& operator() (const QString& key, const QByteArray& value);
96
110 UrlOperator& operator() (const QString& key, const char *value);
111
123 UrlOperator& operator() (const QString& key, int value);
124
125 template<typename Key, typename Value>
126 UrlOperator& operator() (bool condition, Key&& key, Value&& value)
127 {
128 if (condition)
129 (*this) (std::forward<Key> (key), std::forward<Value> (value));
130
131 return *this;
132 }
133
141 UrlOperator& operator-= (const QString& key);
142
145 QUrl operator() ();
146 };
147}
148}
Manipulates query part of an QUrl object.
Definition urloperator.h:45
void Flush()
Flushes any pending changes to the QUrl query.
UrlOperator(QUrl &url)
Constructs the object modifying the query of url.
Definition constants.h:15
#define UTIL_SLL_API
Definition sllconfig.h:16