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

List:       kde-commits
Subject:    kdepim/karm
From:       Hans Petter Bieker <bieker () kde ! org>
Date:       2003-01-06 16:26:34
[Download RAW message or body]

CVS commit by bieker: 

Using KLocale::formatDateTime instead of own format.


  M +6 -4      idle.cpp   1.6
  M +6 -3      print.cpp   1.7


--- kdepim/karm/print.cpp  #1.6:1.7
@@ -2,9 +2,12 @@
 #include "task.h"
 #include "print.h"
-#include "klocale.h"
+
 #include <qpainter.h>
 #include <qpaintdevicemetrics.h>
 #include <qdatetime.h>
 
+#include <kglobal.h>
+#include <klocale.h>
+
 const int levelIndent = 10;
 
@@ -69,7 +72,7 @@ void MyPrinter::print()
                 
                 int height = metrics.height();
-                QString now = QDateTime::currentDateTime().toString();
+                QString now = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
                 
-                painter.drawText(xMargin, yoff, pageWidth, height,
+                painter.drawText(xMargin, yoff, pageWidth*2, height*2,
                                  QPainter::AlignCenter, 
                                  i18n("KArm - %1").arg(now));

--- kdepim/karm/idle.cpp  #1.5:1.6
@@ -1,7 +1,10 @@
 #include "idle.h"
+
+#include <qdatetime.h>
 #include <qmessagebox.h>
-#include <klocale.h>
 #include <qtimer.h>
-#include <qdatetime.h>
+
+#include <kglobal.h>
+#include <klocale.h>
 
 IdleTimer::IdleTimer(int maxIdle) 
@@ -62,6 +65,5 @@ void IdleTimer::informOverrun(int idleMi
   QDateTime start = QDateTime::currentDateTime();
   QDateTime idleStart = start.addSecs(-60 * _maxIdle);
-  QString backThen;
-  backThen.sprintf("%d:%02d", idleStart.time().hour(), idleStart.time().minute());
+  QString backThen = KGlobal::locale()->formatTime(idleStart.time());
   
   int id =  QMessageBox::warning(0,i18n("Idle detection"),


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

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