[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [marble] src/lib: Fixes: Make Marble compile with Qt 4.6 again.
From: Torsten Rahn <Torsten.Rahn () basyskom ! de>
Date: 2011-09-10 15:42:35
Message-ID: 20110910154235.BFDCEA607A () git ! kde ! org
[Download RAW message or body]
Git commit a2d049b933442e36298d01b3c6a472a4393d7874 by Torsten Rahn.
Committed on 10/09/2011 at 17:41.
Pushed by rahn into branch 'master'.
Fixes: Make Marble compile with Qt 4.6 again.
RevBy: Thibaut Gridel
M +10 -0 src/lib/MarbleClock.cpp
http://commits.kde.org/marble/a2d049b933442e36298d01b3c6a472a4393d7874
diff --git a/src/lib/MarbleClock.cpp b/src/lib/MarbleClock.cpp
index fd67754..7a9ca29 100644
--- a/src/lib/MarbleClock.cpp
+++ b/src/lib/MarbleClock.cpp
@@ -19,8 +19,13 @@ using namespace Marble;
MarbleClock::MarbleClock()
: QObject(),
m_speed( 1 ),
+#if QT_VERSION < 0x040700
+ m_datetime( QDateTime::currentDateTime().toUTC() ),
+ m_lasttime( QDateTime::currentDateTime().toUTC() ),
+#else
m_datetime( QDateTime::currentDateTimeUtc() ),
m_lasttime( QDateTime::currentDateTimeUtc() ),
+#endif
m_timezoneInSec( 0 )
{
@@ -51,8 +56,13 @@ qreal MarbleClock::dayFraction() const
void MarbleClock::timerTimeout()
{
// calculate real period elapsed since last call
+#if QT_VERSION < 0x040700
+ QDateTime m_curenttime( QDateTime::currentDateTime().toUTC() );
+ int msecdelta = 1000 * m_lasttime.secsTo( m_curenttime );
+#else
QDateTime m_curenttime( QDateTime::currentDateTimeUtc() );
int msecdelta = m_lasttime.msecsTo( m_curenttime );
+#endif
m_lasttime = m_curenttime;
// update m_datetime at m_speed pace
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic