summaryrefslogtreecommitdiffstats
path: root/kalarm/kalarmapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/kalarmapp.cpp')
-rw-r--r--kalarm/kalarmapp.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp
index a0f008f0..fd81aed4 100644
--- a/kalarm/kalarmapp.cpp
+++ b/kalarm/kalarmapp.cpp
@@ -436,7 +436,7 @@ int KAlarmApp::newInstance()
TQString addr = TQString::fromLocal8Bit(*i);
if (!KAMail::checkAddress(addr))
USAGE(i18n("%1: invalid email address").arg(TQString::tqfromLatin1("--mail")))
- alAddresses += KCal::Person(TQString::null, addr);
+ alAddresses += KCal::Person(TQString(), addr);
}
params = args->getOptionList("attach");
for (QCStringList::Iterator i = params.begin(); i != params.end(); ++i)
@@ -788,7 +788,7 @@ void KAlarmApp::quitIf(int exitCode, bool force)
MainWindow* mw = mwcount ? MainWindow::firstWindow() : 0;
if (mwcount > 1 || mwcount && (!mw->isHidden() || !mw->isTrayParent()))
return;
- // There are no windows left except perhaps a main window which is a hidden tray icon parent
+ // There are no windows left except perhaps a main window which is a hidden tray icon tqparent
if (mTrayWindow)
{
// There is a system tray icon.
@@ -816,13 +816,13 @@ void KAlarmApp::quitIf(int exitCode, bool force)
* Closes the system tray window and all main windows, but does not exit the
* program if other windows are still open.
*/
-void KAlarmApp::doQuit(TQWidget* parent)
+void KAlarmApp::doQuit(TQWidget* tqparent)
{
kdDebug(5950) << "KAlarmApp::doQuit()\n";
if (mDisableAlarmsIfStopped
- && MessageBox::warningContinueCancel(parent, KMessageBox::Cancel,
+ && MessageBox::warningContinueCancel(tqparent, KMessageBox::Cancel,
i18n("Quitting will disable alarms\n(once any alarm message windows are closed)."),
- TQString::null, KStdGuiItem::quit(), Preferences::QUIT_WARN
+ TQString(), KStdGuiItem::quit(), Preferences::TQUIT_WARN
) != KMessageBox::Yes)
return;
quitIf(0, true);
@@ -831,7 +831,7 @@ void KAlarmApp::doQuit(TQWidget* parent)
/******************************************************************************
* Called when the session manager is about to close down the application.
*/
-void KAlarmApp::commitData(QSessionManager& sm)
+void KAlarmApp::commitData(TQSessionManager& sm)
{
mSessionClosingDown = true;
KUniqueApplication::commitData(sm);
@@ -901,7 +901,7 @@ void KAlarmApp::processQueue()
// Process DCOP calls
while (!mDcopQueue.isEmpty())
{
- DcopQEntry& entry = mDcopQueue.first();
+ DcopTQEntry& entry = mDcopQueue.first();
if (entry.eventId.isEmpty())
{
// It's a new alarm
@@ -973,7 +973,7 @@ void KAlarmApp::removeWindow(TrayWindow*)
/******************************************************************************
* Display or close the system tray icon.
*/
-bool KAlarmApp::displayTrayIcon(bool show, MainWindow* parent)
+bool KAlarmApp::displayTrayIcon(bool show, MainWindow* tqparent)
{
static bool creating = false;
if (show)
@@ -985,10 +985,10 @@ bool KAlarmApp::displayTrayIcon(bool show, MainWindow* parent)
if (!MainWindow::count() && wantRunInSystemTray())
{
creating = true; // prevent main window constructor from creating an additional tray icon
- parent = MainWindow::create();
+ tqparent = MainWindow::create();
creating = false;
}
- mTrayWindow = new TrayWindow(parent ? parent : MainWindow::firstWindow());
+ mTrayWindow = new TrayWindow(tqparent ? tqparent : MainWindow::firstWindow());
connect(mTrayWindow, TQT_SIGNAL(deleted()), TQT_SIGNAL(trayIconToggled()));
mTrayWindow->show();
emit trayIconToggled();
@@ -1199,7 +1199,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::Action action, const TQString& text, cons
// Alarm is due for display already.
// First execute it once without adding it to the calendar file.
if (!mInitialised)
- mDcopQueue.append(DcopQEntry(event, EVENT_TRIGGER));
+ mDcopQueue.append(DcopTQEntry(event, EVENT_TRIGGER));
else
execAlarm(event, event.firstAlarm(), false);
// If it's a recurring alarm, reschedule it for its next occurrence
@@ -1210,7 +1210,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::Action action, const TQString& text, cons
}
// Queue the alarm for insertion into the calendar file
- mDcopQueue.append(DcopQEntry(event));
+ mDcopQueue.append(DcopTQEntry(event));
if (mInitialised)
TQTimer::singleShot(0, this, TQT_SLOT(processQueue()));
return true;
@@ -1232,7 +1232,7 @@ bool KAlarmApp::handleEvent(const TQString& urlString, const TQString& eventID,
Daemon::eventHandled(eventID, false);
return false;
}
- mDcopQueue.append(DcopQEntry(function, eventID));
+ mDcopQueue.append(DcopTQEntry(function, eventID));
if (mInitialised)
TQTimer::singleShot(0, this, TQT_SLOT(processQueue()));
return true;
@@ -1592,9 +1592,9 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
MessageWin* win = MessageWin::findEvent(event.id());
// Find if we're changing a reminder message to the real message
bool reminder = (alarm.type() & KAAlarm::REMINDER_ALARM);
- bool tqreplaceReminder = !reminder && win && (win->alarmType() & KAAlarm::REMINDER_ALARM);
+ bool replaceReminder = !reminder && win && (win->alarmType() & KAAlarm::REMINDER_ALARM);
if (!reminder && !event.deferred()
- && (tqreplaceReminder || !win) && !noPreAction
+ && (replaceReminder || !win) && !noPreAction
&& !event.preAction().isEmpty() && ShellProcess::authorised())
{
// It's not a reminder or a deferred alarm, and there is no message window
@@ -1622,11 +1622,11 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
delete win; // event is disabled - close its window
else if (!win
|| !win->hasDefer() && !alarm.repeatAtLogin()
- || tqreplaceReminder)
+ || replaceReminder)
{
// Either there isn't already a message for this event,
// or there is a repeat-at-login message with no Defer
- // button, which needs to be tqreplaced with a new message,
+ // button, which needs to be replaced with a new message,
// or the caption needs to be changed from "Reminder" to "Message".
if (win)
win->setRecreating(); // prevent post-alarm actions
@@ -1705,7 +1705,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
// Execute the command in a terminal window.
cmd = Preferences::cmdXTermCommand();
cmd.tqreplace("%t", aboutData()->programName()); // set the terminal window title
- if (cmd.find("%C") >= 0)
+ if (cmd.tqfind("%C") >= 0)
{
// Execute the command from a temporary script file
if (flags & ProcData::TEMP_FILE)
@@ -1718,7 +1718,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
cmd.tqreplace("%C", tmpXtermFile); // %C indicates where to insert the command
}
}
- else if (cmd.find("%W") >= 0)
+ else if (cmd.tqfind("%W") >= 0)
{
// Execute the command from a temporary script file,
// with a sleep after the command is executed
@@ -1727,19 +1727,19 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
return 0;
cmd.tqreplace("%W", tmpXtermFile); // %w indicates where to insert the command
}
- else if (cmd.find("%w") >= 0)
+ else if (cmd.tqfind("%w") >= 0)
{
// Append a sleep to the command.
- // Quote the command in case it tqcontains characters such as [>|;].
+ // Quote the command in case it contains characters such as [>|;].
TQString exec = KShellProcess::quote(command + TQString::tqfromLatin1("; sleep 86400"));
cmd.tqreplace("%w", exec); // %w indicates where to insert the command string
}
else
{
// Set the command to execute.
- // Put it in quotes in case it tqcontains characters such as [>|;].
+ // Put it in quotes in case it contains characters such as [>|;].
TQString exec = KShellProcess::quote(command);
- if (cmd.find("%c") >= 0)
+ if (cmd.tqfind("%c") >= 0)
cmd.tqreplace("%c", exec); // %c indicates where to insert the command string
else
cmd.append(exec); // otherwise, simply append the command string
@@ -1797,7 +1797,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
*/
TQString KAlarmApp::createTempScriptFile(const TQString& command, bool insertShell, const KAEvent& event, const KAAlarm& alarm)
{
- KTempFile tmpFile(TQString::null, TQString::null, 0700);
+ KTempFile tmpFile(TQString(), TQString(), 0700);
tmpFile.setAutoDelete(false); // don't delete file when it is destructed
TQTextStream* stream = tmpFile.textStream();
if (!stream)
@@ -1816,7 +1816,7 @@ TQString KAlarmApp::createTempScriptFile(const TQString& command, bool insertShe
TQStringList errmsgs(i18n("Error creating temporary script file"));
(new MessageWin(event, alarm.dateTime(), errmsgs))->show();
- return TQString::null;
+ return TQString();
}
/******************************************************************************
@@ -1917,7 +1917,7 @@ void KAlarmApp::commandErrorMsg(const ShellProcess* proc, const KAEvent& event,
/******************************************************************************
* Notes that an informational KMessageBox is displayed for this process.
*/
-void KAlarmApp::commandMessage(ShellProcess* proc, TQWidget* parent)
+void KAlarmApp::commandMessage(ShellProcess* proc, TQWidget* tqparent)
{
// Find this command in the command list
for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
@@ -1925,7 +1925,7 @@ void KAlarmApp::commandMessage(ShellProcess* proc, TQWidget* parent)
ProcData* pd = *it;
if (pd->process == proc)
{
- pd->messageBoxParent = parent;
+ pd->messageBoxParent = tqparent;
break;
}
}
@@ -2118,7 +2118,7 @@ static bool convInterval(const TQCString& timeParam, KARecurrence::Type& recurTy
break;
case 'M':
{
- int i = timeString.find('H');
+ int i = timeString.tqfind('H');
if (i < 0)
{
if (!allowMonthYear)