summaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-10 21:37:18 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-11 01:57:00 -0700
commitcf848e52330fa0bca2ccc0fb5de5f2a4033fbafa (patch)
tree7801e74e8ecc0be25849993294154c8322bd42b8 /qt-gui.cpp
parent3b7624ff464b323fc3c271787a36faa1e97a7b27 (diff)
downloadsubsurface-cf848e52330fa0bca2ccc0fb5de5f2a4033fbafa.tar.gz
Correct the usage of std::string and QString
QStrings shouldn't be == "" to check for empty string, use .isEmpty() QStrings shouldn't be != "" to check for non empty, use .size() std::string shouldn't be cleared with = "", use .clear() Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index f2b655e14..868389eab 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -372,7 +372,7 @@ int parseTemperatureToMkelvin(const QString &text)
int mkelvin;
QString numOnly = text;
numOnly.replace(",", ".").remove(QRegExp("[^-0-9.]"));
- if (numOnly == "")
+ if (numOnly.isEmpty())
return 0;
double number = numOnly.toDouble();
switch (prefs.units.temperature) {