diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:01 -0600 |
commit | 716a5de8870d7c02bb4d0aed72f30291b17b763a (patch) | |
tree | 29e58b213ead28151ccf7eb33d12c968ea844120 /kalarm/kalarmapp.cpp | |
parent | 0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78 (diff) | |
download | tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.tar.gz tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'kalarm/kalarmapp.cpp')
-rw-r--r-- | kalarm/kalarmapp.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp index 8ef9f6a54..25dd60f49 100644 --- a/kalarm/kalarmapp.cpp +++ b/kalarm/kalarmapp.cpp @@ -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::fromLatin1("--calendarURL")).tqarg(TQString::fromLatin1("--handleEvent")).tqarg(TQString::fromLatin1("--triggerEvent")).tqarg(TQString::fromLatin1("--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::fromLatin1("--handleEvent")).tqarg(TQString::fromLatin1("--triggerEvent")).tqarg(TQString::fromLatin1("--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,7 +341,7 @@ int KAlarmApp::newInstance() { TQString calendarUrl = args->getOption("calendarURL"); if (KURL(calendarUrl).url() != AlarmCalendar::activeCalendar()->urlString()) - USAGE(i18n("%1: wrong calendar file").tqarg(TQString::fromLatin1("--calendarURL"))) + USAGE(i18n("%1: wrong calendar file").arg(TQString::fromLatin1("--calendarURL"))) } TQString eventID = args->getOption(option); args->clear(); // free up memory @@ -369,7 +369,7 @@ int KAlarmApp::newInstance() } if (!KAlarm::edit(eventID)) { - USAGE(i18n("%1: Event %2 not found, or not editable").tqarg(TQString::fromLatin1("--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::fromLatin1("--exec")).tqarg(TQString::fromLatin1("--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::fromLatin1("--mail")).tqarg(TQString::fromLatin1("--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::fromLatin1("--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::fromLatin1("--mail")).tqarg(TQString::fromLatin1("--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::fromLatin1("--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::fromLatin1("--subject")).tqarg(TQString::fromLatin1("--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::fromLatin1("--from-id")).tqarg(TQString::fromLatin1("--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::fromLatin1("--attach")).tqarg(TQString::fromLatin1("--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::fromLatin1("--bcc")).tqarg(TQString::fromLatin1("--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::fromLatin1("--color"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--color"))) } if (args->isSet("colorfg")) { @@ -489,14 +489,14 @@ int KAlarmApp::newInstance() colourText.replace(0, 2, "#"); fgColour.setNamedColor(colourText); if (!fgColour.isValid()) - USAGE(i18n("Invalid %1 parameter").tqarg(TQString::fromLatin1("--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::fromLatin1("--time"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--time"))) } else alarmTime = TQDateTime::currentDateTime(); @@ -505,9 +505,9 @@ int KAlarmApp::newInstance() if (haveRecurrence) { if (args->isSet("login")) - USAGE(i18n("%1 incompatible with %2").tqarg(TQString::fromLatin1("--login")).tqarg(TQString::fromLatin1("--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::fromLatin1("--until")).tqarg(TQString::fromLatin1("--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::fromLatin1("--login")).tqarg(TQString::fromLatin1("--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::fromLatin1("--repeat"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--repeat"))) } else if (haveRecurrence) - USAGE(i18n("%1 requires %2").tqarg(TQString::fromLatin1("--interval")).tqarg(TQString::fromLatin1("--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::fromLatin1("--until"))) + USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--until"))) if (endTime < alarmTime) - USAGE(i18n("%1 earlier than %2").tqarg(TQString::fromLatin1("--until")).tqarg(TQString::fromLatin1("--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::fromLatin1("--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::fromLatin1("--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::fromLatin1("--interval")).tqarg(TQString::fromLatin1("--repeat")).tqarg(TQString::fromLatin1("--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::fromLatin1("--repeat")).tqarg(TQString::fromLatin1("--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::fromLatin1("--until")).tqarg(TQString::fromLatin1("--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::fromLatin1("--play")).tqarg(TQString::fromLatin1("--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::fromLatin1("--beep")).tqarg(TQString::fromLatin1(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::fromLatin1("--speak")).tqarg(TQString::fromLatin1(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::fromLatin1("--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::fromLatin1("--volume")).tqarg(TQString::fromLatin1("--play")).tqarg(TQString::fromLatin1("--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::fromLatin1("--beep")).tqarg(TQString::fromLatin1("--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::fromLatin1("--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::fromLatin1("--reminder")).tqarg(TQString::fromLatin1("--reminder-once"))) + 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::fromLatin1("--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::fromLatin1("--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::fromLatin1("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::fromLatin1("--auto-close")).tqarg(TQString::fromLatin1("--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")) @@ -728,7 +728,7 @@ int KAlarmApp::newInstance() #endif if (!usage.isEmpty()) { - usage += i18n(": option(s) only valid with a message/%1/%2").tqarg(TQString::fromLatin1("--file")).tqarg(TQString::fromLatin1("--exec")); + usage += i18n(": option(s) only valid with a message/%1/%2").arg(TQString::fromLatin1("--file")).arg(TQString::fromLatin1("--exec")); break; } @@ -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").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; |