summaryrefslogtreecommitdiffstats
path: root/kalarm/daemon.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
commit3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch)
tree89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kalarm/daemon.cpp
parent1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff)
downloadtdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz
tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kalarm/daemon.cpp')
-rw-r--r--kalarm/daemon.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp
index 1f8820bff..4ad785552 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));
+ .arg(TQString::fromLatin1(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.)")
- .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME))
- .tqarg(kapp->aboutData()->appName()));
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME))
+ .arg(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)")
- .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME));
+ .arg(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)").arg(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);