LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
urloperator.cpp
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#include "urloperator.h"
10
11namespace LC
12{
13namespace Util
14{
16 : Url_ (url)
17 , Query_ (url)
18 {
19 }
20
22 {
23 Flush ();
24 }
25
27 {
28 Url_.setQuery (Query_);
29 }
30
32 {
33 Query_.addQueryItem (key, value);
34 return *this;
35 }
36
38 {
39 return (*this) (key, QString::fromUtf8 (value));
40 }
41
43 {
44 return (*this) (key, QString::fromLatin1 (value));
45 }
46
48 {
49 return (*this) (key, QString::number (value));
50 }
51
53 {
54 Query_.removeQueryItem (key);
55 return *this;
56 }
57
59 {
60 Flush ();
61 return Url_;
62 }
63}
64}
Manipulates query part of an QUrl object.
Definition urloperator.h:49
void Flush()
Flushes any pending changes to the QUrl query.
UrlOperator & operator-=(const QString &key)
Returns the first query parameter under the key.
QUrl operator()()
Flushes any pending changes to the QUrl query.
UrlOperator(QUrl &url)
Constructs the object modifying the query of url.
~UrlOperator()
Flushes any pending changes to the QUrl query and destroys the UrlOperator.
Container< T > Filter(const Container< T > &c, F f)
Definition prelude.h:118
Definition constants.h:15