summaryrefslogtreecommitdiffhomepage
path: root/options/group.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-03 12:54:10 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-09 12:13:30 +0100
commit7dd05e0be7a1243d7f3026fadd3492eb054006fb (patch)
tree422ad97e9347c3943eef5ca2205e064dab64716d /options/group.cpp
parent6b82b38a841ce2b9c98e1c4671f51147e1d2a453 (diff)
options: sprinkle some QStringLiteral
Diffstat (limited to 'options/group.cpp')
-rw-r--r--options/group.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/options/group.cpp b/options/group.cpp
index 8a0eeb03..41655d5e 100644
--- a/options/group.cpp
+++ b/options/group.cpp
@@ -50,12 +50,15 @@ void group::save() const
});
}
-void group::put(const QString &s, const QVariant &d)
+void group::put(const QString& s, const QVariant& d)
{
- kvs[s] = d;
+ if (d.isNull())
+ kvs.erase(s);
+ else
+ kvs[s] = d;
}
-bool group::contains(const QString &s) const
+bool group::contains(const QString& s) const
{
const auto it = kvs.find(s);
return it != kvs.cend();