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

removed unused settings attributes

closes tux3/qTox #628
This commit is contained in:
agilob 2015-06-20 12:50:20 +01:00
parent 9372df260b
commit cc0c929ab9
3 changed files with 6 additions and 78 deletions

View File

@ -190,10 +190,7 @@ void Settings::loadGlobal()
s.endGroup();
s.beginGroup("GUI");
enableSmoothAnimation = s.value("smoothAnimation", true).toBool();
smileyPack = s.value("smileyPack", ":/smileys/TwitterEmojiSVG/emoticons.xml").toString();
customEmojiFont = s.value("customEmojiFont", true).toBool();
emojiFontFamily = s.value("emojiFontFamily", "DejaVu Sans").toString();
emojiFontPointSize = s.value("emojiFontPointSize", 16).toInt();
firstColumnHandlePos = s.value("firstColumnHandlePos", 50).toInt();
secondColumnHandlePosFromRight = s.value("secondColumnHandlePosFromRight", 50).toInt();
@ -202,7 +199,6 @@ void Settings::loadGlobal()
minimizeOnClose = s.value("minimizeOnClose", false).toBool();
minimizeToTray = s.value("minimizeToTray", false).toBool();
lightTrayIcon = s.value("lightTrayIcon", false).toBool();
useNativeStyle = s.value("nativeStyle", false).toBool();
useEmoticons = s.value("useEmoticons", true).toBool();
statusChangeNotificationEnabled = s.value("statusChangeNotificationEnabled", false).toBool();
themeColor = s.value("themeColor", 0).toInt();
@ -372,14 +368,10 @@ void Settings::saveGlobal()
const QList<QString> widgetNames = widgetSettings.keys();
for (const QString& name : widgetNames)
s.setValue(name, widgetSettings.value(name));
s.endGroup();
s.beginGroup("GUI");
s.setValue("smoothAnimation", enableSmoothAnimation);
s.setValue("smileyPack", smileyPack);
s.setValue("customEmojiFont", customEmojiFont);
s.setValue("emojiFontFamily", emojiFontFamily);
s.setValue("emojiFontPointSize", emojiFontPointSize);
s.setValue("firstColumnHandlePos", firstColumnHandlePos);
s.setValue("secondColumnHandlePosFromRight", secondColumnHandlePosFromRight);
@ -388,7 +380,6 @@ void Settings::saveGlobal()
s.setValue("minimizeOnClose", minimizeOnClose);
s.setValue("minimizeToTray", minimizeToTray);
s.setValue("lightTrayIcon", lightTrayIcon);
s.setValue("nativeStyle", useNativeStyle);
s.setValue("useEmoticons", useEmoticons);
s.setValue("themeColor", themeColor);
s.setValue("style", style);
@ -927,18 +918,6 @@ QByteArray Settings::getWidgetData(const QString& uniqueName) const
return widgetSettings.value(uniqueName);
}
bool Settings::isAnimationEnabled() const
{
QMutexLocker locker{&bigLock};
return enableSmoothAnimation;
}
void Settings::setAnimationEnabled(bool newValue)
{
QMutexLocker locker{&bigLock};
enableSmoothAnimation = newValue;
}
QString Settings::getSmileyPack() const
{
QMutexLocker locker{&bigLock};
@ -952,19 +931,6 @@ void Settings::setSmileyPack(const QString &value)
emit smileyPackChanged();
}
bool Settings::isCurstomEmojiFont() const
{
QMutexLocker locker{&bigLock};
return customEmojiFont;
}
void Settings::setCurstomEmojiFont(bool value)
{
QMutexLocker locker{&bigLock};
customEmojiFont = value;
emit emojiFontChanged();
}
int Settings::getEmojiFontPointSize() const
{
QMutexLocker locker{&bigLock};
@ -1026,31 +992,6 @@ void Settings::setDateFormat(const QString &format)
dateFormat = format;
}
QString Settings::getEmojiFontFamily() const
{
QMutexLocker locker{&bigLock};
return emojiFontFamily;
}
void Settings::setEmojiFontFamily(const QString &value)
{
QMutexLocker locker{&bigLock};
emojiFontFamily = value;
emit emojiFontChanged();
}
bool Settings::getUseNativeStyle() const
{
QMutexLocker locker{&bigLock};
return useNativeStyle;
}
void Settings::setUseNativeStyle(bool value)
{
QMutexLocker locker{&bigLock};
useNativeStyle = value;
}
QByteArray Settings::getWindowGeometry() const
{
QMutexLocker locker{&bigLock};

View File

@ -174,9 +174,6 @@ public:
bool isCurstomEmojiFont() const;
void setCurstomEmojiFont(bool value);
QString getEmojiFontFamily() const;
void setEmojiFontFamily(const QString &value);
int getEmojiFontPointSize() const;
void setEmojiFontPointSize(int value);
@ -210,9 +207,6 @@ public:
void setTypingNotification(bool enabled);
// State
bool getUseNativeStyle() const;
void setUseNativeStyle(bool value);
QByteArray getWindowGeometry() const;
void setWindowGeometry(const QByteArray &value);
@ -319,13 +313,9 @@ private:
QString globalAutoAcceptDir;
// GUI
bool enableSmoothAnimation;
QString smileyPack;
bool customEmojiFont;
QString emojiFontFamily;
int emojiFontPointSize;
int emojiFontPointSize;
bool minimizeOnClose;
bool useNativeStyle;
QByteArray windowGeometry;
QByteArray windowState;
QByteArray splitterState;

View File

@ -77,14 +77,11 @@ QList<QColor> Style::themeColorColors = {QColor(), QColor("#004aa4"), QColor("#9
QString Style::getStylesheet(const QString &filename)
{
if (!Settings::getInstance().getUseNativeStyle())
{
QFile file(filename);
if (file.open(QFile::ReadOnly | QFile::Text))
return resolve(file.readAll());
else
qWarning() << "Stylesheet " << filename << " not found";
}
QFile file(filename);
if (file.open(QFile::ReadOnly | QFile::Text))
return resolve(file.readAll());
else
qWarning() << "Stylesheet " << filename << " not found";
return QString();
}