[Kst] branches/work/kst/portto4/kst/src/datasources/ascii

Barth Netterfield netterfield at astro.utoronto.ca
Fri Nov 23 21:41:24 UTC 2012


SVN commit 1325941 by netterfield:

Allow compile on qt < 4.7 (eg, ubuntu 10.04 lts).
For these older versions, ascii time resolution will be limited to 1s
precision which is bad, but not as bad as not being able to compile at
all.


 M  +4 -0      kst_atof.cpp  


--- branches/work/kst/portto4/kst/src/datasources/ascii/kst_atof.cpp #1325940:1325941
@@ -218,7 +218,11 @@
     QDateTime t = QDateTime::fromString(time, _timeFormat);
     if (t.isValid()) {
       t.setTimeSpec(Qt::UTC);
+#if QT_VERSION >= 0x040700
       sec = t.toMSecsSinceEpoch() / 1000.0;
+#else
+      sec = t.toTime_t();
+#endif
     }
   } else {
     const QTime t = QTime::fromString(time, _timeFormat);


More information about the Kst mailing list