[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kcm-touchpad] src/backends/x11: Xlib backend: remove invalid checks in getConfig()
From: Alexander Mezin <mezin.alexander () gmail ! com>
Date: 2014-02-28 19:21:38
Message-ID: E1WJT06-000711-Sp () scm ! kde ! org
[Download RAW message or body]
Git commit 9a6fb10834e3842af5a4ae432f68f02f7334b75e by Alexander Mezin.
Committed on 28/02/2014 at 19:15.
Pushed by alexandermezin into branch 'master'.
Xlib backend: remove invalid checks in getConfig()
BUG: 331361
M +8 -13 src/backends/x11/xlibbackend.cpp
http://commits.kde.org/kcm-touchpad/9a6fb10834e3842af5a4ae432f68f02f7334b75e
diff --git a/src/backends/x11/xlibbackend.cpp b/src/backends/x11/xlibbackend.cpp
index 7f3ff0d..5253c9e 100644
--- a/src/backends/x11/xlibbackend.cpp
+++ b/src/backends/x11/xlibbackend.cpp
@@ -441,23 +441,18 @@ bool XlibBackend::getConfig(QVariantHash &p)
}
if (m_negate.contains(name)) {
- QVariantHash::Iterator i = p.find(m_negate[name]);
- if (i != p.end()) {
- bool negative = value.toDouble() < 0.0;
- i.value() = negative;
- if (negative) {
- value = negateVariant(value);
- }
+ bool negative = value.toDouble() < 0.0;
+ p[m_negate[name]] = QVariant(negative);
+ if (negative) {
+ value = negateVariant(value);
}
}
if (name == "CoastingSpeed") {
- QVariantHash::Iterator coastingEnabled = p.find("Coasting");
- if (coastingEnabled != p.end()) {
- coastingEnabled.value() = QVariant(value.toDouble() != 0.0);
- if (!coastingEnabled.value().toBool()) {
- continue;
- }
+ bool coasting = value.toDouble() != 0.0;
+ p["Coasting"] = QVariant(coasting);
+ if (!coasting) {
+ continue;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic