Made changes for clean up and fix the problem that a new ramdon port is set every time a setting is saved.

This commit is contained in:
tungnian lee
2012-08-28 15:55:08 -07:00
committed by sledgehammer999
parent 7a99eb8e23
commit 75e28bb3e6
5 changed files with 84 additions and 30 deletions

View File

@@ -78,6 +78,7 @@ public:
}
// General options
QString getLocale() const {
return value(QString::fromUtf8("Preferences/General/Locale"), "en_GB").toString();
}
@@ -85,7 +86,7 @@ public:
void setLocale(const QString &locale) {
setValue(QString::fromUtf8("Preferences/General/Locale"), locale);
}
bool useProgramNotification() const {
return value(QString::fromUtf8("Preferences/General/ProgramNotification"), true).toBool();
}
@@ -126,6 +127,14 @@ public:
setValue("Preferences/General/AlternatingRowColors", b);
}
bool useRandomPort() const {
return value(QString::fromUtf8("Preferences/General/RandomPort"), true).toBool();
}
void setRandomPort(bool b) {
setValue("Preferences/General/RandomPort", b);
}
bool systrayIntegration() const {
#ifdef Q_WS_MAC
return false;