mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
On contact website info, if the scheme has been defined then add the default scheme : https.
This commit is contained in:
parent
2839b39c9f
commit
8fdf862a27
2 changed files with 6 additions and 3 deletions
|
|
@ -460,9 +460,12 @@ QVariantList VcardModel::getUrls () const {
|
|||
return list;
|
||||
}
|
||||
|
||||
bool VcardModel::addUrl (const QString &url) {
|
||||
bool VcardModel::addUrl (QString url) {
|
||||
CHECK_VCARD_IS_WRITABLE(this);
|
||||
|
||||
QUrl urlParser(url);
|
||||
if( urlParser.scheme() == ""){
|
||||
url = "https://"+url;
|
||||
}
|
||||
shared_ptr<belcard::BelCard> belcard = mVcard->getVcard();
|
||||
if (findBelCardValue(belcard->getURLs(), url))
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public:
|
|||
Q_INVOKABLE void removeEmail (const QString &email);
|
||||
Q_INVOKABLE bool updateEmail (const QString &oldEmail, const QString &email);
|
||||
|
||||
Q_INVOKABLE bool addUrl (const QString &url);
|
||||
Q_INVOKABLE bool addUrl (QString url);
|
||||
Q_INVOKABLE void removeUrl (const QString &url);
|
||||
Q_INVOKABLE bool updateUrl (const QString &oldUrl, const QString &url);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue