[Marble-commits] KDE/kdeedu/marble/src/plugins/render/weather

Jens-Michael Hoffmann jensmh at gmx.de
Thu Dec 24 06:42:07 CET 2009


SVN commit 1065680 by jmhoffmann:

The weather plugin also displays negative temperatures now.

 M  +3 -3      BBCParser.cpp  


--- trunk/KDE/kdeedu/marble/src/plugins/render/weather/BBCParser.cpp #1065679:1065680
@@ -219,7 +219,7 @@
             QRegExp regExp;
             
             // Temperature
-            regExp.setPattern( "(Temperature:\\s*)(\\d+)(.C)" );
+            regExp.setPattern( "(Temperature:\\s*)(-?\\d+)(.C)" );
             int pos = regExp.indexIn( description );
             if ( pos > -1 ) {
                 QString value = regExp.cap( 2 );
@@ -227,7 +227,7 @@
             }
 
             // Max Temperature
-            regExp.setPattern( "(Max Temp:\\s*)(\\d+)(.C)" );
+            regExp.setPattern( "(Max Temp:\\s*)(-?\\d+)(.C)" );
             pos = regExp.indexIn( description );
             if ( pos > -1 ) {
                 QString value = regExp.cap( 2 );
@@ -235,7 +235,7 @@
             }
 
             // Min Temperature
-            regExp.setPattern( "(Min Temp:\\s*)(\\d+)(.C)" );
+            regExp.setPattern( "(Min Temp:\\s*)(-?\\d+)(.C)" );
             pos = regExp.indexIn( description );
             if ( pos > -1 ) {
                 QString value = regExp.cap( 2 );


More information about the Marble-commits mailing list