Quellcode durchsuchen

QDateTime::msecsTo is not available in Qt 4.6.3

Achieve the same operation using QTime object associated with QDateTime
Jean-Christophe Fillion-Robin vor 14 Jahren
Ursprung
Commit
914dfa7767
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      Libs/Core/ctkErrorLogModel.cpp

+ 1 - 1
Libs/Core/ctkErrorLogModel.cpp

@@ -259,7 +259,7 @@ void ctkErrorLogModel::addEntry(ctkErrorLogModel::LogLevel logLevel,
     QDateTime lastRowDateTime = QDateTime::fromString(lastRowTimeIndex.data().toString(), timeFormat);
 
     int groupingIntervalInMsecs = 1000;
-    bool withinGroupingInterval = lastRowDateTime.msecsTo(currentDateTime) <= groupingIntervalInMsecs;
+    bool withinGroupingInterval = lastRowDateTime.time().msecsTo(currentDateTime.time()) <= groupingIntervalInMsecs;
 
     groupEntry = logLevelMatched && originMatched && withinGroupingInterval;
     }