1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

qTox uses default smiley pack if there's an invalid one in the qtox.ini file (fixes #2757)

This commit is contained in:
Taha 2016-01-08 21:02:48 -05:00
parent ad3326b95d
commit 03cb9d8a03

View File

@ -192,7 +192,12 @@ void Settings::loadGlobal()
s.endGroup();
s.beginGroup("GUI");
smileyPack = s.value("smileyPack", ":/smileys/Universe/emoticons.xml").toString();
static const QString DEFAULT_SMILEYS = ":/smileys/Universe/emoticons.xml";
smileyPack = s.value("smileyPack", DEFAULT_SMILEYS).toString();
if (!SmileyPack::isValid(smileyPack))
{
smileyPack = DEFAULT_SMILEYS;
}
emojiFontPointSize = s.value("emojiFontPointSize", 16).toInt();
firstColumnHandlePos = s.value("firstColumnHandlePos", 50).toInt();
secondColumnHandlePosFromRight = s.value("secondColumnHandlePosFromRight", 50).toInt();