diff options
Diffstat (limited to 'kalarm/daemon.cpp')
-rw-r--r-- | kalarm/daemon.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp index 4ad785552..1f8820bff 100644 --- a/kalarm/daemon.cpp +++ b/kalarm/daemon.cpp @@ -58,7 +58,7 @@ class NotificationHandler : public TQObject, virtual public AlarmGuiIface NotificationHandler(); private: // DCOP interface - void alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL); + void alarmDaemonUpdate(int calendartqStatus, const TQString& calendarURL); void handleEvent(const TQString& calendarURL, const TQString& eventID); void registered(bool reregister, int result, int version); }; @@ -74,7 +74,7 @@ TQTimer* Daemon::mStatusTimer = 0; int Daemon::mStatusTimerCount = 0; int Daemon::mStatusTimerInterval; int Daemon::mStartTimeout = 0; -Daemon::Status Daemon::mStatus = Daemon::STOPPED; +Daemon::tqStatus Daemon::mtqStatus = Daemon::STOPPED; bool Daemon::mRunning = false; bool Daemon::mCalendarDisabled = false; bool Daemon::mEnableCalPending = false; @@ -125,8 +125,8 @@ void Daemon::createDcopHandler() bool Daemon::start() { kdDebug(5950) << "Daemon::start()\n"; - updateRegisteredStatus(); - switch (mStatus) + updateRegisteredtqStatus(); + switch (mtqStatus) { case STOPPED: { @@ -134,7 +134,7 @@ bool Daemon::start() return true; // we're currently waiting for the daemon to start // Start the alarm daemon. It is a KUniqueApplication, which means that // there is automatically only one instance of the alarm daemon running. - TQString execStr = locate("exe", TQString::fromLatin1(DAEMON_APP_NAME)); + TQString execStr = locate("exe", TQString::tqfromLatin1(DAEMON_APP_NAME)); if (execStr.isEmpty()) { KMessageBox::error(0, i18n("Alarm daemon not found.")); @@ -173,7 +173,7 @@ bool Daemon::registerWith(bool reregister) { if (mRegisterTimer) return true; - switch (mStatus) + switch (mtqStatus) { case STOPPED: case RUNNING: @@ -221,7 +221,7 @@ void Daemon::registrationResult(bool reregister, int result, int version) failed = true; kdError(5950) << "Daemon::registrationResult(" << reregister << "): kalarmd reports incompatible version " << version << endl; errmsg = i18n("Cannot enable alarms.\nInstallation or configuration error: Alarm Daemon (%1) version is incompatible.") - .arg(TQString::fromLatin1(DAEMON_APP_NAME)); + .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)); } else { @@ -236,8 +236,8 @@ void Daemon::registrationResult(bool reregister, int result, int version) kdError(5950) << "Daemon::registrationResult(" << reregister << "): registerApp dcop call: " << kapp->aboutData()->appName() << " not found\n"; KMessageBox::error(0, i18n("Alarms will be disabled if you stop KAlarm.\n" "(Installation or configuration error: %1 cannot locate %2 executable.)") - .arg(TQString::fromLatin1(DAEMON_APP_NAME)) - .arg(kapp->aboutData()->appName())); + .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)) + .tqarg(kapp->aboutData()->appName())); break; case KAlarmd::FAILURE: default: @@ -248,7 +248,7 @@ void Daemon::registrationResult(bool reregister, int result, int version) if (!reregister) { errmsg = i18n("Cannot enable alarms:\nFailed to register with Alarm Daemon (%1)") - .arg(TQString::fromLatin1(DAEMON_APP_NAME)); + .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)); } break; } @@ -258,8 +258,8 @@ void Daemon::registrationResult(bool reregister, int result, int version) { if (!errmsg.isEmpty()) { - if (mStatus == REGISTERED) - mStatus = READY; + if (mtqStatus == REGISTERED) + mtqStatus = READY; if (!mRegisterFailMsg) { mRegisterFailMsg = true; @@ -272,7 +272,7 @@ void Daemon::registrationResult(bool reregister, int result, int version) if (!reregister) { // The alarm daemon has loaded the calendar - mStatus = REGISTERED; + mtqStatus = REGISTERED; mRegisterFailMsg = false; kdDebug(5950) << "Daemon::start(): daemon startup complete" << endl; } @@ -283,9 +283,9 @@ void Daemon::registrationResult(bool reregister, int result, int version) */ void Daemon::checkIfStarted() { - updateRegisteredStatus(); + updateRegisteredtqStatus(); bool err = false; - switch (mStatus) + switch (mtqStatus) { case STOPPED: if (--mStartTimeout > 0) @@ -304,7 +304,7 @@ void Daemon::checkIfStarted() if (err) { kdError(5950) << "Daemon::checkIfStarted(): failed to start daemon" << endl; - KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(TQString::fromLatin1(DAEMON_APP_NAME))); + KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME))); } } @@ -312,27 +312,27 @@ void Daemon::checkIfStarted() * Check whether the alarm daemon has started yet, and if so, whether it is * ready to accept DCOP calls. */ -void Daemon::updateRegisteredStatus(bool timeout) +void Daemon::updateRegisteredtqStatus(bool timeout) { if (!kapp->dcopClient()->isApplicationRegistered(DAEMON_APP_NAME)) { - mStatus = STOPPED; + mtqStatus = STOPPED; mRegisterFailMsg = false; } else { - switch (mStatus) + switch (mtqStatus) { case STOPPED: // The daemon has newly been detected as registered with DCOP. // Wait for a short time to ensure that it is ready for DCOP calls. - mStatus = RUNNING; + mtqStatus = RUNNING; TQTimer::singleShot(startCheckInterval, mInstance, TQT_SLOT(slotStarted())); break; case RUNNING: if (timeout) { - mStatus = READY; + mtqStatus = READY; start(); } break; @@ -341,7 +341,7 @@ void Daemon::updateRegisteredStatus(bool timeout) break; } } - kdDebug(5950) << "Daemon::updateRegisteredStatus() -> " << mStatus << endl; + kdDebug(5950) << "Daemon::updateRegisteredStatus() -> " << mtqStatus << endl; } /****************************************************************************** @@ -414,8 +414,8 @@ void Daemon::enableAutoStart(bool enable) // The return status doesn't report failure even if the daemon isn't running, // so in case of failure, rewrite the config file in any case. KConfig adconfig(locate("config", DAEMON_APP_NAME"rc")); - adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION)); - adconfig.writeEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), enable); + adconfig.setGroup(TQString::tqfromLatin1(DAEMON_AUTOSTART_SECTION)); + adconfig.writeEntry(TQString::tqfromLatin1(DAEMON_AUTOSTART_KEY), enable); adconfig.sync(); } @@ -437,8 +437,8 @@ void Daemon::notifyTimeChanged() bool Daemon::autoStart() { KConfig adconfig(locate("config", DAEMON_APP_NAME"rc")); - adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION)); - return adconfig.readBoolEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), true); + adconfig.setGroup(TQString::tqfromLatin1(DAEMON_AUTOSTART_SECTION)); + return adconfig.readBoolEntry(TQString::tqfromLatin1(DAEMON_AUTOSTART_KEY), true); } /****************************************************************************** @@ -491,8 +491,8 @@ bool Daemon::monitoringAlarms() bool Daemon::isRunning(bool startdaemon) { static bool runState = false; - updateRegisteredStatus(); - bool newRunState = (mStatus == READY || mStatus == REGISTERED); + updateRegisteredtqStatus(); + bool newRunState = (mtqStatus == READY || mtqStatus == REGISTERED); if (newRunState != runState) { // Daemon's status has changed @@ -500,7 +500,7 @@ bool Daemon::isRunning(bool startdaemon) if (runState && startdaemon) start(); // re-register with the daemon } - return runState && (mStatus == REGISTERED); + return runState && (mtqStatus == REGISTERED); } /****************************************************************************** @@ -666,10 +666,10 @@ NotificationHandler::NotificationHandler() * The daemon notifies calendar statuses when we first register as a GUI, and whenever * a calendar status changes. So we don't need to read its config files. */ -void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL) +void NotificationHandler::alarmDaemonUpdate(int calendartqStatus, const TQString& calendarURL) { - kdDebug(5950) << "NotificationHandler::alarmDaemonUpdate(" << calendarStatus << ")\n"; - KAlarmd::CalendarStatus status = KAlarmd::CalendarStatus(calendarStatus); + kdDebug(5950) << "NotificationHandler::alarmDaemonUpdate(" << calendartqStatus << ")\n"; + KAlarmd::CalendartqStatus status = KAlarmd::CalendartqStatus(calendartqStatus); if (expandURL(calendarURL) != AlarmCalendar::activeCalendar()->urlString()) return; // it's not a notification about KAlarm's calendar bool enabled = false; @@ -700,7 +700,7 @@ void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const TQString& void NotificationHandler::handleEvent(const TQString& url, const TQString& eventId) { TQString id = eventId; - if (id.startsWith(TQString::fromLatin1("ad:"))) + if (id.startsWith(TQString::tqfromLatin1("ad:"))) { // It's a notification from the alarm deamon id = id.mid(3); |