Adds show apps option to the config file.

Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
Camila San 2018-01-28 19:57:31 +01:00
parent 8ada9d0471
commit e29953bc11
No known key found for this signature in database
GPG key ID: A0A1A2FD03979524
2 changed files with 17 additions and 0 deletions

View file

@ -56,6 +56,7 @@ static const char crashReporterC[] = "crashReporter";
static const char optionalDesktopNoficationsC[] = "optionalDesktopNotifications";
static const char showInExplorerNavigationPaneC[] = "showInExplorerNavigationPane";
static const char showExternalSitesC[] = "showExternalSites";
static const char showAppsC[] = "showApps";
static const char skipUpdateCheckC[] = "skipUpdateCheck";
static const char updateCheckIntervalC[] = "updateCheckInterval";
static const char geometryC[] = "geometry";
@ -161,6 +162,19 @@ void ConfigFile::setShowExternalSites(bool show)
settings.sync();
}
bool ConfigFile::showApps() const
{
QSettings settings(configFile(), QSettings::IniFormat);
return settings.value(QLatin1String(showAppsC), false).toBool();
}
void ConfigFile::setShowApps(bool show)
{
QSettings settings(configFile(), QSettings::IniFormat);
settings.setValue(QLatin1String(showAppsC), show);
settings.sync();
}
int ConfigFile::timeout() const
{
QSettings settings(configFile(), QSettings::IniFormat);

View file

@ -129,6 +129,9 @@ public:
bool showExternalSites() const;
void setShowExternalSites(bool show);
bool showApps() const;
void setShowApps(bool show);
int timeout() const;
quint64 chunkSize() const;
quint64 maxChunkSize() const;