mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Ref T32, utility functions for URL/URL list
* keep error messages of failed URLs * append query
This commit is contained in:
@@ -96,17 +96,16 @@ namespace BlackMisc
|
||||
{
|
||||
const QString q(stripQueryString(queryToAppend));
|
||||
if (q.isEmpty()) { return m_query; }
|
||||
if (!hasQuery())
|
||||
{
|
||||
this->setQuery(q);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_query = m_query + "&" + q;
|
||||
}
|
||||
m_query += hasQuery() ? "&" + q : q;
|
||||
return m_query;
|
||||
}
|
||||
|
||||
QString CUrl::appendQuery(const QString &key, const QString &value)
|
||||
{
|
||||
if (key.isEmpty()) { return m_query; }
|
||||
return this->appendQuery(key + "=" + value);
|
||||
}
|
||||
|
||||
QString CUrl::getFullUrl(bool withQuery) const
|
||||
{
|
||||
if (m_host.isEmpty()) { return ""; }
|
||||
|
||||
Reference in New Issue
Block a user