From 06fe2b613262efebd1c97471d06e88fa317670bd Mon Sep 17 00:00:00 2001 From: Skycoder42 Date: Wed, 8 Aug 2018 14:35:53 +0200 Subject: [PATCH] todo cleanup --- doc/settingsviewmodel.dox | 14 ++++++++------ src/mvvmcore/settingsviewmodel.h | 2 +- src/mvvmquick/inputviewfactory.cpp | 1 - src/mvvmwidgets/inputwidgetfactory.cpp | 1 - 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/settingsviewmodel.dox b/doc/settingsviewmodel.dox index 559e3de..2c6e13e 100644 --- a/doc/settingsviewmodel.dox +++ b/doc/settingsviewmodel.dox @@ -164,8 +164,8 @@ proceed without error checking and show an empty settings dialog. @param defaultValue a default value to return in case the value is not found in the settings @returns The value found under the given key -You can override this method if you want to support loading and saving settings from a -different source then the normally used QSettings +You can override this method if you want to support loading and saving settings from something +different than a ISettingsAccessor @sa SettingsViewModel::saveValue, SettingsViewModel::resetValue */ @@ -176,8 +176,9 @@ different source then the normally used QSettings @param key The full key of the settings entry to be saved @param value The value to be stored under the key -You can override this method if you want to support loading and saving settings from a -different source then the normally used QSettings +You can override this method if you want to support loading and saving settings from something +different than a ISettingsAccessor. if you do so, you must emit the valueChanged() signal +from this method to indicate that the data was changed. @sa SettingsViewModel::loadValue, SettingsViewModel::resetValue */ @@ -187,8 +188,9 @@ different source then the normally used QSettings @param key The full key of the settings entry to be resetted -You can override this method if you want to support loading and saving settings from a -different source then the normally used QSettings +You can override this method if you want to support loading and saving settings from something +different than a ISettingsAccessor. if you do so, you must emit the valueChanged() signal +from this method to indicate that the data was changed. @sa SettingsViewModel::loadValue, SettingsViewModel::saveValue */ diff --git a/src/mvvmcore/settingsviewmodel.h b/src/mvvmcore/settingsviewmodel.h index 04385bc..bb8927a 100644 --- a/src/mvvmcore/settingsviewmodel.h +++ b/src/mvvmcore/settingsviewmodel.h @@ -91,7 +91,7 @@ Q_SIGNALS: void beginLoadSetup(); //! Signal to be emitted whenver a value in the settings is changed or removed to update the GUI - QTMVVM_REVISION_1 void valueChanged(const QString &key); //TODO add to save/reset doc + QTMVVM_REVISION_1 void valueChanged(const QString &key); //! Is emitted when the user accepted the reset triggered by resetAll() QTMVVM_REVISION_1 void resetAccepted(QPrivateSignal); diff --git a/src/mvvmquick/inputviewfactory.cpp b/src/mvvmquick/inputviewfactory.cpp index ec4ca3c..730c196 100644 --- a/src/mvvmquick/inputviewfactory.cpp +++ b/src/mvvmquick/inputviewfactory.cpp @@ -23,7 +23,6 @@ QUrl InputViewFactory::getInputUrl(const QByteArray &type, const QVariantMap &vi { Q_UNUSED(viewProperties) - //TODO document all types QUrl url; if(d->inputAliases.contains(type)) url = getInputUrl(d->inputAliases.value(type), viewProperties); diff --git a/src/mvvmwidgets/inputwidgetfactory.cpp b/src/mvvmwidgets/inputwidgetfactory.cpp index a0bc1f8..b907ee5 100644 --- a/src/mvvmwidgets/inputwidgetfactory.cpp +++ b/src/mvvmwidgets/inputwidgetfactory.cpp @@ -30,7 +30,6 @@ InputWidgetFactory::~InputWidgetFactory() = default; QWidget *InputWidgetFactory::createInput(const QByteArray &type, QWidget *parent, const QVariantMap &viewProperties) { - //TODO document all types QWidget *widget = nullptr; if(d->aliases.contains(type)) return createInput(d->aliases.value(type), parent, viewProperties);