[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdepim/kpilot/lib
From:       Adriaan de Groot <adridg () cs ! kun ! nl>
Date:       2003-04-12 14:40:20
[Download RAW message or body]

CVS commit by adridg: 

Qt 3.0 compatibility


  M +46 -37    pilotLocalDatabase.cc   1.7.4.8
  M +8 -8      pilotLocalDatabase.h   1.7.4.5


--- kdepim/kpilot/lib/pilotLocalDatabase.cc  #1.7.4.7:1.7.4.8
@@ -167,7 +166,17 @@ bool PilotLocalDatabase::createDatabase(
         fDBInfo.modnum=0;
         fDBInfo.index=0;
-        fDBInfo.createDate=(QDateTime::currentDateTime()).toTime_t();
-        fDBInfo.modifyDate=(QDateTime::currentDateTime()).toTime_t();
-        fDBInfo.backupDate=(QDateTime::currentDateTime()).toTime_t();
+
+#if QT_VERSION < 0x30100
+#define TODAY_T epoch.secsTo(QDateTime::currentDateTime())
+        QDateTime epoch;
+        epoch.setTime_t((time_t)0);
+#else
+#define TODAY_T (QDateTime::currentDateTime()).toTime_t()
+#endif
+        fDBInfo.createDate=TODAY_T;
+        fDBInfo.modifyDate=TODAY_T;
+        fDBInfo.backupDate=TODAY_T;
+#undef TODAY_T
+
         
         delete[] fAppInfo;
@@ -236,5 +245,5 @@ int PilotLocalDatabase::writeAppBlock(un
 
 
-        // returns the number of records in the database 
+// returns the number of records in the database
 int PilotLocalDatabase::recordCount()
 {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic