mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-29 05:06:22 +00:00
- Fix contact display names with special characters
- Add vcard fields encoder/decoder - Fix Version file on Windows where identifier can be empty - Update SDK to master - Add artificats when failed (ci)
This commit is contained in:
parent
8ecd1bc32c
commit
721b191fc6
5 changed files with 28 additions and 4 deletions
|
|
@ -25,6 +25,7 @@
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build\OUTPUT
|
- build\OUTPUT
|
||||||
|
when: always
|
||||||
expire_in: 2 days
|
expire_in: 2 days
|
||||||
|
|
||||||
job-windows-vs2017:
|
job-windows-vs2017:
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "assets/icon.ico"
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
PRODUCTVERSION ${version_major},${version_minor},${version_patch},0
|
PRODUCTVERSION ${version_major},${version_minor},${version_patch},0
|
||||||
FILEVERSION ${version_major},${version_minor},${version_patch},${identifiers}
|
FILEVERSION ${version_major},${version_minor},${version_patch},0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS VS_FF_DEBUG
|
FILEFLAGS VS_FF_DEBUG
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ bool VcardModel::setAvatar (const QString &path) {
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
QString VcardModel::getUsername () const {
|
QString VcardModel::getUsername () const {
|
||||||
return Utils::coreStringToAppString(mVcard->getFullName());
|
return decode(QString::fromStdString(mVcard->getFullName()));// Is in UTF8
|
||||||
}
|
}
|
||||||
|
|
||||||
void VcardModel::setUsername (const QString &username) {
|
void VcardModel::setUsername (const QString &username) {
|
||||||
|
|
@ -196,7 +196,7 @@ void VcardModel::setUsername (const QString &username) {
|
||||||
if (username.length() == 0 || username == getUsername())
|
if (username.length() == 0 || username == getUsername())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mVcard->setFullName(Utils::appStringToCoreString(username));
|
mVcard->setFullName(encode(username).toStdString());
|
||||||
emit vcardUpdated();
|
emit vcardUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -505,3 +505,23 @@ bool VcardModel::updateUrl (const QString &oldUrl, const QString &url) {
|
||||||
removeUrl(oldUrl);
|
removeUrl(oldUrl);
|
||||||
return addUrl(url);
|
return addUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString VcardModel::encode(const QString& data)const{// Convert '\n', ',', '\' to "\n", "\,", "\\"
|
||||||
|
QString encoded;
|
||||||
|
for(int i = 0 ; i < data.length() ; ++i){
|
||||||
|
if(data[i] == ',')
|
||||||
|
encoded += "\\,";
|
||||||
|
else if(data[i] == '\\')
|
||||||
|
encoded += "\\\\";
|
||||||
|
else if(data[i] == '\n')
|
||||||
|
encoded += "\\n";
|
||||||
|
else
|
||||||
|
encoded += data[i];
|
||||||
|
}
|
||||||
|
return encoded;
|
||||||
|
}
|
||||||
|
QString VcardModel::decode(const QString& data)const{// Convert "\n", "\,", "\\" to '\n', ',', '\'
|
||||||
|
QString decoded = data;
|
||||||
|
decoded.replace("\\,", ",").replace("\\\\", "\\").replace("\\n", "\n");
|
||||||
|
return decoded;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,9 @@ public:
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
QString encode(const QString& data)const;// Convert '\n', ',', '\' to "\n", "\,", "\\"
|
||||||
|
QString decode(const QString& data)const;// Convert "\n", "\,", "\\" to '\n', ',', '\'
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void vcardUpdated ();
|
void vcardUpdated ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit ac52433b7d18d9e1f100da8d937d5d93091edf6d
|
Subproject commit b37ed8c48d2a8effa053b9679c47d50111aad50b
|
||||||
Loading…
Add table
Reference in a new issue