From 4c6f8d69e2d1501837affb472c4eb8fec4462240 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kalarm/COPYING | 4 ++-- kalarm/alarmcalendar.cpp | 2 +- kalarm/alarmevent.cpp | 36 ++++++++++++++++++------------------ kalarm/alarmlistview.cpp | 6 +++--- kalarm/alarmtext.cpp | 12 ++++++------ kalarm/birthdaydlg.cpp | 2 +- kalarm/calendarcompat.cpp | 8 ++++---- kalarm/dcophandler.cpp | 2 +- kalarm/editdlg.cpp | 4 ++-- kalarm/eventlistviewbase.cpp | 4 ++-- kalarm/functions.cpp | 4 ++-- kalarm/kalarmapp.cpp | 26 +++++++++++++------------- kalarm/kalarmd/adcalendar.cpp | 8 ++++---- kalarm/kalarmd/alarmdaemon.cpp | 6 +++--- kalarm/kalarmd/clientinfo.cpp | 4 ++-- kalarm/kalarmui.rc | 2 +- kalarm/kamail.cpp | 24 ++++++++++++------------ kalarm/karecurrence.cpp | 2 +- kalarm/lib/colourcombo.cpp | 2 +- kalarm/lib/colourlist.h | 8 ++++---- kalarm/lib/lineedit.cpp | 2 +- kalarm/lib/messagebox.cpp | 2 +- kalarm/lib/shellprocess.cpp | 2 +- kalarm/lib/spinbox.cpp | 4 ++-- kalarm/lib/synchtimer.cpp | 2 +- kalarm/lib/timespinbox.cpp | 4 ++-- kalarm/mainwindow.cpp | 2 +- kalarm/messagewin.cpp | 4 ++-- kalarm/prefdlg.cpp | 12 ++++++------ kalarm/preferences.cpp | 4 ++-- kalarm/undo.cpp | 10 +++++----- kalarm/undo.h | 2 +- 32 files changed, 108 insertions(+), 108 deletions(-) (limited to 'kalarm') diff --git a/kalarm/COPYING b/kalarm/COPYING index b55fa146..54754ab4 100644 --- a/kalarm/COPYING +++ b/kalarm/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp index 8cbc7ceb..7bdd767a 100644 --- a/kalarm/alarmcalendar.cpp +++ b/kalarm/alarmcalendar.cpp @@ -164,7 +164,7 @@ AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, TQStri { TQString readPath = config->readPathEntry(configKey, locateLocal("appdata", calendarNames[type])); writePath = readPath; - writePath.tqreplace(vcsRegExp, ical); + writePath.replace(vcsRegExp, ical); return new AlarmCalendar(readPath, type, writePath, configKey); } } diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp index 54f60a3c..c5e487ca 100644 --- a/kalarm/alarmevent.cpp +++ b/kalarm/alarmevent.cpp @@ -890,22 +890,22 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) TQString result = id; tqStatus oldtqStatus; int i, len; - if ((i = result.tqfind(EXPIRED_UID)) > 0) + if ((i = result.find(EXPIRED_UID)) > 0) { oldtqStatus = EXPIRED; len = EXPIRED_UID.length(); } - else if ((i = result.tqfind(DISPLAYING_UID)) > 0) + else if ((i = result.find(DISPLAYING_UID)) > 0) { oldtqStatus = DISPLAYING; len = DISPLAYING_UID.length(); } - else if ((i = result.tqfind(TEMPLATE_UID)) > 0) + else if ((i = result.find(TEMPLATE_UID)) > 0) { oldtqStatus = TEMPLATE; len = TEMPLATE_UID.length(); } - else if ((i = result.tqfind(KORGANIZER_UID)) > 0) + else if ((i = result.find(KORGANIZER_UID)) > 0) { oldtqStatus = KORGANIZER; len = KORGANIZER_UID.length(); @@ -913,7 +913,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) else { oldtqStatus = ACTIVE; - i = result.tqfindRev('-'); + i = result.findRev('-'); len = 1; } if (status != oldtqStatus && i > 0) @@ -927,7 +927,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) case TEMPLATE: part = TEMPLATE_UID; break; case KORGANIZER: part = KORGANIZER_UID; break; } - result.tqreplace(i, len, part); + result.replace(i, len, part); } return result; } @@ -937,13 +937,13 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) */ KAEvent::tqStatus KAEvent::uidtqStatus(const TQString& uid) { - if (uid.tqfind(EXPIRED_UID) > 0) + if (uid.find(EXPIRED_UID) > 0) return EXPIRED; - if (uid.tqfind(DISPLAYING_UID) > 0) + if (uid.find(DISPLAYING_UID) > 0) return DISPLAYING; - if (uid.tqfind(TEMPLATE_UID) > 0) + if (uid.find(TEMPLATE_UID) > 0) return TEMPLATE; - if (uid.tqfind(KORGANIZER_UID) > 0) + if (uid.find(KORGANIZER_UID) > 0) return KORGANIZER; return ACTIVE; } @@ -2551,7 +2551,7 @@ bool KAEvent::adjustStartOfDay(const Event::List& events) { Event* event = *evit; const TQStringList cats = event->categories(); - if (cats.tqfind(DATE_ONLY_CATEGORY) != cats.end()) + if (cats.find(DATE_ONLY_CATEGORY) != cats.end()) { // It's an untimed event, so fix it TQTime oldTime = event->dtStart().time(); @@ -2732,14 +2732,14 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju else i = 0; // invalid prefix } - if (txt.tqfind(TEXT_PREFIX, i) == i) + if (txt.find(TEXT_PREFIX, i) == i) i += TEXT_PREFIX.length(); - else if (txt.tqfind(FILE_PREFIX, i) == i) + else if (txt.find(FILE_PREFIX, i) == i) { action = T_FILE; i += FILE_PREFIX.length(); } - else if (txt.tqfind(COMMAND_PREFIX, i) == i) + else if (txt.find(COMMAND_PREFIX, i) == i) { action = T_COMMAND; i += COMMAND_PREFIX.length(); @@ -2882,7 +2882,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple LATECANCEL category to LATECANCEL:n where n = minutes late. */ TQStringList::Iterator it; - while ((it = cats.tqfind(LATE_CANCEL_CAT)) != cats.end()) + while ((it = cats.find(LATE_CANCEL_CAT)) != cats.end()) { cats.remove(it); addLateCancel = true; @@ -2915,7 +2915,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple TMPLDEFTIME category to TMPLAFTTIME:n where n = minutes after. */ TQStringList::Iterator it; - while ((it = cats.tqfind(TEMPL_DEF_TIME_CAT)) != cats.end()) + while ((it = cats.find(TEMPL_DEF_TIME_CAT)) != cats.end()) { cats.remove(it); cats.append(TQString("%1%2").tqarg(TEMPL_AFTER_TIME_CATEGORY).tqarg(0)); @@ -2929,7 +2929,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple XTERM category to LOG:xterm: */ TQStringList::Iterator it; - while ((it = cats.tqfind(EXEC_IN_XTERM_CAT)) != cats.end()) + while ((it = cats.find(EXEC_IN_XTERM_CAT)) != cats.end()) { cats.remove(it); cats.append(LOG_CATEGORY + xtermURL); @@ -2952,7 +2952,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * alarm offsets to zero and deferral alarm offsets to be relative to * the next recurrence. */ - bool dateOnly = (cats.tqfind(DATE_ONLY_CATEGORY) != cats.end()); + bool dateOnly = (cats.find(DATE_ONLY_CATEGORY) != cats.end()); DateTime startDateTime(event->dtStart(), dateOnly); // Convert the main alarm and get the next main trigger time from it DateTime nextMainDateTime; diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp index 3bbe042f..546752ea 100644 --- a/kalarm/alarmlistview.cpp +++ b/kalarm/alarmlistview.cpp @@ -507,8 +507,8 @@ TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const if (!TQApplication::reverseLayout()) // don't try to align right-to-left languages { TQString fmt = locale->timeFormat(); - int i = fmt.tqfind(TQRegExp("%[kl]")); // check if leading zeroes are omitted - if (i >= 0 && i == fmt.tqfind('%')) // and whether the hour is first + int i = fmt.find(TQRegExp("%[kl]")); // check if leading zeroes are omitted + if (i >= 0 && i == fmt.find('%')) // and whether the hour is first mTimeHourPos = i; // yes, so need to align } } @@ -593,7 +593,7 @@ void AlarmListViewItem::paintCell(TQPainter* painter, const TQColorGroup& cg, in if (mTimeHourPos >= 0) { // Need to pad out spacing to align times without leading zeroes - i = str.tqfind(" ~"); + i = str.find(" ~"); if (i >= 0) { if (mDigitWidth < 0) diff --git a/kalarm/alarmtext.cpp b/kalarm/alarmtext.cpp index 6cf07c34..8bd1d684 100644 --- a/kalarm/alarmtext.cpp +++ b/kalarm/alarmtext.cpp @@ -184,8 +184,8 @@ TQString AlarmText::fromCalendarText(const TQString& text, bool& email) dispText += mCcPrefix + lines[2].mid(mCcPrefixEn.length()) + '\n'; dispText += mDatePrefix + lines[n].mid(mDatePrefixEn.length()) + '\n'; dispText += mSubjectPrefix + lines[n+1].mid(mSubjectPrefixEn.length()); - int i = text.tqfind(mSubjectPrefixEn); - i = text.tqfind('\n', i); + int i = text.find(mSubjectPrefixEn); + i = text.find('\n', i); if (i > 0) dispText += text.mid(i); email = true; @@ -224,8 +224,8 @@ TQString AlarmText::toCalendarText(const TQString& text) calText += mCcPrefixEn + lines[2].mid(mCcPrefix.length()) + '\n'; calText += mDatePrefixEn + lines[n].mid(mDatePrefix.length()) + '\n'; calText += mSubjectPrefixEn + lines[n+1].mid(mSubjectPrefix.length()); - int i = text.tqfind(mSubjectPrefix); - i = text.tqfind('\n', i); + int i = text.find(mSubjectPrefix); + i = text.find('\n', i); if (i > 0) calText += text.mid(i); return calText; @@ -271,12 +271,12 @@ TQString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated) } if (truncated) *truncated = false; - if (text.tqcontains('\n') < maxLines) + if (text.contains('\n') < maxLines) return text; int newline = -1; for (int i = 0; i < maxLines; ++i) { - newline = text.tqfind('\n', newline + 1); + newline = text.find('\n', newline + 1); if (newline < 0) return text; // not truncated after all !?! } diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp index 16e8a4ac..71ab8692 100644 --- a/kalarm/birthdaydlg.cpp +++ b/kalarm/birthdaydlg.cpp @@ -256,7 +256,7 @@ void BirthdayDlg::updateSelectionList() name = addressee.realName(); // Check if the birthday already has an alarm TQString text = mPrefixText + name + mSuffixText; - bool alarmExists = (messageList.tqfind(text) != messageList.end()); + bool alarmExists = (messageList.find(text) != messageList.end()); // Check if the birthday is already in the selection list bool inSelectionList = false; AddresseeItem* item = 0; diff --git a/kalarm/calendarcompat.cpp b/kalarm/calendarcompat.cpp index 134436a2..0d049fed 100644 --- a/kalarm/calendarcompat.cpp +++ b/kalarm/calendarcompat.cpp @@ -81,21 +81,21 @@ int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, TQString& subVer // Find the KAlarm identifier TQString progname = TQString::tqfromLatin1(" KAlarm "); - int i = prodid.tqfind(progname, 0, false); + int i = prodid.find(progname, 0, false); if (i < 0) { // Older versions used KAlarm's translated name in the product ID, which // could have created problems using a calendar in different locales. progname = TQString(" ") + kapp->aboutData()->programName() + ' '; - i = prodid.tqfind(progname, 0, false); + i = prodid.find(progname, 0, false); if (i < 0) return 0; // calendar wasn't created by KAlarm } // Extract the KAlarm version string TQString ver = prodid.mid(i + progname.length()).stripWhiteSpace(); - i = ver.tqfind('/'); - int j = ver.tqfind(' '); + i = ver.find('/'); + int j = ver.find(' '); if (j >= 0 && j < i) i = j; if (i <= 0) diff --git a/kalarm/dcophandler.cpp b/kalarm/dcophandler.cpp index 7f49ca57..f1a08df8 100644 --- a/kalarm/dcophandler.cpp +++ b/kalarm/dcophandler.cpp @@ -417,7 +417,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c if (!start.isValid()) return false; TQDateTime end; - if (endDateTime.tqfind('T') < 0) + if (endDateTime.find('T') < 0) { if (!start.isDateOnly()) { diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp index 08262726..93b6bc5a 100644 --- a/kalarm/editdlg.cpp +++ b/kalarm/editdlg.cpp @@ -894,7 +894,7 @@ void EditAlarmDlg::setReadOnly() mCmdCommandEdit->setReadOnly(mReadOnly); mCmdScriptEdit->setReadOnly(mReadOnly); for (int id = DISCARD_OUTPUT; id < EXEC_IN_TERMINAL; ++id) - ((RadioButton*)mCmdOutputGroup->tqfind(id))->setReadOnly(mReadOnly); + ((RadioButton*)mCmdOutputGroup->find(id))->setReadOnly(mReadOnly); // Email alarm controls mEmailToEdit->setReadOnly(mReadOnly); @@ -1948,7 +1948,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const enum Err { NONE = 0, BLANK, NONEXISTENT, DIRECTORY, UNREADABLE, NOT_TEXT_IMAGE }; Err err = NONE; KURL url; - int i = alarmtext.tqfind(TQString::tqfromLatin1("/")); + int i = alarmtext.find(TQString::tqfromLatin1("/")); if (i > 0 && alarmtext[i - 1] == ':') { url = alarmtext; diff --git a/kalarm/eventlistviewbase.cpp b/kalarm/eventlistviewbase.cpp index ce025730..c463c8ad 100644 --- a/kalarm/eventlistviewbase.cpp +++ b/kalarm/eventlistviewbase.cpp @@ -458,8 +458,8 @@ TQString EventListWhatsThisBase::text(const TQPoint& pt) int column = -1; TQPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt); TQRect frame = mListView->header()->frameGeometry(); - if (frame.tqcontains(pt) - || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.tqcontains(TQPoint(pt.x(), frame.y()))) + if (frame.contains(pt) + || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y()))) column = mListView->header()->sectionAt(pt.x()); return mListView->whatsThisText(column); } diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp index 26b16d22..2c44e161 100644 --- a/kalarm/functions.cpp +++ b/kalarm/functions.cpp @@ -793,7 +793,7 @@ int getVersionNumber(const TQString& version, TQString* subVersion) // if the representation returned by this method changes. if (subVersion) *subVersion = TQString(); - int count = version.tqcontains('.') + 1; + int count = version.contains('.') + 1; if (count < 2) return 0; bool ok; @@ -836,7 +836,7 @@ FileType fileType(const TQString& mimetype) if (mimetype.startsWith(TQString::tqfromLatin1("image/"))) return Image; - int slash = mimetype.tqfind('/'); + int slash = mimetype.find('/'); if (slash < 0) return Unknown; TQString type = mimetype.mid(slash + 1); diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp index d37e0dcd..775821c5 100644 --- a/kalarm/kalarmapp.cpp +++ b/kalarm/kalarmapp.cpp @@ -475,7 +475,7 @@ int KAlarmApp::newInstance() TQCString colourText = args->getOption("color"); if (static_cast(colourText)[0] == '0' && tolower(static_cast(colourText)[1]) == 'x') - colourText.tqreplace(0, 2, "#"); + colourText.replace(0, 2, "#"); bgColour.setNamedColor(colourText); if (!bgColour.isValid()) USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--color"))) @@ -486,7 +486,7 @@ int KAlarmApp::newInstance() TQCString colourText = args->getOption("colorfg"); if (static_cast(colourText)[0] == '0' && tolower(static_cast(colourText)[1]) == 'x') - colourText.tqreplace(0, 2, "#"); + colourText.replace(0, 2, "#"); fgColour.setNamedColor(colourText); if (!fgColour.isValid()) USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--colorfg"))) @@ -1704,43 +1704,43 @@ 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.tqfind("%C") >= 0) + cmd.replace("%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.tqreplace("%C", command); // the command is already calling a temporary file + cmd.replace("%C", command); // the command is already calling a temporary file else { tmpXtermFile = createTempScriptFile(command, true, event, *alarm); if (tmpXtermFile.isEmpty()) return 0; - cmd.tqreplace("%C", tmpXtermFile); // %C indicates where to insert the command + cmd.replace("%C", tmpXtermFile); // %C indicates where to insert the command } } - else if (cmd.tqfind("%W") >= 0) + 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::tqfromLatin1("\nsleep 86400\n"), true, event, *alarm); if (tmpXtermFile.isEmpty()) return 0; - cmd.tqreplace("%W", tmpXtermFile); // %w indicates where to insert the command + cmd.replace("%W", tmpXtermFile); // %w indicates where to insert the command } - else if (cmd.tqfind("%w") >= 0) + 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::tqfromLatin1("; sleep 86400")); - cmd.tqreplace("%w", exec); // %w indicates where to insert the command string + cmd.replace("%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 [>|;]. TQString exec = KShellProcess::quote(command); - if (cmd.tqfind("%c") >= 0) - cmd.tqreplace("%c", exec); // %c indicates where to insert the command string + if (cmd.find("%c") >= 0) + cmd.replace("%c", exec); // %c indicates where to insert the command string else cmd.append(exec); // otherwise, simply append the command string } @@ -2118,7 +2118,7 @@ static bool convInterval(const TQCString& timeParam, KARecurrence::Type& recurTy break; case 'M': { - int i = timeString.tqfind('H'); + int i = timeString.find('H'); if (i < 0) { if (!allowMonthYear) diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp index e1f0823a..409ab88f 100644 --- a/kalarm/kalarmd/adcalendar.cpp +++ b/kalarm/kalarmd/adcalendar.cpp @@ -51,7 +51,7 @@ ADCalendar::ADCalendar(const TQString& url, const TQCString& appname) kdError(5900) << "ADCalendar::ADCalendar(" << url << "): calendar already exists" << endl; assert(0); } - mUrlIndex = mCalendarUrls.tqfindIndex(url); // get unique index for this URL + mUrlIndex = mCalendarUrls.findIndex(url); // get unique index for this URL if (mUrlIndex < 0) { mUrlIndex = static_cast(mCalendarUrls.count()); @@ -142,7 +142,7 @@ bool ADCalendar::setLoadedConnected() */ bool ADCalendar::eventHandled(const KCal::Event* event, const TQValueList& alarmtimes) { - EventsMap::ConstIterator it = mEventsHandled.tqfind(EventKey(event->uid(), mUrlIndex)); + EventsMap::ConstIterator it = mEventsHandled.find(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.tqfind(key); + EventsMap::Iterator it = mEventsPending.find(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& alarmtimes, int sequence) { - EventsMap::Iterator it = map.tqfind(key); + EventsMap::Iterator it = map.find(key); if (it != map.end()) { // Update the existing entry for the event diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp index c14a1bf5..a8460167 100644 --- a/kalarm/kalarmd/alarmdaemon.cpp +++ b/kalarm/kalarmd/alarmdaemon.cpp @@ -374,7 +374,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) for (TQValueList::ConstIterator it = alarms.begin(); it != alarms.end(); ++it) { KCal::Event* event = dynamic_cast((*it)->tqparent()); - if (!event || eventsDone.tqfind(event) != eventsDone.end()) + if (!event || eventsDone.find(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.tqfind(TQString::tqfromLatin1("DATE")) != cats.end()); + bool floats = (cats.find(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.tqfind(client->dcopObject()) == objects.end()) + if (objects.find(client->dcopObject()) == objects.end()) ready = false; } if (!ready) diff --git a/kalarm/kalarmd/clientinfo.cpp b/kalarm/kalarmd/clientinfo.cpp index 5475cce5..e8c5ea6c 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::ConstIterator it = mClients.tqfind(appName); + TQMap::ConstIterator it = mClients.find(appName); if (it == mClients.end()) return 0; return it.data(); @@ -104,7 +104,7 @@ void ClientInfo::clear() */ void ClientInfo::remove(const TQCString& appName) { - TQMap::Iterator it = mClients.tqfind(appName); + TQMap::Iterator it = mClients.find(appName); if (it != mClients.end()) delete it.data(); } diff --git a/kalarm/kalarmui.rc b/kalarm/kalarmui.rc index 97d05056..68627170 100644 --- a/kalarm/kalarmui.rc +++ b/kalarm/kalarmui.rc @@ -11,7 +11,7 @@ - + diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp index 55840662..261e3865 100644 --- a/kalarm/kamail.cpp +++ b/kalarm/kamail.cpp @@ -249,7 +249,7 @@ TQString KAMail::sendKMail(const KAMailData& data) if (func.left(5) == "bool ") { func = func.mid(5); - func.tqreplace(TQRegExp(" [0-9A-Za-z_:]+"), ""); + func.replace(TQRegExp(" [0-9A-Za-z_:]+"), ""); useSend = (func == sendFunction); } } @@ -341,13 +341,13 @@ bool KAMail::callKMail(const TQByteArray& callData, const TQCString& iface, cons || replyType != funcType) { TQCString funcname = function; - funcname.tqreplace(TQRegExp("(.+$"), "()"); + funcname.replace(TQRegExp("(.+$"), "()"); kdError(5950) << "KAMail::callKMail(): kmail " << funcname << " call failed\n";; return false; } TQDataStream replyStream(replyData, IO_ReadOnly); TQCString funcname = function; - funcname.tqreplace(TQRegExp("(.+$"), "()"); + funcname.replace(TQRegExp("(.+$"), "()"); if (replyType == "int") { int result; @@ -385,7 +385,7 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId) char buff[64]; strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow)); TQString from = data.from; - from.tqreplace(TQRegExp("^.*<"), TQString()).tqreplace(TQRegExp(">.*$"), TQString()); + from.replace(TQRegExp("^.*<"), TQString()).replace(TQRegExp(">.*$"), TQString()); message = TQString::tqfromLatin1(buff); message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").tqarg(timenow).tqarg(tod.tv_usec).tqarg(from); } @@ -691,7 +691,7 @@ int KAMail::checkAddress(TQString& address) { address = address.stripWhiteSpace(); // Check that there are no list separator characters present - if (address.tqfind(',') >= 0 || address.tqfind(';') >= 0) + if (address.find(',') >= 0 || address.find(';') >= 0) return -1; int n = address.length(); if (!n) @@ -701,16 +701,16 @@ int KAMail::checkAddress(TQString& address) if (address[end] == '>') { // The email address is in <...> - if ((start = address.tqfind('<')) < 0) + if ((start = address.find('<')) < 0) return -1; ++start; --end; } - int i = address.tqfind('@', start); + int i = address.find('@', start); if (i >= 0) { if (i == start || i == end) // check @ isn't the first or last character -// || address.tqfind('@', i + 1) >= 0) // check for multiple @ characters +// || address.find('@', i + 1) >= 0) // check for multiple @ characters return -1; } /* else @@ -744,10 +744,10 @@ TQString KAMail::convertAttachments(const TQString& items, TQStringList& list) for (int next = 0; next < length; ) { // Find the first delimiter character (, or ;) - int i = items.tqfind(',', next); + int i = items.find(',', next); if (i < 0) i = items.length(); - int sc = items.tqfind(';', next); + int sc = items.find(';', next); if (sc < 0) sc = items.length(); if (sc < i) @@ -780,10 +780,10 @@ TQString KAMail::convertAttachments(const TQString& items, KURL::List& list) for (int next = 0; next < length; ) { // Find the first delimiter character (, or ;) - int i = items.tqfind(',', next); + int i = items.find(',', next); if (i < 0) i = items.length(); - int sc = items.tqfind(';', next); + int sc = items.find(';', next); if (sc < 0) sc = items.length(); if (sc < i) diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp index 4221a5ad..a14d5675 100644 --- a/kalarm/karecurrence.cpp +++ b/kalarm/karecurrence.cpp @@ -606,7 +606,7 @@ bool KARecurrence::recursOn(const TQDate& dt) const return true; // We know now that it isn't in EXDATES or EXRULES, // so we just need to check if it's in RDATES or RRULES - if (rDates().tqcontains(dt)) + if (rDates().contains(dt)) return true; RecurrenceRule::List rulelist = rRules(); for (RecurrenceRule::List::ConstIterator rr = rulelist.begin(); rr != rulelist.end(); ++rr) diff --git a/kalarm/lib/colourcombo.cpp b/kalarm/lib/colourcombo.cpp index 5cea7fb8..cd078a34 100644 --- a/kalarm/lib/colourcombo.cpp +++ b/kalarm/lib/colourcombo.cpp @@ -57,7 +57,7 @@ void ColourCombo::setColours(const ColourList& colours) { mColourList = colours; if (mSelectedColour != mCustomColour - && !mColourList.tqcontains(mSelectedColour)) + && !mColourList.contains(mSelectedColour)) { // The current colour has been deleted mSelectedColour = mColourList.count() ? mColourList.first() : mCustomColour; diff --git a/kalarm/lib/colourlist.h b/kalarm/lib/colourlist.h index 91fabaf9..485bba6d 100644 --- a/kalarm/lib/colourlist.h +++ b/kalarm/lib/colourlist.h @@ -83,19 +83,19 @@ class ColourList /** Returns an iterator pointing to the colour at position @p i in the list. */ const_iterator at(size_type i) const { return mList.at(i); } /** Returns true if the list contains the colour @p c. */ - size_type tqcontains(const TQColor& c) const { return mList.tqcontains(c.rgb()); } + size_type contains(const TQColor& c) const { return mList.contains(c.rgb()); } /** Returns an iterator pointing to the first occurrence of colour @p c in the list. * Returns end() if colour @p c is not in the list. */ - const_iterator tqfind(const TQColor& c) const { return mList.tqfind(c.rgb()); } + const_iterator find(const TQColor& c) const { return mList.find(c.rgb()); } /** Returns an iterator pointing to the first occurrence of colour @p c in the list, starting. * from position @p it. Returns end() if colour @p c is not in the list. */ - const_iterator tqfind(const_iterator it, const TQColor& c) const { return mList.tqfind(it, c.rgb()); } + const_iterator find(const_iterator it, const TQColor& c) const { return mList.find(it, c.rgb()); } /** Returns the index to the first occurrence of colour @p c in the list. * Returns -1 if colour @p c is not in the list. */ - int findIndex(const TQColor& c) const { return mList.tqfindIndex(c.rgb()); } + int findIndex(const TQColor& c) const { return mList.findIndex(c.rgb()); } /** Returns the first colour in the list. If the list is empty, the result is undefined. */ TQColor first() const { return TQColor(mList.first()); } /** Returns the last colour in the list. If the list is empty, the result is undefined. */ diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp index f19ed806..28d94fb2 100644 --- a/kalarm/lib/lineedit.cpp +++ b/kalarm/lib/lineedit.cpp @@ -181,7 +181,7 @@ void LineEdit::dropEvent(TQDropEvent* e) } else { - int newline = txt.tqfind('\n'); + int newline = txt.find('\n'); newText = (newline >= 0) ? txt.left(newline) : txt; } } diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp index dced4ce6..2f7480df 100644 --- a/kalarm/lib/messagebox.cpp +++ b/kalarm/lib/messagebox.cpp @@ -45,7 +45,7 @@ KMessageBox::ButtonCode MessageBox::getContinueDefault(const TQString& dontAskAg ButtonCode defaultButton = Continue; if (!dontAskAgainName.isEmpty()) { - TQMap::ConstIterator it = mContinueDefaults.tqfind(dontAskAgainName); + TQMap::ConstIterator it = mContinueDefaults.find(dontAskAgainName); if (it != mContinueDefaults.end()) defaultButton = it.data(); } diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp index c2f2e11b..09daf91d 100644 --- a/kalarm/lib/shellprocess.cpp +++ b/kalarm/lib/shellprocess.cpp @@ -185,7 +185,7 @@ const TQCString& ShellProcess::shellPath() } // Get the shell filename with the path stripped off - int i = mShellPath.tqfindRev('/'); + int i = mShellPath.findRev('/'); if (i >= 0) mShellName = mShellPath.mid(i + 1); else diff --git a/kalarm/lib/spinbox.cpp b/kalarm/lib/spinbox.cpp index fc8e6b7c..10f3f591 100644 --- a/kalarm/lib/spinbox.cpp +++ b/kalarm/lib/spinbox.cpp @@ -468,9 +468,9 @@ int SpinBox::shiftStepAdjustment(int oldValue, int shiftStep) */ int SpinBox::whichButton(const TQPoint& pos) { - if (upRect().tqcontains(pos)) + if (upRect().contains(pos)) return UP; - if (downRect().tqcontains(pos)) + if (downRect().contains(pos)) return DOWN; return NO_BUTTON; } diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp index 7be3c17c..caed93d7 100644 --- a/kalarm/lib/synchtimer.cpp +++ b/kalarm/lib/synchtimer.cpp @@ -46,7 +46,7 @@ SynchTimer::~SynchTimer() void SynchTimer::connecT(TQObject* receiver, const char* member) { Connection connection(receiver, member); - if (mConnections.tqfind(connection) != mConnections.end()) + if (mConnections.find(connection) != mConnections.end()) return; // the slot is already connected, so ignore request connect(mTimer, TQT_SIGNAL(timeout()), receiver, member); mConnections.append(connection); diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp index 1a2a6500..ccf0c449 100644 --- a/kalarm/lib/timespinbox.cpp +++ b/kalarm/lib/timespinbox.cpp @@ -124,7 +124,7 @@ TQString TimeSpinBox::mapValueToText(int v) int TimeSpinBox::mapTextToValue(bool* ok) { TQString text = cleanText(); - int colon = text.tqfind(':'); + int colon = text.find(':'); if (colon >= 0) { // [h]:m format for any time value @@ -309,7 +309,7 @@ TQValidator::State TimeSpinBox::TimeValidator::validate(TQString& text, int& /*c bool ok; int hr = 0; int mn = 0; - int colon = cleanText.tqfind(':'); + int colon = cleanText.find(':'); if (colon >= 0) { TQString minute = cleanText.mid(colon + 1); diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp index 34b13e5f..aa334c67 100644 --- a/kalarm/mainwindow.cpp +++ b/kalarm/mainwindow.cpp @@ -1397,7 +1397,7 @@ void MainWindow::setEnableText(bool enable) */ MainWindow* MainWindow::toggleWindow(MainWindow* win) { - if (win && mWindowList.tqfind(win) != mWindowList.end()) + if (win && mWindowList.find(win) != mWindowList.end()) { // A window is specified (and it exists) if (win->isVisible()) diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp index ca7dd824..6f0878c0 100644 --- a/kalarm/messagewin.cpp +++ b/kalarm/messagewin.cpp @@ -1622,7 +1622,7 @@ void MessageWin::displayMainWindow() */ bool MessageWin::haveErrorMessage(unsigned msg) const { - if (!mErrorMessages.tqcontains(mEventID)) + if (!mErrorMessages.contains(mEventID)) mErrorMessages.insert(mEventID, 0); bool result = (mErrorMessages[mEventID] & msg); mErrorMessages[mEventID] |= msg; @@ -1631,7 +1631,7 @@ bool MessageWin::haveErrorMessage(unsigned msg) const void MessageWin::clearErrorMessage(unsigned msg) const { - if (mErrorMessages.tqcontains(mEventID)) + if (mErrorMessages.contains(mEventID)) { if (mErrorMessages[mEventID] == msg) mErrorMessages.remove(mEventID); diff --git a/kalarm/prefdlg.cpp b/kalarm/prefdlg.cpp index 24a444b9..860d6819 100644 --- a/kalarm/prefdlg.cpp +++ b/kalarm/prefdlg.cpp @@ -399,11 +399,11 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) mXtermType->insert(radio, mXtermCount); if (mXtermFirst < 0) mXtermFirst = mXtermCount; // note the id of the first button - cmd.tqreplace("%t", kapp->aboutData()->programName()); - cmd.tqreplace("%c", ""); - cmd.tqreplace("%w", ""); - cmd.tqreplace("%C", "[command]"); - cmd.tqreplace("%W", "[command; sleep]"); + cmd.replace("%t", kapp->aboutData()->programName()); + cmd.replace("%c", ""); + cmd.replace("%w", ""); + cmd.replace("%C", "[command]"); + cmd.replace("%W", "[command; sleep]"); TQWhatsThis::add(radio, whatsThis.tqarg(cmd)); grid->addWidget(radio, (row = index/3 + 1), index % 3, TQt::AlignAuto); ++index; @@ -444,7 +444,7 @@ void MiscPrefTab::restore() { for ( ; id < mXtermCount; ++id) { - if (mXtermType->tqfind(id) && xtermCmd == xtermCommands[id]) + if (mXtermType->find(id) && xtermCmd == xtermCommands[id]) break; } } diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp index be1e5e6a..95b1b5a6 100644 --- a/kalarm/preferences.cpp +++ b/kalarm/preferences.cpp @@ -607,8 +607,8 @@ void Preferences::convertOldPrefs() static const TQString EMAIL_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailUseControlCenter"); static const TQString EMAIL_BCC_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailBccUseControlCenter"); TQMap entries = config->entryMap(GENERAL_SECTION); - if (entries.tqfind(EMAIL_FROM) == entries.end() - && entries.tqfind(EMAIL_USE_CTRL_CENTRE) != entries.end()) + if (entries.find(EMAIL_FROM) == entries.end() + && entries.find(EMAIL_USE_CTRL_CENTRE) != entries.end()) { // Preferences were written by KAlarm pre-1.2.1 config->setGroup(GENERAL_SECTION); diff --git a/kalarm/undo.cpp b/kalarm/undo.cpp index 81d101c3..4d951c17 100644 --- a/kalarm/undo.cpp +++ b/kalarm/undo.cpp @@ -68,7 +68,7 @@ class UndoItem UndoItem(Undo::Type); static TQString addDeleteActionText(KAEvent::tqStatus, bool add); TQString description(const KAEvent&) const; - void replaceWith(UndoItem* item) { Undo::tqreplace(this, item); } + void replaceWith(UndoItem* item) { Undo::replace(this, item); } int mId; // unique identifier (only for mType = UNDO, REDO) Undo::Type mType; // which list (if any) the object is in @@ -398,13 +398,13 @@ void Undo::remove(UndoItem* item, bool undo) /****************************************************************************** * Replace an undo item in one of the lists. */ -void Undo::tqreplace(UndoItem* old, UndoItem* New) +void Undo::replace(UndoItem* old, UndoItem* New) { Type type = old->type(); List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0; if (!list) return; - Iterator it = list->tqfind(old); + Iterator it = list->find(old); if (it != list->end()) { New->setType(type); // ensure the item points to the correct list @@ -468,7 +468,7 @@ TQValueList Undo::ids(Undo::Type type) for (Undo::List::ConstIterator u = undos.begin(); u != undos.end(); ++u) { TQString evid = (*u)->eventID(); - if (ignoreIDs.tqfind(evid) != ignoreIDs.end()) + if (ignoreIDs.find(evid) != ignoreIDs.end()) omit = true; else if (omit) ignoreIDs.append(evid); @@ -483,7 +483,7 @@ TQValueList Undo::ids(Undo::Type type) } else { - omit = (ignoreIDs.tqfind(item->eventID()) != ignoreIDs.end()); + omit = (ignoreIDs.find(item->eventID()) != ignoreIDs.end()); if (!omit) ignoreIDs.append(item->eventID()); if (item->operation() == UndoItem::EDIT) diff --git a/kalarm/undo.h b/kalarm/undo.h index 0f65cb9f..2bc2ca1e 100644 --- a/kalarm/undo.h +++ b/kalarm/undo.h @@ -71,7 +71,7 @@ class Undo : public TQObject // Methods for use by UndoItem class static void add(UndoItem*, bool undo); static void remove(UndoItem*, bool undo); - static void tqreplace(UndoItem* old, UndoItem* New); + static void replace(UndoItem* old, UndoItem* New); private: typedef TQValueList::Iterator Iterator; -- cgit v1.2.3