mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-30 10:29:24 +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:
|
||||
paths:
|
||||
- build\OUTPUT
|
||||
when: always
|
||||
expire_in: 2 days
|
||||
|
||||
job-windows-vs2017:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "assets/icon.ico"
|
|||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
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
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ bool VcardModel::setAvatar (const QString &path) {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
QString VcardModel::getUsername () const {
|
||||
return Utils::coreStringToAppString(mVcard->getFullName());
|
||||
return decode(QString::fromStdString(mVcard->getFullName()));// Is in UTF8
|
||||
}
|
||||
|
||||
void VcardModel::setUsername (const QString &username) {
|
||||
|
|
@ -196,7 +196,7 @@ void VcardModel::setUsername (const QString &username) {
|
|||
if (username.length() == 0 || username == getUsername())
|
||||
return;
|
||||
|
||||
mVcard->setFullName(Utils::appStringToCoreString(username));
|
||||
mVcard->setFullName(encode(username).toStdString());
|
||||
emit vcardUpdated();
|
||||
}
|
||||
|
||||
|
|
@ -505,3 +505,23 @@ bool VcardModel::updateUrl (const QString &oldUrl, const QString &url) {
|
|||
removeUrl(oldUrl);
|
||||
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:
|
||||
void vcardUpdated ();
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit ac52433b7d18d9e1f100da8d937d5d93091edf6d
|
||||
Subproject commit b37ed8c48d2a8effa053b9679c47d50111aad50b
|
||||
Loading…
Add table
Reference in a new issue