summaryrefslogtreecommitdiffstats
path: root/kalarm/daemon.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kalarm/daemon.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
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
Diffstat (limited to 'kalarm/daemon.cpp')
-rw-r--r--kalarm/daemon.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp
index a129de8a3..f3a466ea7 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:
{
@@ -173,7 +173,7 @@ bool Daemon::registerWith(bool reregister)
{
if (mRegisterTimer)
return true;
- switch (mStatus)
+ switch (mtqStatus)
{
case STOPPED:
case RUNNING:
@@ -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)
@@ -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::updateRegisteredtqStatus() -> " << mtqStatus << endl;
}
/******************************************************************************
@@ -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;
@@ -723,8 +723,8 @@ void NotificationHandler::registered(bool reregister, int result, int version)
= Class: AlarmEnableAction
=============================================================================*/
-AlarmEnableAction::AlarmEnableAction(int accel, TQObject* parent, const char* name)
- : KToggleAction(i18n("Enable &Alarms"), accel, parent, name),
+AlarmEnableAction::AlarmEnableAction(int accel, TQObject* tqparent, const char* name)
+ : KToggleAction(i18n("Enable &Alarms"), accel, tqparent, name),
mInitialised(false)
{
setCheckedState(i18n("Disable &Alarms"));