diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /kalarm/kalarmapp.cpp | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/kalarmapp.cpp')
-rw-r--r-- | kalarm/kalarmapp.cpp | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp index 7607892d..a0f008f0 100644 --- a/kalarm/kalarmapp.cpp +++ b/kalarm/kalarmapp.cpp @@ -121,8 +121,8 @@ KAlarmApp::KAlarmApp() connect(AlarmCalendar::expiredCalendar(), TQT_SIGNAL(purged()), TQT_SLOT(slotExpiredPurged())); KConfig* config = kapp->config(); - config->setGroup(TQString::fromLatin1("General")); - mNoSystemTray = config->readBoolEntry(TQString::fromLatin1("NoSystemTray"), false); + config->setGroup(TQString::tqfromLatin1("General")); + mNoSystemTray = config->readBoolEntry(TQString::tqfromLatin1("NoSystemTray"), false); mSavedNoSystemTray = mNoSystemTray; mOldRunInSystemTray = wantRunInSystemTray(); mDisableAlarmsIfStopped = mOldRunInSystemTray && !mNoSystemTray && Preferences::disableAlarmsIfStopped(); @@ -139,7 +139,7 @@ KAlarmApp::KAlarmApp() if (!mSpeechEnabled) kdDebug(5950) << "KAlarmApp::KAlarmApp(): speech synthesis disabled (KTTSD not found)" << endl; // Check if KOrganizer is installed - TQString korg = TQString::fromLatin1("korganizer"); + TQString korg = TQString::tqfromLatin1("korganizer"); mKOrganizerEnabled = !locate("exe", korg).isNull() || !KStandardDirs::findExe(korg).isNull(); if (!mKOrganizerEnabled) kdDebug(5950) << "KAlarmApp::KAlarmApp(): KOrganizer options disabled (KOrganizer not found)" << endl; @@ -205,7 +205,7 @@ bool KAlarmApp::restoreSession() for (int i = 1; KMainWindow::canBeRestored(i); ++i) { TQString type = KMainWindow::classNameOfToplevel(i); - if (type == TQString::fromLatin1("MainWindow")) + if (type == TQString::tqfromLatin1("MainWindow")) { MainWindow* win = MainWindow::create(true); win->restore(i, false); @@ -214,7 +214,7 @@ bool KAlarmApp::restoreSession() else win->show(); } - else if (type == TQString::fromLatin1("MessageWin")) + else if (type == TQString::tqfromLatin1("MessageWin")) { MessageWin* win = new MessageWin; win->restore(i, false); @@ -329,9 +329,9 @@ int KAlarmApp::newInstance() if (args->isSet("triggerEvent")) { function = EVENT_TRIGGER; option = "triggerEvent"; ++count; } if (args->isSet("cancelEvent")) { function = EVENT_CANCEL; option = "cancelEvent"; ++count; } if (!count) - USAGE(i18n("%1 requires %2, %3 or %4").arg(TQString::fromLatin1("--calendarURL")).arg(TQString::fromLatin1("--handleEvent")).arg(TQString::fromLatin1("--triggerEvent")).arg(TQString::fromLatin1("--cancelEvent"))) + USAGE(i18n("%1 requires %2, %3 or %4").arg(TQString::tqfromLatin1("--calendarURL")).arg(TQString::tqfromLatin1("--handleEvent")).arg(TQString::tqfromLatin1("--triggerEvent")).arg(TQString::tqfromLatin1("--cancelEvent"))) if (count > 1) - USAGE(i18n("%1, %2, %3 mutually exclusive").arg(TQString::fromLatin1("--handleEvent")).arg(TQString::fromLatin1("--triggerEvent")).arg(TQString::fromLatin1("--cancelEvent"))); + USAGE(i18n("%1, %2, %3 mutually exclusive").arg(TQString::tqfromLatin1("--handleEvent")).arg(TQString::tqfromLatin1("--triggerEvent")).arg(TQString::tqfromLatin1("--cancelEvent"))); if (!initCheck(true)) // open the calendar, don't register with daemon yet { exitCode = 1; @@ -341,11 +341,11 @@ int KAlarmApp::newInstance() { TQString calendarUrl = args->getOption("calendarURL"); if (KURL(calendarUrl).url() != AlarmCalendar::activeCalendar()->urlString()) - USAGE(i18n("%1: wrong calendar file").arg(TQString::fromLatin1("--calendarURL"))) + USAGE(i18n("%1: wrong calendar file").arg(TQString::tqfromLatin1("--calendarURL"))) } TQString eventID = args->getOption(option); args->clear(); // free up memory - if (eventID.startsWith(TQString::fromLatin1("ad:"))) + if (eventID.startsWith(TQString::tqfromLatin1("ad:"))) { // It's a notification from the alarm deamon eventID = eventID.mid(3); @@ -369,7 +369,7 @@ int KAlarmApp::newInstance() } if (!KAlarm::edit(eventID)) { - USAGE(i18n("%1: Event %2 not found, or not editable").arg(TQString::fromLatin1("--edit")).arg(eventID)) + USAGE(i18n("%1: Event %2 not found, or not editable").arg(TQString::tqfromLatin1("--edit")).arg(eventID)) exitCode = 1; break; } @@ -401,11 +401,11 @@ int KAlarmApp::newInstance() { kdDebug(5950)<<"KAlarmApp::newInstance(): file\n"; if (args->isSet("exec")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--exec")).arg(TQString::fromLatin1("--file"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--exec")).arg(TQString::tqfromLatin1("--file"))) if (args->isSet("mail")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--file"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--mail")).arg(TQString::tqfromLatin1("--file"))) if (args->count()) - USAGE(i18n("message incompatible with %1").arg(TQString::fromLatin1("--file"))) + USAGE(i18n("message incompatible with %1").arg(TQString::tqfromLatin1("--file"))) alMessage = args->getOption("file"); action = KAEvent::FILE; } @@ -413,7 +413,7 @@ int KAlarmApp::newInstance() { kdDebug(5950)<<"KAlarmApp::newInstance(): exec\n"; if (args->isSet("mail")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--exec"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--mail")).arg(TQString::tqfromLatin1("--exec"))) alMessage = args->getOption("exec"); int n = args->count(); for (int i = 0; i < n; ++i) @@ -435,7 +435,7 @@ int KAlarmApp::newInstance() { TQString addr = TQString::fromLocal8Bit(*i); if (!KAMail::checkAddress(addr)) - USAGE(i18n("%1: invalid email address").arg(TQString::fromLatin1("--mail"))) + USAGE(i18n("%1: invalid email address").arg(TQString::tqfromLatin1("--mail"))) alAddresses += KCal::Person(TQString::null, addr); } params = args->getOptionList("attach"); @@ -453,13 +453,13 @@ int KAlarmApp::newInstance() if (action != KAEvent::EMAIL) { if (args->isSet("subject")) - USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--subject")).arg(TQString::fromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--subject")).arg(TQString::tqfromLatin1("--mail"))) if (args->isSet("from-id")) - USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--from-id")).arg(TQString::fromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--from-id")).arg(TQString::tqfromLatin1("--mail"))) if (args->isSet("attach")) - USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--attach")).arg(TQString::fromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--attach")).arg(TQString::tqfromLatin1("--mail"))) if (args->isSet("bcc")) - USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--bcc")).arg(TQString::fromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--bcc")).arg(TQString::tqfromLatin1("--mail"))) } bool alarmNoTime = false; @@ -475,10 +475,10 @@ int KAlarmApp::newInstance() TQCString colourText = args->getOption("color"); if (static_cast<const char*>(colourText)[0] == '0' && tolower(static_cast<const char*>(colourText)[1]) == 'x') - colourText.replace(0, 2, "#"); + colourText.tqreplace(0, 2, "#"); bgColour.setNamedColor(colourText); if (!bgColour.isValid()) - USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--color"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--color"))) } if (args->isSet("colorfg")) { @@ -486,28 +486,28 @@ int KAlarmApp::newInstance() TQCString colourText = args->getOption("colorfg"); if (static_cast<const char*>(colourText)[0] == '0' && tolower(static_cast<const char*>(colourText)[1]) == 'x') - colourText.replace(0, 2, "#"); + colourText.tqreplace(0, 2, "#"); fgColour.setNamedColor(colourText); if (!fgColour.isValid()) - USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--colorfg"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--colorfg"))) } if (args->isSet("time")) { TQCString dateTime = args->getOption("time"); if (!convWakeTime(dateTime, alarmTime, alarmNoTime)) - USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--time"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--time"))) } else - alarmTime = TQDateTime::currentDateTime(); + alarmTime = TQDateTime::tqcurrentDateTime(); bool haveRecurrence = args->isSet("recurrence"); if (haveRecurrence) { if (args->isSet("login")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--login")).arg(TQString::fromLatin1("--recurrence"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--login")).arg(TQString::tqfromLatin1("--recurrence"))) if (args->isSet("until")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--recurrence"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--until")).arg(TQString::tqfromLatin1("--recurrence"))) TQCString rule = args->getOption("recurrence"); recurrence.set(TQString::fromLocal8Bit(static_cast<const char*>(rule))); } @@ -516,24 +516,24 @@ int KAlarmApp::newInstance() // Repeat count is specified int count; if (args->isSet("login")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--login")).arg(TQString::fromLatin1("--interval"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--login")).arg(TQString::tqfromLatin1("--interval"))) bool ok; if (args->isSet("repeat")) { count = args->getOption("repeat").toInt(&ok); if (!ok || !count || count < -1 || (count < 0 && haveRecurrence)) - USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--repeat"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--repeat"))) } else if (haveRecurrence) - USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--interval")).arg(TQString::fromLatin1("--repeat"))) + USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--interval")).arg(TQString::tqfromLatin1("--repeat"))) else if (args->isSet("until")) { count = 0; TQCString dateTime = args->getOption("until"); if (!convWakeTime(dateTime, endTime, alarmNoTime)) - USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--until"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--until"))) if (endTime < alarmTime) - USAGE(i18n("%1 earlier than %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--time"))) + USAGE(i18n("%1 earlier than %2").arg(TQString::tqfromLatin1("--until")).arg(TQString::tqfromLatin1("--time"))) } else count = -1; @@ -543,16 +543,16 @@ int KAlarmApp::newInstance() KARecurrence::Type recurType; if (!convInterval(args->getOption("interval"), recurType, interval, !haveRecurrence) || interval < 0) - USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--interval"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--interval"))) if (alarmNoTime && recurType == KARecurrence::MINUTELY) - USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(TQString::fromLatin1("--interval"))) + USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(TQString::tqfromLatin1("--interval"))) if (haveRecurrence) { // There is a also a recurrence specified, so set up a sub-repetition int longestInterval = recurrence.longestInterval(); if (count * interval > longestInterval) - USAGE(i18n("Invalid %1 and %2 parameters: repetition is longer than %3 interval").arg(TQString::fromLatin1("--interval")).arg(TQString::fromLatin1("--repeat")).arg(TQString::fromLatin1("--recurrence"))); + USAGE(i18n("Invalid %1 and %2 parameters: repetition is longer than %3 interval").arg(TQString::tqfromLatin1("--interval")).arg(TQString::tqfromLatin1("--repeat")).arg(TQString::tqfromLatin1("--recurrence"))); repeatCount = count; repeatInterval = interval; } @@ -566,9 +566,9 @@ int KAlarmApp::newInstance() else { if (args->isSet("repeat")) - USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--repeat")).arg(TQString::fromLatin1("--interval"))) + USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--repeat")).arg(TQString::tqfromLatin1("--interval"))) if (args->isSet("until")) - USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--interval"))) + USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--until")).arg(TQString::tqfromLatin1("--interval"))) } TQCString audioFile; @@ -582,11 +582,11 @@ int KAlarmApp::newInstance() { // Play a sound with the alarm if (audioRepeat && args->isSet("play")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--play")).arg(TQString::fromLatin1("--play-repeat"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--play")).arg(TQString::tqfromLatin1("--play-repeat"))) if (args->isSet("beep")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--beep")).arg(TQString::fromLatin1(audioRepeat ? "--play-repeat" : "--play"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--beep")).arg(TQString::tqfromLatin1(audioRepeat ? "--play-repeat" : "--play"))) if (args->isSet("speak")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--speak")).arg(TQString::fromLatin1(audioRepeat ? "--play-repeat" : "--play"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--speak")).arg(TQString::tqfromLatin1(audioRepeat ? "--play-repeat" : "--play"))) audioFile = args->getOption(audioRepeat ? "play-repeat" : "play"); #ifndef WITHOUT_ARTS if (args->isSet("volume")) @@ -594,21 +594,21 @@ int KAlarmApp::newInstance() bool ok; int volumepc = args->getOption("volume").toInt(&ok); if (!ok || volumepc < 0 || volumepc > 100) - USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--volume"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--volume"))) audioVolume = static_cast<float>(volumepc) / 100; } #endif } #ifndef WITHOUT_ARTS else if (args->isSet("volume")) - USAGE(i18n("%1 requires %2 or %3").arg(TQString::fromLatin1("--volume")).arg(TQString::fromLatin1("--play")).arg(TQString::fromLatin1("--play-repeat"))) + USAGE(i18n("%1 requires %2 or %3").arg(TQString::tqfromLatin1("--volume")).arg(TQString::tqfromLatin1("--play")).arg(TQString::tqfromLatin1("--play-repeat"))) #endif if (args->isSet("speak")) { if (args->isSet("beep")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--beep")).arg(TQString::fromLatin1("--speak"))) + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--beep")).arg(TQString::tqfromLatin1("--speak"))) if (!mSpeechEnabled) - USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").arg(TQString::fromLatin1("--speak"))) + USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").arg(TQString::tqfromLatin1("--speak"))) } int reminderMinutes = 0; bool onceOnly = args->isSet("reminder-once"); @@ -616,12 +616,12 @@ int KAlarmApp::newInstance() { // Issue a reminder alarm in advance of the main alarm if (onceOnly && args->isSet("reminder")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--reminder")).arg(TQString::fromLatin1("--reminder-once"))) - TQString opt = onceOnly ? TQString::fromLatin1("--reminder-once") : TQString::fromLatin1("--reminder"); + USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--reminder")).arg(TQString::tqfromLatin1("--reminder-once"))) + TQString opt = onceOnly ? TQString::tqfromLatin1("--reminder-once") : TQString::tqfromLatin1("--reminder"); if (args->isSet("exec")) - USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--exec"))) + USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::tqfromLatin1("--exec"))) if (args->isSet("mail")) - USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--mail"))) + USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::tqfromLatin1("--mail"))) KARecurrence::Type recurType; TQString optval = args->getOption(onceOnly ? "reminder-once" : "reminder"); if (!convInterval(args->getOption(onceOnly ? "reminder-once" : "reminder"), recurType, reminderMinutes)) @@ -636,10 +636,10 @@ int KAlarmApp::newInstance() KARecurrence::Type recurType; bool ok = convInterval(args->getOption("late-cancel"), recurType, lateCancel); if (!ok || lateCancel <= 0) - USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("late-cancel"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("late-cancel"))) } else if (args->isSet("auto-close")) - USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--auto-close")).arg(TQString::fromLatin1("--late-cancel"))) + USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--auto-close")).arg(TQString::tqfromLatin1("--late-cancel"))) int flags = KAEvent::DEFAULT_FONT; if (args->isSet("ack-confirm")) @@ -683,52 +683,52 @@ int KAlarmApp::newInstance() // No arguments - run interactively & display the main window kdDebug(5950)<<"KAlarmApp::newInstance(): interactive\n"; if (args->isSet("ack-confirm")) - usage += TQString::fromLatin1("--ack-confirm "); + usage += TQString::tqfromLatin1("--ack-confirm "); if (args->isSet("attach")) - usage += TQString::fromLatin1("--attach "); + usage += TQString::tqfromLatin1("--attach "); if (args->isSet("auto-close")) - usage += TQString::fromLatin1("--auto-close "); + usage += TQString::tqfromLatin1("--auto-close "); if (args->isSet("bcc")) - usage += TQString::fromLatin1("--bcc "); + usage += TQString::tqfromLatin1("--bcc "); if (args->isSet("beep")) - usage += TQString::fromLatin1("--beep "); + usage += TQString::tqfromLatin1("--beep "); if (args->isSet("color")) - usage += TQString::fromLatin1("--color "); + usage += TQString::tqfromLatin1("--color "); if (args->isSet("colorfg")) - usage += TQString::fromLatin1("--colorfg "); + usage += TQString::tqfromLatin1("--colorfg "); if (args->isSet("disable")) - usage += TQString::fromLatin1("--disable "); + usage += TQString::tqfromLatin1("--disable "); if (args->isSet("from-id")) - usage += TQString::fromLatin1("--from-id "); + usage += TQString::tqfromLatin1("--from-id "); if (args->isSet("korganizer")) - usage += TQString::fromLatin1("--korganizer "); + usage += TQString::tqfromLatin1("--korganizer "); if (args->isSet("late-cancel")) - usage += TQString::fromLatin1("--late-cancel "); + usage += TQString::tqfromLatin1("--late-cancel "); if (args->isSet("login")) - usage += TQString::fromLatin1("--login "); + usage += TQString::tqfromLatin1("--login "); if (args->isSet("play")) - usage += TQString::fromLatin1("--play "); + usage += TQString::tqfromLatin1("--play "); #ifndef WITHOUT_ARTS if (args->isSet("play-repeat")) - usage += TQString::fromLatin1("--play-repeat "); + usage += TQString::tqfromLatin1("--play-repeat "); #endif if (args->isSet("reminder")) - usage += TQString::fromLatin1("--reminder "); + usage += TQString::tqfromLatin1("--reminder "); if (args->isSet("reminder-once")) - usage += TQString::fromLatin1("--reminder-once "); + usage += TQString::tqfromLatin1("--reminder-once "); if (args->isSet("speak")) - usage += TQString::fromLatin1("--speak "); + usage += TQString::tqfromLatin1("--speak "); if (args->isSet("subject")) - usage += TQString::fromLatin1("--subject "); + usage += TQString::tqfromLatin1("--subject "); if (args->isSet("time")) - usage += TQString::fromLatin1("--time "); + usage += TQString::tqfromLatin1("--time "); #ifndef WITHOUT_ARTS if (args->isSet("volume")) - usage += TQString::fromLatin1("--volume "); + usage += TQString::tqfromLatin1("--volume "); #endif if (!usage.isEmpty()) { - usage += i18n(": option(s) only valid with a message/%1/%2").arg(TQString::fromLatin1("--file")).arg(TQString::fromLatin1("--exec")); + usage += i18n(": option(s) only valid with a message/%1/%2").arg(TQString::tqfromLatin1("--file")).arg(TQString::tqfromLatin1("--exec")); break; } @@ -1043,8 +1043,8 @@ bool KAlarmApp::checkSystemTray() // tray and alarms are disabled when KAlarm is not running, registering with // NO_START_NOTIFY could result in alarms never being seen. KConfig* config = kapp->config(); - config->setGroup(TQString::fromLatin1("General")); - config->writeEntry(TQString::fromLatin1("NoSystemTray"), mNoSystemTray); + config->setGroup(TQString::tqfromLatin1("General")); + config->writeEntry(TQString::tqfromLatin1("NoSystemTray"), mNoSystemTray); config->sync(); // Update other settings and reregister with the alarm daemon @@ -1174,7 +1174,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::Action action, const TQString& text, cons kdDebug(5950) << "KAlarmApp::scheduleEvent(): " << text << endl; if (!dateTime.isValid()) return false; - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); if (lateCancel && dateTime < now.addSecs(-maxLateness(lateCancel))) return true; // alarm time was already expired too long ago TQDateTime alarmTime = dateTime; @@ -1266,7 +1266,7 @@ bool KAlarmApp::handleEvent(const TQString& eventID, EventFunc function) case EVENT_TRIGGER: // handle it if it's due, else execute it regardless case EVENT_HANDLE: // handle it if it's due { - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); bool updateCalAndDisplay = false; bool alarmToExecuteValid = false; KAAlarm alarmToExecute; @@ -1502,7 +1502,7 @@ void KAlarmApp::rescheduleAlarm(KAEvent& event, const KAAlarm& alarm, bool updat else { // Reschedule the alarm for its next recurrence. - KAEvent::OccurType type = event.setNextOccurrence(TQDateTime::currentDateTime()); + KAEvent::OccurType type = event.setNextOccurrence(TQDateTime::tqcurrentDateTime()); switch (type) { case KAEvent::NO_OCCURRENCE: @@ -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 replaceReminder = !reminder && win && (win->alarmType() & KAAlarm::REMINDER_ALARM); + bool tqreplaceReminder = !reminder && win && (win->alarmType() & KAAlarm::REMINDER_ALARM); if (!reminder && !event.deferred() - && (replaceReminder || !win) && !noPreAction + && (tqreplaceReminder || !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() - || replaceReminder) + || tqreplaceReminder) { // 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 replaced with a new message, + // button, which needs to be tqreplaced with a new message, // or the caption needs to be changed from "Reminder" to "Message". if (win) win->setRecreating(); // prevent post-alarm actions @@ -1704,43 +1704,43 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& { // Execute the command in a terminal window. cmd = Preferences::cmdXTermCommand(); - cmd.replace("%t", aboutData()->programName()); // set the terminal window title + cmd.tqreplace("%t", aboutData()->programName()); // set the terminal window title if (cmd.find("%C") >= 0) { // Execute the command from a temporary script file if (flags & ProcData::TEMP_FILE) - cmd.replace("%C", command); // the command is already calling a temporary file + cmd.tqreplace("%C", command); // the command is already calling a temporary file else { tmpXtermFile = createTempScriptFile(command, true, event, *alarm); if (tmpXtermFile.isEmpty()) return 0; - cmd.replace("%C", tmpXtermFile); // %C indicates where to insert the command + cmd.tqreplace("%C", tmpXtermFile); // %C indicates where to insert the command } } else if (cmd.find("%W") >= 0) { // Execute the command from a temporary script file, // with a sleep after the command is executed - tmpXtermFile = createTempScriptFile(command + TQString::fromLatin1("\nsleep 86400\n"), true, event, *alarm); + tmpXtermFile = createTempScriptFile(command + TQString::tqfromLatin1("\nsleep 86400\n"), true, event, *alarm); if (tmpXtermFile.isEmpty()) return 0; - cmd.replace("%W", tmpXtermFile); // %w indicates where to insert the command + cmd.tqreplace("%W", tmpXtermFile); // %w indicates where to insert the command } else if (cmd.find("%w") >= 0) { // Append a sleep to the command. - // Quote the command in case it contains characters such as [>|;]. - TQString exec = KShellProcess::quote(command + TQString::fromLatin1("; sleep 86400")); - cmd.replace("%w", exec); // %w indicates where to insert the command string + // Quote the command in case it tqcontains 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 contains characters such as [>|;]. + // Put it in quotes in case it tqcontains characters such as [>|;]. TQString exec = KShellProcess::quote(command); if (cmd.find("%c") >= 0) - cmd.replace("%c", exec); // %c indicates where to insert the command string + cmd.tqreplace("%c", exec); // %c indicates where to insert the command string else cmd.append(exec); // otherwise, simply append the command string } @@ -1759,7 +1759,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& // Set up a logging process to write the command's output to. connect(proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), TQT_SLOT(slotCommandOutput(KProcess*,char*,int))); connect(proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotCommandOutput(KProcess*,char*,int))); - logproc = new ShellProcess(TQString::fromLatin1("cat >>%1").arg(event.logFile())); + logproc = new ShellProcess(TQString::tqfromLatin1("cat >>%1").arg(event.logFile())); connect(logproc, TQT_SIGNAL(shellExited(ShellProcess*)), TQT_SLOT(slotLogProcExited(ShellProcess*))); logproc->start(KProcess::Stdin); TQCString heading; @@ -2068,7 +2068,7 @@ static bool convWakeTime(const TQCString& timeParam, TQDateTime& dateTime, bool& else { // Compile the values into a date/time structure - TQDateTime now = TQDateTime::currentDateTime(); + TQDateTime now = TQDateTime::tqcurrentDateTime(); if (dt[0] < 0) date.setYMD(now.date().year(), (dt[1] < 0 ? now.date().month() : dt[1]), |