[vlmc-devel] Settings: Add a simple constructor
Yikai Lu
git at videolan.org
Sat Apr 9 22:18:03 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Apr 9 11:44:02 2016 +0900| [44824e56fe38f88926766b6bf06bb65c551a909d] | committer: Hugo Beauzée-Luyssen
Settings: Add a simple constructor
Since we can add Settings to a parent Settings, we don't have to let Settings to have a file to save.
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/44824e56fe38f88926766b6bf06bb65c551a909d
---
src/Settings/Settings.cpp | 5 +++++
src/Settings/Settings.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/src/Settings/Settings.cpp b/src/Settings/Settings.cpp
index 6d0a0c0..6a07006 100644
--- a/src/Settings/Settings.cpp
+++ b/src/Settings/Settings.cpp
@@ -36,6 +36,11 @@
#include <QJsonDocument>
#include <QJsonObject>
+Settings::Settings()
+ : m_settingsFile( nullptr )
+{
+
+}
Settings::Settings(const QString &settingsFile)
: m_settingsFile( nullptr )
diff --git a/src/Settings/Settings.h b/src/Settings/Settings.h
index 8be0586..ff4461f 100644
--- a/src/Settings/Settings.h
+++ b/src/Settings/Settings.h
@@ -108,6 +108,7 @@ class Settings
typedef QList<SettingValue*> SettingList;
typedef QMap<QString, SettingValue*> SettingMap;
+ Settings();
Settings( const QString& settingsFile );
~Settings();
bool setValue(const QString &key, const QVariant &value );
More information about the Vlmc-devel
mailing list