This repository has been archived by the owner on May 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
14 changes: 10 additions & 4 deletions
14
src/lib/MellowPlayer/Infrastructure/Settings/QSettingsStore.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
#include "QSettingsStore.hpp" | ||
#include <QDebug> | ||
|
||
using namespace MellowPlayer::Domain; | ||
using namespace MellowPlayer::Domain; | ||
using namespace MellowPlayer::Infrastructure; | ||
using namespace std; | ||
|
||
QSettingsStore::QSettingsStore(const QString& orgName) : qSettings_(orgName, "3") | ||
QSettingsStore::QSettingsStore() : qSettings_(make_unique<QSettings>("MellowPlayer", "3")) | ||
{ | ||
} | ||
|
||
void QSettingsStore::setOrganizationName(const QString &orgName) | ||
{ | ||
qSettings_ = make_unique<QSettings>(orgName, "3"); | ||
} | ||
|
||
void QSettingsStore::clear() | ||
{ | ||
qSettings_.clear(); | ||
qSettings_->clear(); | ||
} | ||
|
||
QVariant QSettingsStore::value(const QString& key, const QVariant& defaultValue) const | ||
{ | ||
return qSettings_.value(key, defaultValue); | ||
return qSettings_->value(key, defaultValue); | ||
} | ||
|
||
void QSettingsStore::setValue(const QString& key, const QVariant& value) | ||
{ | ||
qSettings_.setValue(key, value); | ||
qSettings_->setValue(key, value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters