Blob Blame History Raw
diff -up kdebase-workspace-4.2.2/plasma/applets/calendar/calendar.cpp.kde#187699 kdebase-workspace-4.2.2/plasma/applets/calendar/calendar.cpp
--- kdebase-workspace-4.2.2/plasma/applets/calendar/calendar.cpp.kde#187699	2009-03-26 09:42:28.000000000 -0500
+++ kdebase-workspace-4.2.2/plasma/applets/calendar/calendar.cpp	2009-04-12 14:16:05.000000000 -0500
@@ -19,6 +19,7 @@
 
 #include <QGraphicsLayout>
 #include <QPainter>
+#include <QTimer>
 
 #include <KDebug>
 #include <KIcon>
@@ -34,8 +35,7 @@ CalendarTest::CalendarTest(QObject *pare
     : Plasma::PopupApplet(parent, args),
     m_calendarDialog(0),
     m_theme(0),
-    m_date(0),
-    m_updateTimerId(0)
+    m_date(0)
 {
     setAspectRatioMode(Plasma::IgnoreAspectRatio);
     setCacheMode(DeviceCoordinateCache);
@@ -116,18 +116,9 @@ void CalendarTest::updateDate()
     QDateTime d = QDateTime::currentDateTime();
     m_date = d.date().day();
     int updateIn = (24 * 60 * 60) - (d.toTime_t() + KSystemTimeZones::local().currentOffset()) % (24 * 60 * 60);
-    m_updateTimerId = startTimer(updateIn * 1000);
+    QTimer::singleShot(updateIn * 1000, this, SLOT(updateDate()));
     constraintsEvent(Plasma::FormFactorConstraint);
 }
 
-void CalendarTest::timerEvent(QTimerEvent *event)
-{
-    if (event->timerId() != m_updateTimerId) {
-        return;
-    }
-
-    killTimer(m_updateTimerId);
-    updateDate();
-}
 
 #include "calendar.moc"
diff -up kdebase-workspace-4.2.2/plasma/applets/calendar/calendar.h.kde#187699 kdebase-workspace-4.2.2/plasma/applets/calendar/calendar.h
--- kdebase-workspace-4.2.2/plasma/applets/calendar/calendar.h.kde#187699	2009-03-26 09:42:28.000000000 -0500
+++ kdebase-workspace-4.2.2/plasma/applets/calendar/calendar.h	2009-04-12 14:12:17.000000000 -0500
@@ -45,12 +45,9 @@ class CalendarTest : public Plasma::Popu
          */
         QGraphicsWidget *graphicsWidget();
 
-    protected:
-        void updateDate();
-        void timerEvent(QTimerEvent *event);
-
     protected slots:
         void configAccepted();
+        void updateDate();
 
     private:
         void paintIcon();
@@ -58,7 +55,6 @@ class CalendarTest : public Plasma::Popu
         Plasma::Calendar *m_calendarDialog;
         Plasma::Svg *m_theme;
         int m_date;
-        int m_updateTimerId;
 };
 
 K_EXPORT_PLASMA_APPLET(calendar, CalendarTest)