Ref T32, utility functions for URL/URL list

* keep error messages of failed URLs
* append query
This commit is contained in:
Klaus Basan
2017-04-21 03:11:00 +02:00
parent cbe3122c40
commit 88ef2ee019
4 changed files with 26 additions and 12 deletions

View File

@@ -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 ""; }