summaryrefslogtreecommitdiffstats
path: root/kalarm/kalarmd
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/kalarmd')
-rw-r--r--kalarm/kalarmd/adapp.h1
-rw-r--r--kalarm/kalarmd/adcalendar.cpp8
-rw-r--r--kalarm/kalarmd/adcalendar.h1
-rw-r--r--kalarm/kalarmd/alarmdaemon.cpp34
-rw-r--r--kalarm/kalarmd/alarmdaemon.h7
-rw-r--r--kalarm/kalarmd/alarmguiiface.h6
-rw-r--r--kalarm/kalarmd/clientinfo.cpp4
7 files changed, 32 insertions, 29 deletions
diff --git a/kalarm/kalarmd/adapp.h b/kalarm/kalarmd/adapp.h
index 83d11d298..9e0cdc1d0 100644
--- a/kalarm/kalarmd/adapp.h
+++ b/kalarm/kalarmd/adapp.h
@@ -31,6 +31,7 @@ class AlarmDaemon;
class AlarmDaemonApp : public KUniqueApplication
{
Q_OBJECT
+ TQ_OBJECT
public:
AlarmDaemonApp();
virtual int newInstance();
diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp
index 1b738b043..2752a3689 100644
--- a/kalarm/kalarmd/adcalendar.cpp
+++ b/kalarm/kalarmd/adcalendar.cpp
@@ -115,7 +115,7 @@ void ADCalendar::slotDownloadJobResult(KIO::Job *job)
loadLocalFile(mTempFileName);
}
unlink(TQFile::encodeName(mTempFileName));
- mTempFileName = TQString::null;
+ mTempFileName = TQString();
emit loaded(this, mLoaded);
}
@@ -142,7 +142,7 @@ bool ADCalendar::setLoadedConnected()
*/
bool ADCalendar::eventHandled(const KCal::Event* event, const TQValueList<TQDateTime>& alarmtimes)
{
- EventsMap::ConstIterator it = mEventsHandled.find(EventKey(event->uid(), mUrlIndex));
+ EventsMap::ConstIterator it = mEventsHandled.tqfind(EventKey(event->uid(), mUrlIndex));
if (it == mEventsHandled.end())
return false;
@@ -170,7 +170,7 @@ void ADCalendar::setEventHandled(const TQString& eventID)
EventKey key(eventID, mUrlIndex);
// Remove it from the pending list, and add it to the handled list
- EventsMap::Iterator it = mEventsPending.find(key);
+ EventsMap::Iterator it = mEventsPending.tqfind(key);
if (it != mEventsPending.end())
{
setEventInMap(mEventsHandled, key, it.data().alarmTimes, it.data().eventSequence);
@@ -197,7 +197,7 @@ void ADCalendar::setEventPending(const KCal::Event* event, const TQValueList<TQD
*/
void ADCalendar::setEventInMap(EventsMap& map, const EventKey& key, const TQValueList<TQDateTime>& alarmtimes, int sequence)
{
- EventsMap::Iterator it = map.find(key);
+ EventsMap::Iterator it = map.tqfind(key);
if (it != map.end())
{
// Update the existing entry for the event
diff --git a/kalarm/kalarmd/adcalendar.h b/kalarm/kalarmd/adcalendar.h
index 67e2fac92..51506d46d 100644
--- a/kalarm/kalarmd/adcalendar.h
+++ b/kalarm/kalarmd/adcalendar.h
@@ -30,6 +30,7 @@ class ADCalendar;
class ADCalendar : public KCal::CalendarLocal
{
Q_OBJECT
+ TQ_OBJECT
public:
typedef TQValueList<ADCalendar*>::ConstIterator ConstIterator;
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<KCal::Event*> eventsDone;
for (TQValueList<KCal::Alarm*>::ConstIterator it = alarms.begin(); it != alarms.end(); ++it)
{
- KCal::Event* event = dynamic_cast<KCal::Event*>((*it)->parent());
- if (!event || eventsDone.find(event) != eventsDone.end())
+ KCal::Event* event = dynamic_cast<KCal::Event*>((*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<const char*>(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;
}
}
diff --git a/kalarm/kalarmd/alarmdaemon.h b/kalarm/kalarmd/alarmdaemon.h
index 54e7980a2..c05a4725c 100644
--- a/kalarm/kalarmd/alarmdaemon.h
+++ b/kalarm/kalarmd/alarmdaemon.h
@@ -32,8 +32,9 @@ class ADCalendar;
class AlarmDaemon : public TQObject, virtual public AlarmDaemonIface
{
Q_OBJECT
+ TQ_OBJECT
public:
- AlarmDaemon(bool autostart, TQObject* parent = 0, const char* name = 0);
+ AlarmDaemon(bool autostart, TQObject* tqparent = 0, const char* name = 0);
private slots:
//#ifdef AUTOSTART_KALARM
@@ -66,8 +67,8 @@ class AlarmDaemon : public TQObject, virtual public AlarmDaemonIface
void reloadCal(ADCalendar*, bool reset);
void checkAlarms(ADCalendar*);
bool notifyEvent(ADCalendar*, const TQString& eventID);
- void notifyCalStatus(const ADCalendar*);
- void setTimerStatus();
+ void notifyCaltqStatus(const ADCalendar*);
+ void setTimertqStatus();
static TQString expandURL(const TQString& urlString);
TQTimer* mAlarmTimer;
diff --git a/kalarm/kalarmd/alarmguiiface.h b/kalarm/kalarmd/alarmguiiface.h
index d221fd345..49a467008 100644
--- a/kalarm/kalarmd/alarmguiiface.h
+++ b/kalarm/kalarmd/alarmguiiface.h
@@ -35,7 +35,7 @@ namespace KAlarmd
NOT_FOUND = 2 // notification type requires client start, but client executable not found
};
- enum CalendarStatus // parameters to client notification
+ enum CalendartqStatus // parameters to client notification
{
CALENDAR_ENABLED, // calendar is now being monitored
CALENDAR_DISABLED, // calendar is available but not being monitored
@@ -53,9 +53,9 @@ class AlarmGuiIface : virtual public DCOPObject
K_DCOP
k_dcop:
/** Called to notify a change in status of the calendar.
- @param calendarStatus new calendar status. Value is of type CalendarStatus.
+ @param calendartqStatus new calendar status. Value is of type CalendartqStatus.
*/
- virtual ASYNC alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL) = 0;
+ virtual ASYNC alarmDaemonUpdate(int calendartqStatus, const TQString& calendarURL) = 0;
/** Called to notify that an alarm is due.
*/
diff --git a/kalarm/kalarmd/clientinfo.cpp b/kalarm/kalarmd/clientinfo.cpp
index e8c5ea6c7..5475cce57 100644
--- a/kalarm/kalarmd/clientinfo.cpp
+++ b/kalarm/kalarmd/clientinfo.cpp
@@ -72,7 +72,7 @@ ClientInfo* ClientInfo::get(const TQCString& appName)
{
if (appName.isEmpty())
return 0;
- TQMap<TQCString, ClientInfo*>::ConstIterator it = mClients.find(appName);
+ TQMap<TQCString, ClientInfo*>::ConstIterator it = mClients.tqfind(appName);
if (it == mClients.end())
return 0;
return it.data();
@@ -104,7 +104,7 @@ void ClientInfo::clear()
*/
void ClientInfo::remove(const TQCString& appName)
{
- TQMap<TQCString, ClientInfo*>::Iterator it = mClients.find(appName);
+ TQMap<TQCString, ClientInfo*>::Iterator it = mClients.tqfind(appName);
if (it != mClients.end())
delete it.data();
}