From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kalarm/kalarmd/alarmdaemon.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'kalarm/kalarmd/alarmdaemon.cpp') diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp index 4b6495728..c14a1bf5b 100644 --- a/kalarm/kalarmd/alarmdaemon.cpp +++ b/kalarm/kalarmd/alarmdaemon.cpp @@ -58,9 +58,9 @@ static const TQString START_OF_DAY(TQString::tqfromLatin1("StartOfDay")); static const TQString AUTOSTART_TRAY(TQString::tqfromLatin1("AutostartTray")); -AlarmDaemon::AlarmDaemon(bool autostart, TQObject *parent, const char *name) +AlarmDaemon::AlarmDaemon(bool autostart, TQObject *tqparent, const char *name) : DCOPObject(name), - TQObject(parent, name), + TQObject(tqparent, name), mAlarmTimer(0) { kdDebug(5900) << "AlarmDaemon::AlarmDaemon()" << endl; @@ -138,7 +138,7 @@ void AlarmDaemon::startMonitoring() // Set up the alarm timer mAlarmTimer = new TQTimer(this); connect(mAlarmTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAlarmsSlot())); - setTimerStatus(); + setTimertqStatus(); // Start monitoring calendar files. // They are monitored until their client application registers, upon which @@ -156,7 +156,7 @@ void AlarmDaemon::enableCal(const TQString& urlString, bool enable) if (cal) { cal->setEnabled(enable); - notifyCalStatus(cal); // notify KAlarm + notifyCaltqStatus(cal); // notify KAlarm } } @@ -196,8 +196,8 @@ void AlarmDaemon::calendarLoaded(ADCalendar* cal, bool success) { if (success) kdDebug(5900) << "Calendar reloaded" << endl; - notifyCalStatus(cal); // notify KAlarm - setTimerStatus(); + notifyCaltqStatus(cal); // notify KAlarm + setTimertqStatus(); checkAlarms(cal); } @@ -262,8 +262,8 @@ void AlarmDaemon::registerApp(const TQCString& appName, const TQString& appTitle ADConfigData::writeClient(appName, client); ADConfigData::enableAutoStart(true); - setTimerStatus(); - notifyCalStatus(client->calendar()); + setTimertqStatus(); + notifyCaltqStatus(client->calendar()); result = KAlarmd::SUCCESS; } @@ -373,8 +373,8 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) TQValueList eventsDone; for (TQValueList::ConstIterator it = alarms.begin(); it != alarms.end(); ++it) { - KCal::Event* event = dynamic_cast((*it)->parent()); - if (!event || eventsDone.find(event) != eventsDone.end()) + KCal::Event* event = dynamic_cast((*it)->tqparent()); + if (!event || eventsDone.tqfind(event) != eventsDone.end()) continue; // either not an event, or the event has already been processed eventsDone += event; const TQString& eventID = event->uid(); @@ -385,7 +385,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) // The times for non-due alarms are set invalid in 'alarmtimes'. bool recurs = event->doesRecur(); const TQStringList cats = event->categories(); - bool floats = (cats.find(TQString::tqfromLatin1("DATE")) != cats.end()); + bool floats = (cats.tqfind(TQString::tqfromLatin1("DATE")) != cats.end()); TQDateTime nextDateTime = event->dtStart(); if (recurs) { @@ -487,7 +487,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID) { // It's running, but check if it has created our DCOP interface yet QCStringList objects = kapp->dcopClient()->remoteObjects(appname); - if (objects.find(client->dcopObject()) == objects.end()) + if (objects.tqfind(client->dcopObject()) == objects.end()) ready = false; } if (!ready) @@ -531,7 +531,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID) /****************************************************************************** * Starts or stops the alarm timer as necessary after a calendar is enabled/disabled. */ -void AlarmDaemon::setTimerStatus() +void AlarmDaemon::setTimertqStatus() { #ifdef AUTOSTART_KALARM if (!mAlarmTimer) @@ -569,7 +569,7 @@ void AlarmDaemon::setTimerStatus() * Send a DCOP message to to the client which owns the specified calendar, * notifying it of a change in calendar status. */ -void AlarmDaemon::notifyCalStatus(const ADCalendar* cal) +void AlarmDaemon::notifyCaltqStatus(const ADCalendar* cal) { ClientInfo* client = ClientInfo::get(cal); if (!client) @@ -577,13 +577,13 @@ void AlarmDaemon::notifyCalStatus(const ADCalendar* cal) TQCString appname = client->appName(); if (kapp->dcopClient()->isApplicationRegistered(static_cast(appname))) { - KAlarmd::CalendarStatus change = cal->available() ? (cal->enabled() ? KAlarmd::CALENDAR_ENABLED : KAlarmd::CALENDAR_DISABLED) + KAlarmd::CalendartqStatus change = cal->available() ? (cal->enabled() ? KAlarmd::CALENDAR_ENABLED : KAlarmd::CALENDAR_DISABLED) : KAlarmd::CALENDAR_UNAVAILABLE; - kdDebug(5900) << "AlarmDaemon::notifyCalStatus() sending:" << appname << " -> " << change << endl; + kdDebug(5900) << "AlarmDaemon::notifyCaltqStatus() sending:" << appname << " -> " << change << endl; AlarmGuiIface_stub stub(appname, client->dcopObject()); stub.alarmDaemonUpdate(change, cal->urlString()); if (!stub.ok()) - kdError(5900) << "AlarmDaemon::notifyCalStatus(): dcop send failed:" << appname << endl; + kdError(5900) << "AlarmDaemon::notifyCaltqStatus(): dcop send failed:" << appname << endl; } } -- cgit v1.2.1