[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Wed Nov 16 07:21:35 CET 2005


SVN commit 480688 by staikos:

well that was backwards.


 M  +6 -5      dateparser.cpp  


--- trunk/extragear/graphics/kst/kst/dateparser.cpp #480687:480688
@@ -75,12 +75,13 @@
   ExtDateTime edt = ExtDateTime::currentDateTime();
   ExtDate d = edt.date();
   QTime t = edt.time();
+  int i = 0;
   switch (mainSplit.count()) {
     default:
       return ExtDateTime();
     case 5:
       {
-        int years = mainSplit[4].toInt();
+        int years = mainSplit[i++].toInt();
         if (years < 100) {
           if (years < 0) {
             years = 1970 - years;
@@ -92,23 +93,23 @@
       }
     case 4:
       {
-        unsigned month = mainSplit[3].toUInt();
+        unsigned month = mainSplit[i++].toUInt();
         d.setYMD(d.year(), month, d.day());
       }
     case 3:
       {
-        unsigned day = mainSplit[2].toInt();
+        unsigned day = mainSplit[i++].toInt();
         d.setYMD(d.year(), d.month(), day);
       }
       edt.setDate(d);
     case 2:
       {
-        unsigned hour = mainSplit[1].toInt();
+        unsigned hour = mainSplit[i++].toInt();
         t.setHMS(hour, t.minute(), t.second());
       }
     case 1:
       {
-        unsigned minute = mainSplit[0].toInt();
+        unsigned minute = mainSplit[i].toInt();
         t.setHMS(t.hour(), minute, t.second());
       }
     case 0:


More information about the Kst mailing list