Skip to content

Commit 9545beb

Browse files
committed
add functions for getting query string.
1 parent 0523b64 commit 9545beb

File tree

4 files changed

+46
-2
lines changed

4 files changed

+46
-2
lines changed

Doxyfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#---------------------------------------------------------------------------
66
DOXYFILE_ENCODING = UTF-8
77
PROJECT_NAME = TreeFrogFramework
8-
PROJECT_NUMBER = 1.18
8+
PROJECT_NUMBER = 1.20
99
PROJECT_BRIEF =
1010
PROJECT_LOGO =
1111
OUTPUT_DIRECTORY = doc
@@ -119,20 +119,24 @@ EXCLUDE = src/test \
119119
src/tsharedmemorylogstream.h \
120120
src/tsqldatabasepool.h \
121121
src/tsqldatabasepool2.h \
122+
src/tsqldatabase.h \
123+
src/tsqldriverextension.h \
124+
src/tsqldriverextensionfactory.h \
122125
src/turlroute.h \
123126
src/tbasiclogstream.h \
124127
src/tactionthread.h \
125128
src/thtmlparser.h \
126129
src/tfilelogger.h \
127130
src/tdirectview.h \
131+
src/tmailmessage.h \
128132
src/tsessionmanager.h \
129133
src/tsmtpmailer.h \
130134
src/tsessionobject.h \
131-
src/tmailmessage.h \
132135
src/thttpsocket.h \
133136
src/tsessioncookiestore.h \
134137
src/tsessionfilestore.h \
135138
src/tsessionsqlobjectstore.h \
139+
src/tsessionmongoobject.h \
136140
src/tlazyloader.h \
137141
src/tdispatcher.h \
138142
src/tactioncontext.h \
@@ -179,6 +183,7 @@ EXCLUDE = src/test \
179183
src/thazardptrmanager.h \
180184
src/tdatabasecontextmainthread.h \
181185
src/tdatabasecontextthread.h \
186+
src/tconcurrentmap.h \
182187
src/ttextview.h
183188
EXCLUDE_SYMLINKS = NO
184189
EXCLUDE_PATTERNS = src/moc_*.cpp

src/thttprequest.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,45 @@ QStringList THttpRequest::allItemValues(const QString &name, const QList<QPair<Q
278278
/*!
279279
Returns the list of query string values whose name is equal to \a name from
280280
the URL.
281+
\see QStringList queryItemList()
281282
*/
282283
QStringList THttpRequest::allQueryItemValues(const QString &name) const
283284
{
284285
return allItemValues(name, d->queryItems);
285286
}
286287

288+
/*!
289+
Returns the list of query string value whose key is equal to \a key, such as
290+
"foo[]", from the URL.
291+
\see QStringList THttpRequest::allQueryItemValues()
292+
*/
293+
QStringList THttpRequest::queryItemList(const QString &key) const
294+
{
295+
QString k = key;
296+
if (!k.endsWith("[]")) {
297+
k += QLatin1String("[]");
298+
}
299+
return allQueryItemValues(k);
300+
}
301+
302+
/*!
303+
Returns the list of query value whose key is equal to \a key, such as
304+
"foo[]", from the URL.
305+
*/
306+
QVariantList THttpRequest::queryItemVariantList(const QString &key) const
307+
{
308+
return itemVariantList(key, d->queryItems);
309+
}
310+
311+
/*!
312+
Returns the map of query value whose key is equal to \a key from
313+
the URL.
314+
*/
315+
QVariantMap THttpRequest::queryItems(const QString &key) const
316+
{
317+
return itemMap(key, d->queryItems);
318+
}
319+
287320

288321
QVariantMap THttpRequest::itemMap(const QList<QPair<QString, QString>> &items)
289322
{
@@ -341,6 +374,7 @@ QString THttpRequest::formItemValue(const QString &name, const QString &defaultV
341374
/*!
342375
Returns the list of string value whose name is equal to \a name from the
343376
form data.
377+
\see QStringList formItemList()
344378
*/
345379
QStringList THttpRequest::allFormItemValues(const QString &name) const
346380
{
@@ -350,6 +384,7 @@ QStringList THttpRequest::allFormItemValues(const QString &name) const
350384
/*!
351385
Returns the list of string value whose key is equal to \a key, such as
352386
"foo[]", from the form data.
387+
\see QStringList allFormItemValues()
353388
*/
354389
QStringList THttpRequest::formItemList(const QString &key) const
355390
{

src/thttprequest.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ class T_CORE_EXPORT THttpRequest
6161
QString queryItemValue(const QString &name) const;
6262
QString queryItemValue(const QString &name, const QString &defaultValue) const;
6363
QStringList allQueryItemValues(const QString &name) const;
64+
QStringList queryItemList(const QString &key) const;
65+
QVariantList queryItemVariantList(const QString &key) const;
66+
QVariantMap queryItems(const QString &key) const;
6467
QVariantMap queryItems() const;
6568
bool hasForm() const { return !d->formItems.isEmpty(); }
6669
bool hasFormItem(const QString &name) const;

src/tsqljoin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
\class TSqlJoin
99
\brief The TSqlJoin class represents JOIN clause for combination
1010
to a record of other table.
11+
\see void TSqlORMapper<T>::setJoin()
1112
*/
1213

1314

0 commit comments

Comments
 (0)