mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: removed meaningless 'isValid' method
This commit is contained in:
parent
e0f1a01a74
commit
935c1a2aa8
|
@ -232,8 +232,9 @@ void Settings::loadGlobal()
|
||||||
|
|
||||||
const QString DEFAULT_SMILEYS = ":/smileys/emojione/emoticons.xml";
|
const QString DEFAULT_SMILEYS = ":/smileys/emojione/emoticons.xml";
|
||||||
smileyPack = s.value("smileyPack", DEFAULT_SMILEYS).toString();
|
smileyPack = s.value("smileyPack", DEFAULT_SMILEYS).toString();
|
||||||
if (!SmileyPack::isValid(smileyPack))
|
if (!QFile::exists(smileyPack)) {
|
||||||
smileyPack = DEFAULT_SMILEYS;
|
smileyPack = DEFAULT_SMILEYS;
|
||||||
|
}
|
||||||
|
|
||||||
emojiFontPointSize = s.value("emojiFontPointSize", 24).toInt();
|
emojiFontPointSize = s.value("emojiFontPointSize", 24).toInt();
|
||||||
firstColumnHandlePos = s.value("firstColumnHandlePos", 50).toInt();
|
firstColumnHandlePos = s.value("firstColumnHandlePos", 50).toInt();
|
||||||
|
|
|
@ -159,11 +159,6 @@ QVector<QPair<QString, QString>> SmileyPack::listSmileyPacks(const QStringList&
|
||||||
return smileyPacks;
|
return smileyPacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SmileyPack::isValid(const QString& filename)
|
|
||||||
{
|
|
||||||
return QFile(filename).exists();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Load smile pack
|
* @brief Load smile pack
|
||||||
* @note The caller must lock loadingMutex and should run it in a thread
|
* @note The caller must lock loadingMutex and should run it in a thread
|
||||||
|
|
|
@ -32,7 +32,6 @@ public:
|
||||||
static SmileyPack& getInstance();
|
static SmileyPack& getInstance();
|
||||||
static QVector<QPair<QString, QString>> listSmileyPacks(const QStringList& paths);
|
static QVector<QPair<QString, QString>> listSmileyPacks(const QStringList& paths);
|
||||||
static QVector<QPair<QString, QString>> listSmileyPacks();
|
static QVector<QPair<QString, QString>> listSmileyPacks();
|
||||||
static bool isValid(const QString& filename);
|
|
||||||
|
|
||||||
QString smileyfied(const QString& msg);
|
QString smileyfied(const QString& msg);
|
||||||
QList<QStringList> getEmoticons() const;
|
QList<QStringList> getEmoticons() const;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user