summaryrefslogtreecommitdiffstats
path: root/kalarm/kalarmapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/kalarmapp.cpp')
-rw-r--r--kalarm/kalarmapp.cpp160
1 files changed, 80 insertions, 80 deletions
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp
index 8a620afd..25dd60f4 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::tqfromLatin1("General"));
- mNoSystemTray = config->readBoolEntry(TQString::tqfromLatin1("NoSystemTray"), false);
+ config->setGroup(TQString::fromLatin1("General"));
+ mNoSystemTray = config->readBoolEntry(TQString::fromLatin1("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::tqfromLatin1("korganizer");
+ TQString korg = TQString::fromLatin1("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::tqfromLatin1("MainWindow"))
+ if (type == TQString::fromLatin1("MainWindow"))
{
MainWindow* win = MainWindow::create(true);
win->restore(i, false);
@@ -214,7 +214,7 @@ bool KAlarmApp::restoreSession()
else
win->show();
}
- else if (type == TQString::tqfromLatin1("MessageWin"))
+ else if (type == TQString::fromLatin1("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").tqarg(TQString::tqfromLatin1("--calendarURL")).tqarg(TQString::tqfromLatin1("--handleEvent")).tqarg(TQString::tqfromLatin1("--triggerEvent")).tqarg(TQString::tqfromLatin1("--cancelEvent")))
+ USAGE(i18n("%1 requires %2, %3 or %4").arg(TQString::fromLatin1("--calendarURL")).arg(TQString::fromLatin1("--handleEvent")).arg(TQString::fromLatin1("--triggerEvent")).arg(TQString::fromLatin1("--cancelEvent")))
if (count > 1)
- USAGE(i18n("%1, %2, %3 mutually exclusive").tqarg(TQString::tqfromLatin1("--handleEvent")).tqarg(TQString::tqfromLatin1("--triggerEvent")).tqarg(TQString::tqfromLatin1("--cancelEvent")));
+ USAGE(i18n("%1, %2, %3 mutually exclusive").arg(TQString::fromLatin1("--handleEvent")).arg(TQString::fromLatin1("--triggerEvent")).arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--calendarURL")))
+ USAGE(i18n("%1: wrong calendar file").arg(TQString::fromLatin1("--calendarURL")))
}
TQString eventID = args->getOption(option);
args->clear(); // free up memory
- if (eventID.startsWith(TQString::tqfromLatin1("ad:")))
+ if (eventID.startsWith(TQString::fromLatin1("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").tqarg(TQString::tqfromLatin1("--edit")).tqarg(eventID))
+ USAGE(i18n("%1: Event %2 not found, or not editable").arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--exec")).tqarg(TQString::tqfromLatin1("--file")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--exec")).arg(TQString::fromLatin1("--file")))
if (args->isSet("mail"))
- USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--mail")).tqarg(TQString::tqfromLatin1("--file")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--file")))
if (args->count())
- USAGE(i18n("message incompatible with %1").tqarg(TQString::tqfromLatin1("--file")))
+ USAGE(i18n("message incompatible with %1").arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--mail")).tqarg(TQString::tqfromLatin1("--exec")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--mail")))
+ USAGE(i18n("%1: invalid email address").arg(TQString::fromLatin1("--mail")))
alAddresses += KCal::Person(TQString(), 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").tqarg(TQString::tqfromLatin1("--subject")).tqarg(TQString::tqfromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--subject")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("from-id"))
- USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--from-id")).tqarg(TQString::tqfromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--from-id")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("attach"))
- USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--attach")).tqarg(TQString::tqfromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--attach")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("bcc"))
- USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--bcc")).tqarg(TQString::tqfromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--bcc")).arg(TQString::fromLatin1("--mail")))
}
bool alarmNoTime = false;
@@ -478,7 +478,7 @@ int KAlarmApp::newInstance()
colourText.replace(0, 2, "#");
bgColour.setNamedColor(colourText);
if (!bgColour.isValid())
- USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--color")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--color")))
}
if (args->isSet("colorfg"))
{
@@ -489,25 +489,25 @@ int KAlarmApp::newInstance()
colourText.replace(0, 2, "#");
fgColour.setNamedColor(colourText);
if (!fgColour.isValid())
- USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--colorfg")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--colorfg")))
}
if (args->isSet("time"))
{
TQCString dateTime = args->getOption("time");
if (!convWakeTime(dateTime, alarmTime, alarmNoTime))
- USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--time")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--time")))
}
else
- alarmTime = TQDateTime::tqcurrentDateTime();
+ alarmTime = TQDateTime::currentDateTime();
bool haveRecurrence = args->isSet("recurrence");
if (haveRecurrence)
{
if (args->isSet("login"))
- USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--login")).tqarg(TQString::tqfromLatin1("--recurrence")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--login")).arg(TQString::fromLatin1("--recurrence")))
if (args->isSet("until"))
- USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--until")).tqarg(TQString::tqfromLatin1("--recurrence")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--login")).tqarg(TQString::tqfromLatin1("--interval")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--login")).arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--repeat")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--repeat")))
}
else if (haveRecurrence)
- USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--interval")).tqarg(TQString::tqfromLatin1("--repeat")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--interval")).arg(TQString::fromLatin1("--repeat")))
else if (args->isSet("until"))
{
count = 0;
TQCString dateTime = args->getOption("until");
if (!convWakeTime(dateTime, endTime, alarmNoTime))
- USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--until")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--until")))
if (endTime < alarmTime)
- USAGE(i18n("%1 earlier than %2").tqarg(TQString::tqfromLatin1("--until")).tqarg(TQString::tqfromLatin1("--time")))
+ USAGE(i18n("%1 earlier than %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--interval")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--interval")))
if (alarmNoTime && recurType == KARecurrence::MINUTELY)
- USAGE(i18n("Invalid %1 parameter for date-only alarm").tqarg(TQString::tqfromLatin1("--interval")))
+ USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--interval")).tqarg(TQString::tqfromLatin1("--repeat")).tqarg(TQString::tqfromLatin1("--recurrence")));
+ 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")));
repeatCount = count;
repeatInterval = interval;
}
@@ -566,9 +566,9 @@ int KAlarmApp::newInstance()
else
{
if (args->isSet("repeat"))
- USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--repeat")).tqarg(TQString::tqfromLatin1("--interval")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--repeat")).arg(TQString::fromLatin1("--interval")))
if (args->isSet("until"))
- USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--until")).tqarg(TQString::tqfromLatin1("--interval")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--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").tqarg(TQString::tqfromLatin1("--play")).tqarg(TQString::tqfromLatin1("--play-repeat")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--play")).arg(TQString::fromLatin1("--play-repeat")))
if (args->isSet("beep"))
- USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--beep")).tqarg(TQString::tqfromLatin1(audioRepeat ? "--play-repeat" : "--play")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--beep")).arg(TQString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
if (args->isSet("speak"))
- USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--speak")).tqarg(TQString::tqfromLatin1(audioRepeat ? "--play-repeat" : "--play")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--speak")).arg(TQString::fromLatin1(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").tqarg(TQString::tqfromLatin1("--volume")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--volume")))
audioVolume = static_cast<float>(volumepc) / 100;
}
#endif
}
#ifndef WITHOUT_ARTS
else if (args->isSet("volume"))
- USAGE(i18n("%1 requires %2 or %3").tqarg(TQString::tqfromLatin1("--volume")).tqarg(TQString::tqfromLatin1("--play")).tqarg(TQString::tqfromLatin1("--play-repeat")))
+ USAGE(i18n("%1 requires %2 or %3").arg(TQString::fromLatin1("--volume")).arg(TQString::fromLatin1("--play")).arg(TQString::fromLatin1("--play-repeat")))
#endif
if (args->isSet("speak"))
{
if (args->isSet("beep"))
- USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--beep")).tqarg(TQString::tqfromLatin1("--speak")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--beep")).arg(TQString::fromLatin1("--speak")))
if (!mSpeechEnabled)
- USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").tqarg(TQString::tqfromLatin1("--speak")))
+ USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").arg(TQString::fromLatin1("--speak")))
}
int reminderMinutes = 0;
bool onceOnly = args->isSet("reminder-once");
@@ -616,18 +616,18 @@ int KAlarmApp::newInstance()
{
// Issue a reminder alarm in advance of the main alarm
if (onceOnly && args->isSet("reminder"))
- USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--reminder")).tqarg(TQString::tqfromLatin1("--reminder-once")))
- TQString opt = onceOnly ? TQString::tqfromLatin1("--reminder-once") : TQString::tqfromLatin1("--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");
if (args->isSet("exec"))
- USAGE(i18n("%1 incompatible with %2").tqarg(opt).tqarg(TQString::tqfromLatin1("--exec")))
+ USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--exec")))
if (args->isSet("mail"))
- USAGE(i18n("%1 incompatible with %2").tqarg(opt).tqarg(TQString::tqfromLatin1("--mail")))
+ USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--mail")))
KARecurrence::Type recurType;
TQString optval = args->getOption(onceOnly ? "reminder-once" : "reminder");
if (!convInterval(args->getOption(onceOnly ? "reminder-once" : "reminder"), recurType, reminderMinutes))
- USAGE(i18n("Invalid %1 parameter").tqarg(opt))
+ USAGE(i18n("Invalid %1 parameter").arg(opt))
if (recurType == KARecurrence::MINUTELY && alarmNoTime)
- USAGE(i18n("Invalid %1 parameter for date-only alarm").tqarg(opt))
+ USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(opt))
}
int lateCancel = 0;
@@ -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").tqarg(TQString::tqfromLatin1("late-cancel")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("late-cancel")))
}
else if (args->isSet("auto-close"))
- USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--auto-close")).tqarg(TQString::tqfromLatin1("--late-cancel")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--auto-close")).arg(TQString::fromLatin1("--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::tqfromLatin1("--ack-confirm ");
+ usage += TQString::fromLatin1("--ack-confirm ");
if (args->isSet("attach"))
- usage += TQString::tqfromLatin1("--attach ");
+ usage += TQString::fromLatin1("--attach ");
if (args->isSet("auto-close"))
- usage += TQString::tqfromLatin1("--auto-close ");
+ usage += TQString::fromLatin1("--auto-close ");
if (args->isSet("bcc"))
- usage += TQString::tqfromLatin1("--bcc ");
+ usage += TQString::fromLatin1("--bcc ");
if (args->isSet("beep"))
- usage += TQString::tqfromLatin1("--beep ");
+ usage += TQString::fromLatin1("--beep ");
if (args->isSet("color"))
- usage += TQString::tqfromLatin1("--color ");
+ usage += TQString::fromLatin1("--color ");
if (args->isSet("colorfg"))
- usage += TQString::tqfromLatin1("--colorfg ");
+ usage += TQString::fromLatin1("--colorfg ");
if (args->isSet("disable"))
- usage += TQString::tqfromLatin1("--disable ");
+ usage += TQString::fromLatin1("--disable ");
if (args->isSet("from-id"))
- usage += TQString::tqfromLatin1("--from-id ");
+ usage += TQString::fromLatin1("--from-id ");
if (args->isSet("korganizer"))
- usage += TQString::tqfromLatin1("--korganizer ");
+ usage += TQString::fromLatin1("--korganizer ");
if (args->isSet("late-cancel"))
- usage += TQString::tqfromLatin1("--late-cancel ");
+ usage += TQString::fromLatin1("--late-cancel ");
if (args->isSet("login"))
- usage += TQString::tqfromLatin1("--login ");
+ usage += TQString::fromLatin1("--login ");
if (args->isSet("play"))
- usage += TQString::tqfromLatin1("--play ");
+ usage += TQString::fromLatin1("--play ");
#ifndef WITHOUT_ARTS
if (args->isSet("play-repeat"))
- usage += TQString::tqfromLatin1("--play-repeat ");
+ usage += TQString::fromLatin1("--play-repeat ");
#endif
if (args->isSet("reminder"))
- usage += TQString::tqfromLatin1("--reminder ");
+ usage += TQString::fromLatin1("--reminder ");
if (args->isSet("reminder-once"))
- usage += TQString::tqfromLatin1("--reminder-once ");
+ usage += TQString::fromLatin1("--reminder-once ");
if (args->isSet("speak"))
- usage += TQString::tqfromLatin1("--speak ");
+ usage += TQString::fromLatin1("--speak ");
if (args->isSet("subject"))
- usage += TQString::tqfromLatin1("--subject ");
+ usage += TQString::fromLatin1("--subject ");
if (args->isSet("time"))
- usage += TQString::tqfromLatin1("--time ");
+ usage += TQString::fromLatin1("--time ");
#ifndef WITHOUT_ARTS
if (args->isSet("volume"))
- usage += TQString::tqfromLatin1("--volume ");
+ usage += TQString::fromLatin1("--volume ");
#endif
if (!usage.isEmpty())
{
- usage += i18n(": option(s) only valid with a message/%1/%2").tqarg(TQString::tqfromLatin1("--file")).tqarg(TQString::tqfromLatin1("--exec"));
+ usage += i18n(": option(s) only valid with a message/%1/%2").arg(TQString::fromLatin1("--file")).arg(TQString::fromLatin1("--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::tqfromLatin1("General"));
- config->writeEntry(TQString::tqfromLatin1("NoSystemTray"), mNoSystemTray);
+ config->setGroup(TQString::fromLatin1("General"));
+ config->writeEntry(TQString::fromLatin1("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::tqcurrentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
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::tqcurrentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
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::tqcurrentDateTime());
+ KAEvent::OccurType type = event.setNextOccurrence(TQDateTime::currentDateTime());
switch (type)
{
case KAEvent::NO_OCCURRENCE:
@@ -1722,7 +1722,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
{
// Execute the command from a temporary script file,
// with a sleep after the command is executed
- tmpXtermFile = createTempScriptFile(command + TQString::tqfromLatin1("\nsleep 86400\n"), true, event, *alarm);
+ tmpXtermFile = createTempScriptFile(command + TQString::fromLatin1("\nsleep 86400\n"), true, event, *alarm);
if (tmpXtermFile.isEmpty())
return 0;
cmd.replace("%W", tmpXtermFile); // %w indicates where to insert the command
@@ -1731,7 +1731,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
{
// Append a sleep to the command.
// Quote the command in case it contains characters such as [>|;].
- TQString exec = KShellProcess::quote(command + TQString::tqfromLatin1("; sleep 86400"));
+ TQString exec = KShellProcess::quote(command + TQString::fromLatin1("; sleep 86400"));
cmd.replace("%w", exec); // %w indicates where to insert the command string
}
else
@@ -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::tqfromLatin1("cat >>%1").tqarg(event.logFile()));
+ logproc = new ShellProcess(TQString::fromLatin1("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::tqcurrentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (dt[0] < 0)
date.setYMD(now.date().year(),
(dt[1] < 0 ? now.date().month() : dt[1]),