Skip to content
Snippets Groups Projects
Commit 4697a94a authored by Emmanuel Lepage Vallée's avatar Emmanuel Lepage Vallée Committed by Stepan Salenikovich
Browse files

uri: Allow to set the scheme later.


When the user enters a string, it isn't always yet known if it is a
search for registered name, a SIP URI or some local DNS names.

However at some point the choice can be noarrowed down. This is a good
time to set the scheme. This help later on top pick the right account
and hopefully resolve the RingId before placing the call.

Change-Id: Iad8283fc4c6ff2e4cfe189bf216f00720202ce92
Reviewed-by: default avatarStepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
parent fa00bd1d
Branches
No related tags found
No related merge requests found
......@@ -517,6 +517,15 @@ QString URI::userinfo() const
return d_ptr->m_Userinfo;
}
/**
* Sometime, some metadata can be used to deduce the scheme even if it wasn't
* originally known. This will improve the result of ::format.
*/
void URI::setSchemeType(SchemeType t)
{
d_ptr->m_HeaderType = t;
}
/**
* Generate a new URI formatted with the sections passed in `sections`
*
......
......@@ -178,6 +178,9 @@ public:
SchemeType schemeType () const;
ProtocolHint protocolHint() const;
//Setter
void setSchemeType(SchemeType t);
//Converter
QString format(FlagPack<URI::Section> sections) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment