mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
refs #485 URL/URL list
* added constructor for CUrlList * added registration of metadata of fail over class * default port support for getPort
This commit is contained in:
committed by
Mathew Sutcliffe
parent
ce3edc37d0
commit
92a36890eb
@@ -56,6 +56,12 @@ namespace BlackMisc
|
||||
return m_path;
|
||||
}
|
||||
|
||||
int CUrl::getPort() const
|
||||
{
|
||||
if (m_port > 0) { return m_port; }
|
||||
return protocolToDefaultPort(this->getScheme());
|
||||
}
|
||||
|
||||
bool CUrl::hasPort() const
|
||||
{
|
||||
return m_port >= 0;
|
||||
@@ -128,6 +134,11 @@ namespace BlackMisc
|
||||
this->setQuery(url.query());
|
||||
}
|
||||
|
||||
QNetworkRequest CUrl::toNetworkRequest() const
|
||||
{
|
||||
return QNetworkRequest(this->toQUrl());
|
||||
}
|
||||
|
||||
CUrl CUrl::withAppendedPath(const QString &path) const
|
||||
{
|
||||
if (path.isEmpty()) { return *this; }
|
||||
|
||||
Reference in New Issue
Block a user