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>
This commit is contained in:
Tomaz Canabrava 2014-05-10 21:37:18 -03:00 committed by Dirk Hohndel
parent 3b7624ff46
commit cf848e5233
5 changed files with 18 additions and 18 deletions

View file

@ -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) {