diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:59:50 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:59:50 -0600 |
commit | 9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch) | |
tree | ab537a329b9613e11dce8195761f93ffe82aed24 /kalarm/alarmcalendar.cpp | |
parent | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff) | |
download | tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kalarm/alarmcalendar.cpp')
-rw-r--r-- | kalarm/alarmcalendar.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp index 67cadfe8c..85bc17392 100644 --- a/kalarm/alarmcalendar.cpp +++ b/kalarm/alarmcalendar.cpp @@ -23,7 +23,7 @@ #include <time.h> #include <tqfile.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqregexp.h> #include <tqtimer.h> @@ -61,17 +61,17 @@ using namespace KCal; TQString AlarmCalendar::icalProductId() { - return TQString::fromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").arg(KAlarm::currentCalendarVersionString()); + return TQString::tqfromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").tqarg(KAlarm::currentCalendarVersionString()); } -static const KAEvent::Status eventTypes[AlarmCalendar::NCALS] = { +static const KAEvent::tqStatus eventTypes[AlarmCalendar::NCALS] = { KAEvent::ACTIVE, KAEvent::EXPIRED, KAEvent::DISPLAYING, KAEvent::TEMPLATE }; static const TQString calendarNames[AlarmCalendar::NCALS] = { - TQString::fromLatin1("calendar.ics"), - TQString::fromLatin1("expired.ics"), - TQString::fromLatin1("displaying.ics"), - TQString::fromLatin1("template.ics") + TQString::tqfromLatin1("calendar.ics"), + TQString::tqfromLatin1("expired.ics"), + TQString::tqfromLatin1("displaying.ics"), + TQString::tqfromLatin1("template.ics") }; static KStaticDeleter<AlarmCalendar> calendarDeleter[AlarmCalendar::NCALS]; // ensure that the calendar destructors are called @@ -91,10 +91,10 @@ AlarmCalendar* AlarmCalendar::mCalendars[NCALS] = { 0, 0, 0, 0 }; bool AlarmCalendar::initialiseCalendars() { KConfig* config = kapp->config(); - config->setGroup(TQString::fromLatin1("General")); - TQString activeKey = TQString::fromLatin1("Calendar"); - TQString expiredKey = TQString::fromLatin1("ExpiredCalendar"); - TQString templateKey = TQString::fromLatin1("TemplateCalendar"); + config->setGroup(TQString::tqfromLatin1("General")); + TQString activeKey = TQString::tqfromLatin1("Calendar"); + TQString expiredKey = TQString::tqfromLatin1("ExpiredCalendar"); + TQString templateKey = TQString::tqfromLatin1("TemplateCalendar"); TQString displayCal, activeCal, expiredCal, templateCal; calendarDeleter[ACTIVE].setObject(mCalendars[ACTIVE], createCalendar(ACTIVE, config, activeCal, activeKey)); calendarDeleter[EXPIRED].setObject(mCalendars[EXPIRED], createCalendar(EXPIRED, config, expiredCal, expiredKey)); @@ -112,7 +112,7 @@ bool AlarmCalendar::initialiseCalendars() { kdError(5950) << "AlarmCalendar::initialiseCalendars(): '" << errorKey1 << "' calendar name = display calendar name\n"; TQString file = config->readPathEntry(errorKey1); - KAlarmApp::displayFatalError(i18n("%1: file name not permitted: %2").arg(errorKey1).arg(file)); + KAlarmApp::displayFatalError(i18n("%1: file name not permitted: %2").tqarg(errorKey1).tqarg(file)); return false; } if (activeCal == expiredCal) @@ -133,14 +133,14 @@ bool AlarmCalendar::initialiseCalendars() if (!errorKey1.isNull()) { kdError(5950) << "AlarmCalendar::initialiseCalendars(): calendar names clash: " << errorKey1 << ", " << errorKey2 << endl; - KAlarmApp::displayFatalError(i18n("%1, %2: file names must be different").arg(errorKey1).arg(errorKey2)); + KAlarmApp::displayFatalError(i18n("%1, %2: file names must be different").tqarg(errorKey1).tqarg(errorKey2)); return false; } if (!mCalendars[ACTIVE]->valid()) { TQString path = mCalendars[ACTIVE]->path(); kdError(5950) << "AlarmCalendar::initialiseCalendars(): invalid name: " << path << endl; - KAlarmApp::displayFatalError(i18n("Invalid calendar file name: %1").arg(path)); + KAlarmApp::displayFatalError(i18n("Invalid calendar file name: %1").tqarg(path)); return false; } return true; @@ -152,8 +152,8 @@ bool AlarmCalendar::initialiseCalendars() */ AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, TQString& writePath, const TQString& configKey) { - static TQRegExp vcsRegExp(TQString::fromLatin1("\\.vcs$")); - static TQString ical = TQString::fromLatin1(".ics"); + static TQRegExp vcsRegExp(TQString::tqfromLatin1("\\.vcs$")); + static TQString ical = TQString::tqfromLatin1(".ics"); if (configKey.isNull()) { @@ -206,7 +206,7 @@ const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID) if (uniqueID.isEmpty()) return 0; CalID calID; - switch (KAEvent::uidStatus(uniqueID)) + switch (KAEvent::uidtqStatus(uniqueID)) { case KAEvent::ACTIVE: calID = ACTIVE; break; case KAEvent::TEMPLATE: calID = TEMPLATE; break; @@ -261,7 +261,7 @@ bool AlarmCalendar::open() kdDebug(5950) << "AlarmCalendar::open(" << mUrl.prettyURL() << ")\n"; if (!mCalendar) - mCalendar = new CalendarLocal(TQString::fromLatin1("UTC")); + mCalendar = new CalendarLocal(TQString::tqfromLatin1("UTC")); mCalendar->setLocalTime(); // write out using local time (i.e. no time zone) // Check for file's existence, assuming that it does exist when uncertain, @@ -321,7 +321,7 @@ int AlarmCalendar::load() if (!KIO::NetAccess::download(mUrl, tmpFile, MainWindow::mainMainWindow())) { kdError(5950) << "AlarmCalendar::load(): Load failure" << endl; - KMessageBox::error(0, i18n("Cannot open calendar:\n%1").arg(mUrl.prettyURL())); + KMessageBox::error(0, i18n("Cannot open calendar:\n%1").tqarg(mUrl.prettyURL())); return -1; } kdDebug(5950) << "AlarmCalendar::load(): --- Downloaded to " << tmpFile << endl; @@ -338,7 +338,7 @@ int AlarmCalendar::load() if (!fi.size()) return 0; // file is zero length kdError(5950) << "AlarmCalendar::load(): Error loading calendar file '" << tmpFile << "'" << endl; - KMessageBox::error(0, i18n("Error loading calendar:\n%1\n\nPlease fix or delete the file.").arg(mUrl.prettyURL())); + KMessageBox::error(0, i18n("Error loading calendar:\n%1\n\nPlease fix or delete the file.").tqarg(mUrl.prettyURL())); // load() could have partially populated the calendar, so clear it out mCalendar->close(); delete mCalendar; @@ -383,7 +383,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile) if (!mCalendar->save(saveFilename, new ICalFormat)) { kdError(5950) << "AlarmCalendar::saveCal(" << saveFilename << "): failed.\n"; - KMessageBox::error(0, i18n("Failed to save calendar to\n'%1'").arg(mICalUrl.prettyURL())); + KMessageBox::error(0, i18n("Failed to save calendar to\n'%1'").tqarg(mICalUrl.prettyURL())); return false; } @@ -392,7 +392,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile) if (!KIO::NetAccess::upload(saveFilename, mICalUrl, MainWindow::mainMainWindow())) { kdError(5950) << "AlarmCalendar::saveCal(" << saveFilename << "): upload failed.\n"; - KMessageBox::error(0, i18n("Cannot upload calendar to\n'%1'").arg(mICalUrl.prettyURL())); + KMessageBox::error(0, i18n("Cannot upload calendar to\n'%1'").tqarg(mICalUrl.prettyURL())); return false; } } @@ -404,7 +404,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile) if (!mConfigKey.isNull()) { KConfig* config = kapp->config(); - config->setGroup(TQString::fromLatin1("General")); + config->setGroup(TQString::tqfromLatin1("General")); config->writePathEntry(mConfigKey, mICalUrl.path()); config->sync(); } @@ -445,8 +445,8 @@ void AlarmCalendar::close() */ bool AlarmCalendar::importAlarms(TQWidget* parent) { - KURL url = KFileDialog::getOpenURL(TQString::fromLatin1(":importalarms"), - TQString::fromLatin1("*.vcs *.ics|%1").arg(i18n("Calendar Files")), parent); + KURL url = KFileDialog::getOpenURL(TQString::tqfromLatin1(":importalarms"), + TQString::tqfromLatin1("*.vcs *.ics|%1").tqarg(i18n("Calendar Files")), parent); if (url.isEmpty()) { kdError(5950) << "AlarmCalendar::importAlarms(): Empty URL" << endl; @@ -468,7 +468,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent) if (!KStandardDirs::exists(filename)) { kdDebug(5950) << "AlarmCalendar::importAlarms(): File '" << url.prettyURL() << "' not found" << endl; - KMessageBox::error(parent, i18n("Could not load calendar '%1'.").arg(url.prettyURL())); + KMessageBox::error(parent, i18n("Could not load calendar '%1'.").tqarg(url.prettyURL())); return false; } } @@ -477,20 +477,20 @@ bool AlarmCalendar::importAlarms(TQWidget* parent) if (!KIO::NetAccess::download(url, filename, MainWindow::mainMainWindow())) { kdError(5950) << "AlarmCalendar::importAlarms(): Download failure" << endl; - KMessageBox::error(parent, i18n("Cannot download calendar:\n%1").arg(url.prettyURL())); + KMessageBox::error(parent, i18n("Cannot download calendar:\n%1").tqarg(url.prettyURL())); return false; } kdDebug(5950) << "--- Downloaded to " << filename << endl; } // Read the calendar and add its alarms to the current calendars - CalendarLocal cal(TQString::fromLatin1("UTC")); + CalendarLocal cal(TQString::tqfromLatin1("UTC")); cal.setLocalTime(); // write out using local time (i.e. no time zone) success = cal.load(filename); if (!success) { kdDebug(5950) << "AlarmCalendar::importAlarms(): error loading calendar '" << filename << "'" << endl; - KMessageBox::error(parent, i18n("Could not load calendar '%1'.").arg(url.prettyURL())); + KMessageBox::error(parent, i18n("Could not load calendar '%1'.").tqarg(url.prettyURL())); } else { @@ -508,7 +508,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent) const Event* event = *it; if (event->alarms().isEmpty() || !KAEvent(*event).valid()) continue; // ignore events without alarms, or usable alarms - KAEvent::Status type = KAEvent::uidStatus(event->uid()); + KAEvent::tqStatus type = KAEvent::uidtqStatus(event->uid()); switch (type) { case KAEvent::ACTIVE: @@ -616,7 +616,7 @@ void AlarmCalendar::convertToICal() if (!mConfigKey.isNull()) { KConfig* config = kapp->config(); - config->setGroup(TQString::fromLatin1("General")); + config->setGroup(TQString::tqfromLatin1("General")); config->writePathEntry(mConfigKey, mICalUrl.path()); config->sync(); } @@ -688,7 +688,7 @@ void AlarmCalendar::purgeIfQueued() { kdDebug(5950) << "AlarmCalendar::purgeIfQueued(" << mPurgeDaysQueued << ")\n"; bool changed = false; - TQDate cutoff = TQDate::currentDate().addDays(-mPurgeDaysQueued); + TQDate cutoff = TQDate::tqcurrentDate().addDays(-mPurgeDaysQueued); Event::List events = mCalendar->rawEvents(); for (Event::List::ConstIterator it = events.begin(); it != events.end(); ++it) { @@ -807,9 +807,9 @@ bool AlarmCalendar::deleteEvent(const TQString& eventID, bool saveit) /****************************************************************************** * Emit a signal to indicate whether the calendar is empty. */ -void AlarmCalendar::emitEmptyStatus() +void AlarmCalendar::emitEmptytqStatus() { - emit emptyStatus(events().isEmpty()); + emit emptytqStatus(events().isEmpty()); } /****************************************************************************** |