From 38179f49d4d668dcc1057085416635efc599722e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 28 Nov 2013 10:44:22 -0800 Subject: Fix editing of negative temperatures We tried to clean up the temperature string (to remove degree characters and unit names etc) a bit too aggressively, and removed the sign character too.. Fixes #306 Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- qt-gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-gui.cpp b/qt-gui.cpp index 57e410865..c4624c666 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -435,7 +435,7 @@ int parseTemperatureToMkelvin(const QString& text) { int mkelvin; QString numOnly = text; - numOnly.replace(",",".").remove(QRegExp("[^0-9.]")); + numOnly.replace(",",".").remove(QRegExp("[^-0-9.]")); if (numOnly == "") return 0; double number = numOnly.toDouble(); -- cgit v1.2.3-70-g09d2