diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-08 22:34:00 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-08 14:00:44 -0800 |
commit | 1f03a8be81527c2c32e66a169457340283c0e7ce (patch) | |
tree | 5f4910ac918d365a1418861bd29af0e9c7a55df8 /core | |
parent | 3bb9b08f330f2657f09e71b8ff495c788a773436 (diff) | |
download | subsurface-1f03a8be81527c2c32e66a169457340283c0e7ce.tar.gz |
Cleanup: remove erroneous comments
Remove two erroneous comments stating that a function-local
QSettings variable should not be static because it is initialized
too early. Scoped static variables are initialized when execution
first hits the statement.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r-- | core/settings/qPrefPrivate.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/core/settings/qPrefPrivate.cpp b/core/settings/qPrefPrivate.cpp index 14fb1be1e..e1622c3e7 100644 --- a/core/settings/qPrefPrivate.cpp +++ b/core/settings/qPrefPrivate.cpp @@ -18,10 +18,6 @@ QString keyFromGroupAndName(QString group, QString name) void qPrefPrivate::propSetValue(const QString &key, const QVariant &value, const QVariant &defaultValue) { - // REMARK: making s static (which would be logical) does NOT work - // because it gets initialized too early. - // Having it as a local variable is light weight, because it is an - // interface class. QSettings s; bool isDefault = false; if (value.isValid() && value.type() == QVariant::Double) @@ -37,10 +33,6 @@ void qPrefPrivate::propSetValue(const QString &key, const QVariant &value, const QVariant qPrefPrivate::propValue(const QString &key, const QVariant &defaultValue) { - // REMARK: making s static (which would be logical) does NOT work - // because it gets initialized too early. - // Having it as a local variable is light weight, because it is an - // interface class. QSettings s; return s.value(key, defaultValue); } |