summaryrefslogtreecommitdiffstats
path: root/kalarm/daemon.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:34:45 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:34:45 -0600
commit0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78 (patch)
tree4138783f7dad757fc5fbfaa8d66a355288d3125e /kalarm/daemon.cpp
parent9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (diff)
downloadtdepim-0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78.tar.gz
tdepim-0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kalarm/daemon.cpp')
-rw-r--r--kalarm/daemon.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp
index 1f8820bff..a970b94e1 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 calendartqStatus, const TQString& calendarURL);
+ void alarmDaemonUpdate(int calendarStatus, 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::tqStatus Daemon::mtqStatus = Daemon::STOPPED;
+Daemon::Status Daemon::mStatus = 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";
- updateRegisteredtqStatus();
- switch (mtqStatus)
+ updateRegisteredStatus();
+ switch (mStatus)
{
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::tqfromLatin1(DAEMON_APP_NAME));
+ TQString execStr = locate("exe", TQString::fromLatin1(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 (mtqStatus)
+ switch (mStatus)
{
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.")
- .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME));
+ .tqarg(TQString::fromLatin1(DAEMON_APP_NAME));
}
else
{
@@ -236,7 +236,7 @@ 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.)")
- .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME))
+ .tqarg(TQString::fromLatin1(DAEMON_APP_NAME))
.tqarg(kapp->aboutData()->appName()));
break;
case KAlarmd::FAILURE:
@@ -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)")
- .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME));
+ .tqarg(TQString::fromLatin1(DAEMON_APP_NAME));
}
break;
}
@@ -258,8 +258,8 @@ void Daemon::registrationResult(bool reregister, int result, int version)
{
if (!errmsg.isEmpty())
{
- if (mtqStatus == REGISTERED)
- mtqStatus = READY;
+ if (mStatus == REGISTERED)
+ mStatus = 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
- mtqStatus = REGISTERED;
+ mStatus = 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()
{
- updateRegisteredtqStatus();
+ updateRegisteredStatus();
bool err = false;
- switch (mtqStatus)
+ switch (mStatus)
{
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)").tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)));
+ KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").tqarg(TQString::fromLatin1(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::updateRegisteredtqStatus(bool timeout)
+void Daemon::updateRegisteredStatus(bool timeout)
{
if (!kapp->dcopClient()->isApplicationRegistered(DAEMON_APP_NAME))
{
- mtqStatus = STOPPED;
+ mStatus = STOPPED;
mRegisterFailMsg = false;
}
else
{
- switch (mtqStatus)
+ switch (mStatus)
{
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.
- mtqStatus = RUNNING;
+ mStatus = RUNNING;
TQTimer::singleShot(startCheckInterval, mInstance, TQT_SLOT(slotStarted()));
break;
case RUNNING:
if (timeout)
{
- mtqStatus = READY;
+ mStatus = READY;
start();
}
break;
@@ -341,7 +341,7 @@ void Daemon::updateRegisteredtqStatus(bool timeout)
break;
}
}
- kdDebug(5950) << "Daemon::updateRegisteredStatus() -> " << mtqStatus << endl;
+ kdDebug(5950) << "Daemon::updateRegisteredStatus() -> " << mStatus << 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::tqfromLatin1(DAEMON_AUTOSTART_SECTION));
- adconfig.writeEntry(TQString::tqfromLatin1(DAEMON_AUTOSTART_KEY), enable);
+ adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
+ adconfig.writeEntry(TQString::fromLatin1(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::tqfromLatin1(DAEMON_AUTOSTART_SECTION));
- return adconfig.readBoolEntry(TQString::tqfromLatin1(DAEMON_AUTOSTART_KEY), true);
+ adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
+ return adconfig.readBoolEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), true);
}
/******************************************************************************
@@ -491,8 +491,8 @@ bool Daemon::monitoringAlarms()
bool Daemon::isRunning(bool startdaemon)
{
static bool runState = false;
- updateRegisteredtqStatus();
- bool newRunState = (mtqStatus == READY || mtqStatus == REGISTERED);
+ updateRegisteredStatus();
+ bool newRunState = (mStatus == READY || mStatus == 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 && (mtqStatus == REGISTERED);
+ return runState && (mStatus == 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 calendartqStatus, const TQString& calendarURL)
+void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL)
{
- kdDebug(5950) << "NotificationHandler::alarmDaemonUpdate(" << calendartqStatus << ")\n";
- KAlarmd::CalendartqStatus status = KAlarmd::CalendartqStatus(calendartqStatus);
+ kdDebug(5950) << "NotificationHandler::alarmDaemonUpdate(" << calendarStatus << ")\n";
+ KAlarmd::CalendarStatus status = KAlarmd::CalendarStatus(calendarStatus);
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 calendartqStatus, const TQString
void NotificationHandler::handleEvent(const TQString& url, const TQString& eventId)
{
TQString id = eventId;
- if (id.startsWith(TQString::tqfromLatin1("ad:")))
+ if (id.startsWith(TQString::fromLatin1("ad:")))
{
// It's a notification from the alarm deamon
id = id.mid(3);