diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-14 20:16:30 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-14 20:16:30 +0000 |
commit | 1c93fca14d9ce37499bcfdf994c660186a0b6f17 (patch) | |
tree | f2defe163a805a9e34a2142dfde4cdb5e49241e7 /kalarm | |
parent | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (diff) | |
download | tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.tar.gz tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.zip |
Enable kdepim compilation under Qt4
This will likely break Qt3 compilation temporarily, which is an unintended side effect.
A third and final kdepim commit will repair Qt3 compilation shortly.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm')
44 files changed, 303 insertions, 302 deletions
diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp index 2d4e962d5..8cbc7ceb7 100644 --- a/kalarm/alarmcalendar.cpp +++ b/kalarm/alarmcalendar.cpp @@ -61,7 +61,7 @@ using namespace KCal; TQString AlarmCalendar::icalProductId() { - return TQString::tqfromLatin1("-//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::tqStatus eventTypes[AlarmCalendar::NCALS] = { @@ -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; @@ -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; } } @@ -446,7 +446,7 @@ void AlarmCalendar::close() bool AlarmCalendar::importAlarms(TQWidget* tqparent) { KURL url = KFileDialog::getOpenURL(TQString::tqfromLatin1(":importalarms"), - TQString::tqfromLatin1("*.vcs *.ics|%1").arg(i18n("Calendar Files")), tqparent); + TQString::tqfromLatin1("*.vcs *.ics|%1").tqarg(i18n("Calendar Files")), tqparent); if (url.isEmpty()) { kdError(5950) << "AlarmCalendar::importAlarms(): Empty URL" << endl; @@ -468,7 +468,7 @@ bool AlarmCalendar::importAlarms(TQWidget* tqparent) if (!KStandardDirs::exists(filename)) { kdDebug(5950) << "AlarmCalendar::importAlarms(): File '" << url.prettyURL() << "' not found" << endl; - KMessageBox::error(tqparent, i18n("Could not load calendar '%1'.").arg(url.prettyURL())); + KMessageBox::error(tqparent, i18n("Could not load calendar '%1'.").tqarg(url.prettyURL())); return false; } } @@ -477,7 +477,7 @@ bool AlarmCalendar::importAlarms(TQWidget* tqparent) if (!KIO::NetAccess::download(url, filename, MainWindow::mainMainWindow())) { kdError(5950) << "AlarmCalendar::importAlarms(): Download failure" << endl; - KMessageBox::error(tqparent, i18n("Cannot download calendar:\n%1").arg(url.prettyURL())); + KMessageBox::error(tqparent, i18n("Cannot download calendar:\n%1").tqarg(url.prettyURL())); return false; } kdDebug(5950) << "--- Downloaded to " << filename << endl; @@ -490,7 +490,7 @@ bool AlarmCalendar::importAlarms(TQWidget* tqparent) if (!success) { kdDebug(5950) << "AlarmCalendar::importAlarms(): error loading calendar '" << filename << "'" << endl; - KMessageBox::error(tqparent, i18n("Could not load calendar '%1'.").arg(url.prettyURL())); + KMessageBox::error(tqparent, i18n("Could not load calendar '%1'.").tqarg(url.prettyURL())); } else { diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp index 66534b694..54f60a3c4 100644 --- a/kalarm/alarmevent.cpp +++ b/kalarm/alarmevent.cpp @@ -913,7 +913,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) else { oldtqStatus = ACTIVE; - i = result.findRev('-'); + i = result.tqfindRev('-'); len = 1; } if (status != oldtqStatus && i > 0) @@ -1000,7 +1000,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc if (mEmailBcc) cats.append(EMAIL_BCC_CATEGORY); if (mKMailSerialNumber) - cats.append(TQString("%1%2").arg(KMAIL_SERNUM_CATEGORY).arg(mKMailSerialNumber)); + cats.append(TQString("%1%2").tqarg(KMAIL_SERNUM_CATEGORY).tqarg(mKMailSerialNumber)); if (mCopyToKOrganizer) cats.append(KORGANIZER_CATEGORY); if (mCommandXterm) @@ -1008,11 +1008,11 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc else if (!mLogFile.isEmpty()) cats.append(LOG_CATEGORY + mLogFile); if (mLateCancel) - cats.append(TQString("%1%2").arg(mAutoClose ? AUTO_CLOSE_CATEGORY : LATE_CANCEL_CATEGORY).arg(mLateCancel)); + cats.append(TQString("%1%2").tqarg(mAutoClose ? AUTO_CLOSE_CATEGORY : LATE_CANCEL_CATEGORY).tqarg(mLateCancel)); if (mDeferDefaultMinutes) - cats.append(TQString("%1%2").arg(DEFER_CATEGORY).arg(mDeferDefaultMinutes)); + cats.append(TQString("%1%2").tqarg(DEFER_CATEGORY).tqarg(mDeferDefaultMinutes)); if (!mTemplateName.isEmpty() && mTemplateAfterTime >= 0) - cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(mTemplateAfterTime)); + cats.append(TQString("%1%2").tqarg(TEMPL_AFTER_TIME_CATEGORY).tqarg(mTemplateAfterTime)); if (mArchive && !original) { TQStringList params; @@ -1032,7 +1032,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc unit = 'H'; count /= 60; } - params += TQString("%1%2").arg(count).arg(unit); + params += TQString("%1%2").tqarg(count).tqarg(unit); } if (mArchiveRepeatAtLogin) params += AT_LOGIN_TYPE; @@ -1084,7 +1084,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc { // Alarm repetition is normally held in the main alarm, but since // the main alarm has expired, store in a custom property. - TQString param = TQString("%1:%2").arg(mRepeatInterval).arg(mRepeatCount); + TQString param = TQString("%1:%2").tqarg(mRepeatInterval).tqarg(mRepeatCount); ev.setCustomProperty(APPNAME, REPEAT_PROPERTY, param); } @@ -1251,9 +1251,9 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL } if (!mAudioFile.isEmpty() && mSoundVolume >= 0) alarm->setCustomProperty(APPNAME, VOLUME_PROPERTY, - TQString::tqfromLatin1("%1;%2;%3").arg(TQString::number(mSoundVolume, 'f', 2)) - .arg(TQString::number(mFadeVolume, 'f', 2)) - .arg(mFadeSeconds)); + TQString::tqfromLatin1("%1;%2;%3").tqarg(TQString::number(mSoundVolume, 'f', 2)) + .tqarg(TQString::number(mFadeVolume, 'f', 2)) + .tqarg(mFadeSeconds)); break; case KAAlarm::PRE_ACTION_ALARM: setProcedureAlarm(alarm, mPreAction); @@ -1277,9 +1277,9 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL case T_MESSAGE: alarm->setDisplayAlarm(AlarmText::toCalendarText(mText)); alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY, - TQString::tqfromLatin1("%1;%2;%3").arg(mBgColour.name()) - .arg(mFgColour.name()) - .arg(mDefaultFont ? TQString() : mFont.toString())); + TQString::tqfromLatin1("%1;%2;%3").tqarg(mBgColour.name()) + .tqarg(mFgColour.name()) + .tqarg(mDefaultFont ? TQString() : mFont.toString())); break; case T_COMMAND: if (mCommandScript) @@ -2093,7 +2093,7 @@ TQString KAEvent::recurrenceText(bool brief) const else { TQString mins; - return i18n("Hours and Minutes", "%1H %2M").arg(TQString::number(frequency/60)).arg(mins.sprintf("%02d", frequency%60)); + return i18n("Hours and Minutes", "%1H %2M").tqarg(TQString::number(frequency/60)).tqarg(mins.sprintf("%02d", frequency%60)); } case RecurrenceRule::rDaily: return i18n("1 Day", "%n Days", frequency); @@ -2125,7 +2125,7 @@ TQString KAEvent::repetitionText(bool brief) const if (mRepeatInterval % 60 == 0) return i18n("1 Hour", "%n Hours", mRepeatInterval/60); TQString mins; - return i18n("Hours and Minutes", "%1H %2M").arg(TQString::number(mRepeatInterval/60)).arg(mins.sprintf("%02d", mRepeatInterval%60)); + return i18n("Hours and Minutes", "%1H %2M").tqarg(TQString::number(mRepeatInterval/60)).tqarg(mins.sprintf("%02d", mRepeatInterval%60)); } if (mRepeatInterval % (7*1440)) return i18n("1 Day", "%n Days", mRepeatInterval/1440); @@ -2844,7 +2844,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju Alarm* alarm = *alit; if (alarm->type() == Alarm::Display) alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY, - TQString::tqfromLatin1("%1;;").arg(cats[0])); + TQString::tqfromLatin1("%1;;").tqarg(cats[0])); } cats.remove(cats.begin()); } @@ -2918,7 +2918,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju while ((it = cats.tqfind(TEMPL_DEF_TIME_CAT)) != cats.end()) { cats.remove(it); - cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(0)); + cats.append(TQString("%1%2").tqarg(TEMPL_AFTER_TIME_CATEGORY).tqarg(0)); } } @@ -2937,7 +2937,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju } if (addLateCancel) - cats.append(TQString("%1%2").arg(LATE_CANCEL_CATEGORY).arg(1)); + cats.append(TQString("%1%2").tqarg(LATE_CANCEL_CATEGORY).tqarg(1)); event->setCategories(cats); @@ -3321,11 +3321,11 @@ void KAAlarmEventBase::dumpDebug() const kdDebug(5950) << "-- Attachments:" << mEmailAttachments.join(", ") << ":\n"; kdDebug(5950) << "-- Bcc:" << (mEmailBcc ? "true" : "false") << ":\n"; } - kdDebug(5950) << "-- mBgColour:" << mBgColour.name() << ":\n"; - kdDebug(5950) << "-- mFgColour:" << mFgColour.name() << ":\n"; + kdDebug(5950) << "-- mBgColour:" << TQString(mBgColour.name()) << ":\n"; + kdDebug(5950) << "-- mFgColour:" << TQString(mFgColour.name()) << ":\n"; kdDebug(5950) << "-- mDefaultFont:" << (mDefaultFont ? "true" : "false") << ":\n"; if (!mDefaultFont) - kdDebug(5950) << "-- mFont:" << mFont.toString() << ":\n"; + kdDebug(5950) << "-- mFont:" << TQString(mFont.toString()) << ":\n"; kdDebug(5950) << "-- mBeep:" << (mBeep ? "true" : "false") << ":\n"; kdDebug(5950) << "-- mSpeak:" << (mSpeak ? "true" : "false") << ":\n"; if (mActionType == T_AUDIO) diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp index 4ef40f563..34eeffdab 100644 --- a/kalarm/alarmlistview.cpp +++ b/kalarm/alarmlistview.cpp @@ -348,7 +348,7 @@ TQString AlarmListView::whatsThisText(int column) const void AlarmListView::contentsMousePressEvent(TQMouseEvent* e) { TQListView::contentsMousePressEvent(e); - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) { TQPoint p(contentsToViewport(e->pos())); if (itemAt(p)) @@ -531,7 +531,7 @@ TQString AlarmListViewItem::timeToAlarmText(const TQDateTime& now) const if (dateTime.isDateOnly()) { int days = now.date().daysTo(dateTime.date()); - return i18n("n days", " %1d ").arg(days); + return i18n("n days", " %1d ").tqarg(days); } int mins = (now.secsTo(dateTime.dateTime()) + 59) / 60; if (mins < 0) @@ -540,10 +540,10 @@ TQString AlarmListViewItem::timeToAlarmText(const TQDateTime& now) const minutes[0] = (mins%60) / 10 + '0'; minutes[1] = (mins%60) % 10 + '0'; if (mins < 24*60) - return i18n("hours:minutes", " %1:%2 ").arg(mins/60).arg(minutes); + return i18n("hours:minutes", " %1:%2 ").tqarg(mins/60).tqarg(minutes); int days = mins / (24*60); mins = mins % (24*60); - return i18n("days hours:minutes", " %1d %2:%3 ").arg(days).arg(mins/60).arg(minutes); + return i18n("days hours:minutes", " %1d %2:%3 ").tqarg(days).tqarg(mins/60).tqarg(minutes); } /****************************************************************************** @@ -652,7 +652,7 @@ void AlarmListViewItem::paintCell(TQPainter* painter, const TQColorGroup& cg, in */ int AlarmListViewItem::typeIconWidth(AlarmListView* v) { - return iconWidth() + 2 * v->style().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); + return iconWidth() + 2 * v->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth); } /****************************************************************************** diff --git a/kalarm/alarmtimewidget.cpp b/kalarm/alarmtimewidget.cpp index 4ce881485..4443ae2fc 100644 --- a/kalarm/alarmtimewidget.cpp +++ b/kalarm/alarmtimewidget.cpp @@ -104,7 +104,7 @@ void AlarmTimeWidget::init(int mode) connect(mDateEdit, TQT_SIGNAL(dateEntered(const TQDate&)), TQT_SLOT(dateTimeChanged())); static const TQString enterDateText = i18n("Enter the date to schedule the alarm."); TQWhatsThis::add(mDateEdit, ((mode & DEFER_TIME) ? enterDateText - : TQString("%1\n%2").arg(enterDateText).arg(recurText))); + : TQString("%1\n%2").tqarg(enterDateText).tqarg(recurText))); mAtTimeRadio->setFocusWidget(mDateEdit); // Time edit box and Any time checkbox @@ -115,8 +115,8 @@ void AlarmTimeWidget::init(int mode) connect(mTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(dateTimeChanged())); static const TQString enterTimeText = i18n("Enter the time to schedule the alarm."); TQWhatsThis::add(mTimeEdit, - ((mode & DEFER_TIME) ? TQString("%1\n\n%2").arg(enterTimeText).arg(TimeSpinBox::shiftWhatsThis()) - : TQString("%1\n%2\n\n%3").arg(enterTimeText).arg(recurText).arg(TimeSpinBox::shiftWhatsThis()))); + ((mode & DEFER_TIME) ? TQString("%1\n\n%2").tqarg(enterTimeText).tqarg(TimeSpinBox::shiftWhatsThis()) + : TQString("%1\n%2\n\n%3").tqarg(enterTimeText).tqarg(recurText).tqarg(TimeSpinBox::shiftWhatsThis()))); mAnyTime = -1; // current status is uninitialised if (mode & DEFER_TIME) @@ -147,8 +147,8 @@ void AlarmTimeWidget::init(int mode) mDelayTimeEdit->setFixedSize(mDelayTimeEdit->tqsizeHint()); connect(mDelayTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(delayTimeChanged(int))); TQWhatsThis::add(mDelayTimeEdit, - ((mode & DEFER_TIME) ? TQString("%1\n\n%2").arg(i18n_TimeAfterPeriod()).arg(TimeSpinBox::shiftWhatsThis()) - : TQString("%1\n%2\n\n%3").arg(i18n_TimeAfterPeriod()).arg(recurText).arg(TimeSpinBox::shiftWhatsThis()))); + ((mode & DEFER_TIME) ? TQString("%1\n\n%2").tqarg(i18n_TimeAfterPeriod()).tqarg(TimeSpinBox::shiftWhatsThis()) + : TQString("%1\n%2\n\n%3").tqarg(i18n_TimeAfterPeriod()).tqarg(recurText).tqarg(TimeSpinBox::shiftWhatsThis()))); mAfterTimeRadio->setFocusWidget(mDelayTimeEdit); // Set up the tqlayout, either narrow or wide @@ -182,7 +182,7 @@ void AlarmTimeWidget::init(int mode) setButton(id(mAtTimeRadio)); // Timeout every minute to update alarm time fields. - MinuteTimer::connect(this, TQT_SLOT(slotTimer())); + MinuteTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(slotTimer())); } /****************************************************************************** @@ -266,7 +266,7 @@ DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool else { result.set(mDateEdit->date(), mTimeEdit->time()); - if (checkExpired && result <= now.addSecs(1)) + if (checkExpired && result <= TQDateTime(now.addSecs(1))) { if (showErrorMessage) KMessageBox::sorry(const_cast<AlarmTimeWidget*>(this), i18n("Alarm time has already expired")); @@ -290,7 +290,7 @@ DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool int delayMins = mDelayTimeEdit->value(); if (minsFromNow) *minsFromNow = delayMins; - return now.addSecs(delayMins * 60); + return TQDateTime(now.addSecs(delayMins * 60)); } } diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp index 5ed43275e..16e8a4ac1 100644 --- a/kalarm/birthdaydlg.cpp +++ b/kalarm/birthdaydlg.cpp @@ -85,7 +85,7 @@ BirthdayDlg::BirthdayDlg(TQWidget* tqparent) mPrefixText = config->readEntry(TQString::tqfromLatin1("BirthdayPrefix"), i18n("Birthday: ")); mSuffixText = config->readEntry(TQString::tqfromLatin1("BirthdaySuffix")); - TQGroupBox* textGroup = new TQGroupBox(2, TQt::Horizontal, i18n("Alarm Text"), topWidget); + TQGroupBox* textGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Alarm Text"), topWidget); topLayout->addWidget(textGroup); TQLabel* label = new TQLabel(i18n("Pre&fix:"), textGroup); mPrefix = new BLineEdit(mPrefixText, textGroup); @@ -105,7 +105,7 @@ BirthdayDlg::BirthdayDlg(TQWidget* tqparent) i18n("Enter text to appear after the person's name in the alarm message, " "including any necessary leading spaces.")); - TQGroupBox* group = new TQGroupBox(1, TQt::Horizontal, i18n("Select Birthdays"), topWidget); + TQGroupBox* group = new TQGroupBox(1, Qt::Horizontal, i18n("Select Birthdays"), topWidget); topLayout->addWidget(group); mAddresseeList = new BListView(group); mAddresseeList->setMultiSelection(true); @@ -421,7 +421,7 @@ BListView::BListView(TQWidget* tqparent, const char* name) : KListView(tqparent, name) { KAccel* accel = new KAccel(this); - accel->insert(KStdAccel::SelectAll, this, TQT_SLOT(slotSelectAll())); - accel->insert(KStdAccel::Deselect, this, TQT_SLOT(slotDeselect())); + accel->insert(KStdAccel::SelectAll, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll())); + accel->insert(KStdAccel::Deselect, TQT_TQOBJECT(this), TQT_SLOT(slotDeselect())); accel->readSettings(); } diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp index f3a466ea7..f7e340f85 100644 --- a/kalarm/daemon.cpp +++ b/kalarm/daemon.cpp @@ -221,7 +221,7 @@ void Daemon::registrationResult(bool reregister, int result, int version) failed = true; kdError(5950) << "Daemon::registrationResult(" << reregister << "): kalarmd reports incompatible version " << version << endl; errmsg = i18n("Cannot enable alarms.\nInstallation or configuration error: Alarm Daemon (%1) version is incompatible.") - .arg(TQString::tqfromLatin1(DAEMON_APP_NAME)); + .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)); } else { @@ -236,8 +236,8 @@ void Daemon::registrationResult(bool reregister, int result, int version) kdError(5950) << "Daemon::registrationResult(" << reregister << "): registerApp dcop call: " << kapp->aboutData()->appName() << " not found\n"; KMessageBox::error(0, i18n("Alarms will be disabled if you stop KAlarm.\n" "(Installation or configuration error: %1 cannot locate %2 executable.)") - .arg(TQString::tqfromLatin1(DAEMON_APP_NAME)) - .arg(kapp->aboutData()->appName())); + .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)) + .tqarg(kapp->aboutData()->appName())); break; case KAlarmd::FAILURE: default: @@ -248,7 +248,7 @@ void Daemon::registrationResult(bool reregister, int result, int version) if (!reregister) { errmsg = i18n("Cannot enable alarms:\nFailed to register with Alarm Daemon (%1)") - .arg(TQString::tqfromLatin1(DAEMON_APP_NAME)); + .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME)); } break; } @@ -304,7 +304,7 @@ void Daemon::checkIfStarted() if (err) { kdError(5950) << "Daemon::checkIfStarted(): failed to start daemon" << endl; - KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(TQString::tqfromLatin1(DAEMON_APP_NAME))); + KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME))); } } diff --git a/kalarm/dcophandler.cpp b/kalarm/dcophandler.cpp index 5f6e85074..c76f2a7fb 100644 --- a/kalarm/dcophandler.cpp +++ b/kalarm/dcophandler.cpp @@ -32,6 +32,7 @@ #include "karecurrence.h" #include "mainwindow.h" #include "preferences.h" +#include "dcophandler.h" #include "dcophandler.moc" static const char* DCOP_OBJECT_NAME = "request"; // DCOP name of KAlarm's request interface @@ -325,7 +326,7 @@ DateTime DcopHandler::convertStartDateTime(const TQString& startDateTime) if (startDateTime.length() > 10) { // Both a date and a time are specified - start = TQDateTime::fromString(startDateTime, TQt::ISODate); + start = TQDateTime::fromString(startDateTime, Qt::ISODate); } else { @@ -339,12 +340,12 @@ DateTime DcopHandler::convertStartDateTime(const TQString& startDateTime) if (t.isEmpty()) { // It's a date - start = TQDate::fromString(startDateTime, TQt::ISODate); + start = TQDate::fromString(startDateTime, Qt::ISODate); } else { // It's a time, so use today as the date - start.set(TQDate::tqcurrentDate(), TQTime::fromString(t, TQt::ISODate)); + start.set(TQDate::tqcurrentDate(), TQTime::fromString(t, Qt::ISODate)); } } if (!start.isValid()) @@ -426,7 +427,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c kdError(5950) << "DCOP call: alarm is date-only, but recurrence end is date/time" << endl; return false; } - end.setDate(TQDate::fromString(endDateTime, TQt::ISODate)); + end.setDate(TQDate::fromString(endDateTime, Qt::ISODate)); } else { @@ -435,7 +436,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c kdError(5950) << "DCOP call: alarm is timed, but recurrence end is date-only" << endl; return false; } - end = TQDateTime::fromString(endDateTime, TQt::ISODate); + end = TQDateTime::fromString(endDateTime, Qt::ISODate); } if (!end.isValid()) { diff --git a/kalarm/deferdlg.cpp b/kalarm/deferdlg.cpp index 75b95b8f5..4709f6a8f 100644 --- a/kalarm/deferdlg.cpp +++ b/kalarm/deferdlg.cpp @@ -107,7 +107,7 @@ void DeferAlarmDlg::slotOk() case KAEvent::LIMIT_NONE: break; // can't happen with a valid endTime } - KMessageBox::sorry(this, text.arg(endTime.formatLocale())); + KMessageBox::sorry(this, text.tqarg(endTime.formatLocale())); } else accept(); diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp index b93f681e6..f4ea9e654 100644 --- a/kalarm/editdlg.cpp +++ b/kalarm/editdlg.cpp @@ -129,10 +129,10 @@ inline TQString recurText(const KAEvent& event) { TQString r; if (event.repeatCount()) - r = TQString::tqfromLatin1("%1 / %2").arg(event.recurrenceText()).arg(event.repetitionText()); + r = TQString::tqfromLatin1("%1 / %2").tqarg(event.recurrenceText()).tqarg(event.repetitionText()); else r = event.recurrenceText(); - return i18n("&Recurrence - [%1]").arg(r); + return i18n("&Recurrence - [%1]").tqarg(r); } // Collect these widget labels together to ensure consistent wording and @@ -273,7 +273,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* tqp tqlayout->addWidget(mEmailFrame); // Deferred date/time: visible only for a deferred recurring event. - mDeferGroup = new TQGroupBox(1, TQt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup"); + mDeferGroup = new TQGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup"); topLayout->addWidget(mDeferGroup); TQLabel* label = new TQLabel(i18n("Deferred to:"), mDeferGroup); label->setFixedSize(label->tqsizeHint()); @@ -318,8 +318,8 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* tqp mTemplateTime->setFixedSize(mTemplateTime->tqsizeHint()); mTemplateTime->setReadOnly(mReadOnly); TQWhatsThis::add(mTemplateTime, - TQString("%1\n\n%2").arg(i18n("Enter the start time for alarms based on this template.")) - .arg(TimeSpinBox::shiftWhatsThis())); + TQString("%1\n\n%2").tqarg(i18n("Enter the start time for alarms based on this template.")) + .tqarg(TimeSpinBox::shiftWhatsThis())); box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls box->setFixedHeight(box->tqsizeHint().height()); grid->addWidget(box, 0, 1, tqalignment); @@ -328,7 +328,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* tqp mTemplateAnyTime->setFixedSize(mTemplateAnyTime->tqsizeHint()); mTemplateAnyTime->setReadOnly(mReadOnly); TQWhatsThis::add(mTemplateAnyTime, - i18n("Set the '%1' option for alarms based on this template.").arg(i18n("Any time"))); + i18n("Set the '%1' option for alarms based on this template.").tqarg(i18n("Any time"))); grid->addWidget(mTemplateAnyTime, 1, 0, tqalignment); box = new TQHBox(mTemplateTimeGroup); @@ -345,8 +345,8 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* tqp mTemplateTimeAfter->setFixedSize(mTemplateTimeAfter->tqsizeHint()); mTemplateTimeAfter->setReadOnly(mReadOnly); TQWhatsThis::add(mTemplateTimeAfter, - TQString("%1\n\n%2").arg(AlarmTimeWidget::i18n_TimeAfterPeriod()) - .arg(TimeSpinBox::shiftWhatsThis())); + TQString("%1\n\n%2").tqarg(AlarmTimeWidget::i18n_TimeAfterPeriod()) + .tqarg(TimeSpinBox::shiftWhatsThis())); box->setFixedHeight(box->tqsizeHint().height()); grid->addWidget(box, 1, 1, tqalignment); @@ -363,7 +363,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* tqp static const TQString reminderText = i18n("Enter how long in advance of the main alarm to display a reminder alarm."); mReminder = new Reminder(i18n("Rem&inder:"), i18n("Check to additionally display a reminder in advance of the main alarm time(s)."), - TQString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()), + TQString("%1\n\n%2").tqarg(reminderText).tqarg(TimeSpinBox::shiftWhatsThis()), true, true, mainPage); mReminder->setFixedSize(mReminder->tqsizeHint()); topLayout->addWidget(mReminder, 0, TQt::AlignAuto); @@ -517,7 +517,7 @@ void EditAlarmDlg::initCommand(TQWidget* tqparent) // Log file name edit box TQHBox* box = new TQHBox(mCmdOutputGroup); - (new TQWidget(box))->setFixedWidth(button->style().subRect(TQStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box + (new TQWidget(box))->setFixedWidth(button->tqstyle().subRect(TQStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box // (new TQWidget(box))->setFixedWidth(button->style().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorWidth)); // indent the edit box mCmdLogFileEdit = new LineEdit(LineEdit::Url, box); mCmdLogFileEdit->setAcceptDrops(true); @@ -712,7 +712,7 @@ void EditAlarmDlg::initialise(const KAEvent* event) int afterTime = event->templateAfterTime(); if (afterTime >= 0) { - mTimeWidget->setDateTime(now.addSecs(afterTime * 60)); + mTimeWidget->setDateTime(TQDateTime(now.addSecs(afterTime * 60))); mTimeWidget->selectTimeFromNow(); } else @@ -1424,7 +1424,7 @@ void EditAlarmDlg::slotOk() mTabs->setCurrentPage(mMainPageIndex); mReminder->setFocusOnCount(); KMessageBox::sorry(this, i18n("Reminder period must be less than the recurrence interval, unless '%1' is checked." - ).arg(Reminder::i18n_first_recurrence_only())); + ).tqarg(Reminder::i18n_first_recurrence_only())); return; } } @@ -1479,15 +1479,15 @@ void EditAlarmDlg::slotTry() if (mCommandRadio->isOn() && mCmdOutputGroup->selectedId() != EXEC_IN_TERMINAL) { theApp()->commandMessage((ShellProcess*)proc, this); - KMessageBox::information(this, i18n("Command executed:\n%1").arg(text)); + KMessageBox::information(this, i18n("Command executed:\n%1").tqarg(text)); theApp()->commandMessage((ShellProcess*)proc, 0); } else if (mEmailRadio->isOn()) { TQString bcc; if (mEmailBcc->isChecked()) - bcc = i18n("\nBcc: %1").arg(Preferences::emailBccAddress()); - KMessageBox::information(this, i18n("Email sent to:\n%1%2").arg(mEmailAddresses.join("\n")).arg(bcc)); + bcc = i18n("\nBcc: %1").tqarg(Preferences::emailBccAddress()); + KMessageBox::information(this, i18n("Email sent to:\n%1%2").tqarg(mEmailAddresses.join("\n")).tqarg(bcc)); } } } @@ -1728,7 +1728,7 @@ bool EditAlarmDlg::checkEmailData() if (!bad.isEmpty()) { mEmailToEdit->setFocus(); - KMessageBox::error(this, i18n("Invalid email address:\n%1").arg(bad)); + KMessageBox::error(this, i18n("Invalid email address:\n%1").tqarg(bad)); return false; } } @@ -1752,7 +1752,7 @@ bool EditAlarmDlg::checkEmailData() break; // empty case -1: mEmailAttachList->setFocus(); - KMessageBox::error(this, i18n("Invalid email attachment:\n%1").arg(att)); + KMessageBox::error(this, i18n("Invalid email attachment:\n%1").tqarg(att)); return false; } } @@ -2012,7 +2012,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const default: break; } - if (KMessageBox::warningContinueCancel(const_cast<EditAlarmDlg*>(this), errmsg.arg(alarmtext)) + if (KMessageBox::warningContinueCancel(const_cast<EditAlarmDlg*>(this), errmsg.tqarg(alarmtext)) == KMessageBox::Cancel) return false; } diff --git a/kalarm/emailidcombo.cpp b/kalarm/emailidcombo.cpp index 20b0ad198..388fa4573 100644 --- a/kalarm/emailidcombo.cpp +++ b/kalarm/emailidcombo.cpp @@ -31,7 +31,7 @@ void EmailIdCombo::mousePressEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == LeftButton) + if (e->button() == Qt::LeftButton) return; } KPIM::IdentityCombo::mousePressEvent(e); diff --git a/kalarm/find.cpp b/kalarm/find.cpp index 77e841407..e3732eaa0 100644 --- a/kalarm/find.cpp +++ b/kalarm/find.cpp @@ -113,7 +113,7 @@ void Find::display() "This option is only available if expired alarms are currently being displayed.")); grid->addWidget(mExpired, 1, 2, TQt::AlignAuto); - mActiveExpiredSep = new KSeparator(TQt::Horizontal, kalarmWidgets); + mActiveExpiredSep = new KSeparator(Qt::Horizontal, kalarmWidgets); grid->addMultiCellWidget(mActiveExpiredSep, 2, 2, 0, 2); // Alarm actions @@ -307,40 +307,40 @@ void Find::findNext(bool forward, bool sort, bool checkEnd, bool fromCurrent) if (!(mOptions & FIND_MESSAGE)) break; mFind->setData(event.cleanText()); - found = (mFind->tqfind() == KFind::Match); + found = (mFind->find() == KFind::Match); break; case KAEvent::FILE: if (!(mOptions & FIND_FILE)) break; mFind->setData(event.cleanText()); - found = (mFind->tqfind() == KFind::Match); + found = (mFind->find() == KFind::Match); break; case KAEvent::COMMAND: if (!(mOptions & FIND_COMMAND)) break; mFind->setData(event.cleanText()); - found = (mFind->tqfind() == KFind::Match); + found = (mFind->find() == KFind::Match); break; case KAEvent::EMAIL: if (!(mOptions & FIND_EMAIL)) break; mFind->setData(event.emailAddresses(", ")); - found = (mFind->tqfind() == KFind::Match); + found = (mFind->find() == KFind::Match); if (found) break; mFind->setData(event.emailSubject()); - found = (mFind->tqfind() == KFind::Match); + found = (mFind->find() == KFind::Match); if (found) break; mFind->setData(event.emailAttachments().join(", ")); - found = (mFind->tqfind() == KFind::Match); + found = (mFind->find() == KFind::Match); if (found) break; mFind->setData(event.cleanText()); - found = (mFind->tqfind() == KFind::Match); + found = (mFind->find() == KFind::Match); break; } if (found) diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp index 97d046896..26b16d226 100644 --- a/kalarm/functions.cpp +++ b/kalarm/functions.cpp @@ -633,7 +633,7 @@ void outputAlarmWarnings(TQWidget* tqparent, const KAEvent* event) if (event && event->action() == KAEvent::EMAIL && Preferences::emailAddress().isEmpty()) KMessageBox::information(tqparent, i18n("Please set the 'From' email address...", - "%1\nPlease set it in the Preferences dialog.").arg(KAMail::i18n_NeedFromEmailAddress())); + "%1\nPlease set it in the Preferences dialog.").tqarg(KAMail::i18n_NeedFromEmailAddress())); if (!Daemon::monitoringAlarms()) { @@ -705,7 +705,7 @@ TQString runKMail(bool minimise) TQCString dcopName; TQString errmsg; if (!runProgram("kmail", (minimise ? KMAIL_DCOP_WINDOW : ""), dcopName, errmsg)) - return i18n("Unable to start KMail\n(%1)").arg(errmsg); + return i18n("Unable to start KMail\n(%1)").tqarg(errmsg); return TQString(); } @@ -747,9 +747,9 @@ bool readConfigWindowSize(const char* window, TQSize& result) { KConfig* config = KGlobal::config(); config->setGroup(TQString::tqfromLatin1(window)); - TQWidget* desktop = KApplication::desktop(); - TQSize s = TQSize(config->readNumEntry(TQString::tqfromLatin1("Width %1").arg(desktop->width()), 0), - config->readNumEntry(TQString::tqfromLatin1("Height %1").arg(desktop->height()), 0)); + TQWidget* desktop = TQT_TQWIDGET(KApplication::desktop()); + TQSize s = TQSize(config->readNumEntry(TQString::tqfromLatin1("Width %1").tqarg(desktop->width()), 0), + config->readNumEntry(TQString::tqfromLatin1("Height %1").tqarg(desktop->height()), 0)); if (s.isEmpty()) return false; result = s; @@ -764,9 +764,9 @@ void writeConfigWindowSize(const char* window, const TQSize& size) { KConfig* config = KGlobal::config(); config->setGroup(TQString::tqfromLatin1(window)); - TQWidget* desktop = KApplication::desktop(); - config->writeEntry(TQString::tqfromLatin1("Width %1").arg(desktop->width()), size.width()); - config->writeEntry(TQString::tqfromLatin1("Height %1").arg(desktop->height()), size.height()); + TQWidget* desktop = TQT_TQWIDGET(KApplication::desktop()); + config->writeEntry(TQString::tqfromLatin1("Width %1").tqarg(desktop->width()), size.width()); + config->writeEntry(TQString::tqfromLatin1("Height %1").tqarg(desktop->height()), size.height()); config->sync(); } diff --git a/kalarm/kalarm.h b/kalarm/kalarm.h index e0af27f57..f433b3ff0 100644 --- a/kalarm/kalarm.h +++ b/kalarm/kalarm.h @@ -33,7 +33,7 @@ #define AUTOSTART_BY_KALARMD // temporary fix for autostart before session restoration -#define OLD_DCOP // retain DCOP pre-1.2 compatibility +// #define OLD_DCOP // retain DCOP pre-1.2 compatibility #endif // KALARM_H diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp index fd81aed47..d37e0dcda 100644 --- a/kalarm/kalarmapp.cpp +++ b/kalarm/kalarmapp.cpp @@ -109,7 +109,7 @@ KAlarmApp::KAlarmApp() mSpeechEnabled(false) { Preferences::initialise(); - Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPreferencesChanged())); + Preferences::connect(TQT_SIGNAL(preferencesChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotPreferencesChanged())); KCal::CalFormat::setApplication(aboutData()->programName(), AlarmCalendar::icalProductId()); KARecurrence::setDefaultFeb29Type(Preferences::defaultFeb29Type()); @@ -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::tqfromLatin1("--calendarURL")).arg(TQString::tqfromLatin1("--handleEvent")).arg(TQString::tqfromLatin1("--triggerEvent")).arg(TQString::tqfromLatin1("--cancelEvent"))) + USAGE(i18n("%1 requires %2, %3 or %4").tqarg(TQString::tqfromLatin1("--calendarURL")).tqarg(TQString::tqfromLatin1("--handleEvent")).tqarg(TQString::tqfromLatin1("--triggerEvent")).tqarg(TQString::tqfromLatin1("--cancelEvent"))) if (count > 1) - USAGE(i18n("%1, %2, %3 mutually exclusive").arg(TQString::tqfromLatin1("--handleEvent")).arg(TQString::tqfromLatin1("--triggerEvent")).arg(TQString::tqfromLatin1("--cancelEvent"))); + USAGE(i18n("%1, %2, %3 mutually exclusive").tqarg(TQString::tqfromLatin1("--handleEvent")).tqarg(TQString::tqfromLatin1("--triggerEvent")).tqarg(TQString::tqfromLatin1("--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").arg(TQString::tqfromLatin1("--calendarURL"))) + USAGE(i18n("%1: wrong calendar file").tqarg(TQString::tqfromLatin1("--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").arg(TQString::tqfromLatin1("--edit")).arg(eventID)) + USAGE(i18n("%1: Event %2 not found, or not editable").tqarg(TQString::tqfromLatin1("--edit")).tqarg(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::tqfromLatin1("--exec")).arg(TQString::tqfromLatin1("--file"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--exec")).tqarg(TQString::tqfromLatin1("--file"))) if (args->isSet("mail")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--mail")).arg(TQString::tqfromLatin1("--file"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--mail")).tqarg(TQString::tqfromLatin1("--file"))) if (args->count()) - USAGE(i18n("message incompatible with %1").arg(TQString::tqfromLatin1("--file"))) + USAGE(i18n("message incompatible with %1").tqarg(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::tqfromLatin1("--mail")).arg(TQString::tqfromLatin1("--exec"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--mail")).tqarg(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::tqfromLatin1("--mail"))) + USAGE(i18n("%1: invalid email address").tqarg(TQString::tqfromLatin1("--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").arg(TQString::tqfromLatin1("--subject")).arg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--subject")).tqarg(TQString::tqfromLatin1("--mail"))) if (args->isSet("from-id")) - USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--from-id")).arg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--from-id")).tqarg(TQString::tqfromLatin1("--mail"))) if (args->isSet("attach")) - USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--attach")).arg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--attach")).tqarg(TQString::tqfromLatin1("--mail"))) if (args->isSet("bcc")) - USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--bcc")).arg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--bcc")).tqarg(TQString::tqfromLatin1("--mail"))) } bool alarmNoTime = false; @@ -478,7 +478,7 @@ int KAlarmApp::newInstance() colourText.tqreplace(0, 2, "#"); bgColour.setNamedColor(colourText); if (!bgColour.isValid()) - USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--color"))) + USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--color"))) } if (args->isSet("colorfg")) { @@ -489,14 +489,14 @@ int KAlarmApp::newInstance() colourText.tqreplace(0, 2, "#"); fgColour.setNamedColor(colourText); if (!fgColour.isValid()) - USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--colorfg"))) + USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--colorfg"))) } if (args->isSet("time")) { TQCString dateTime = args->getOption("time"); if (!convWakeTime(dateTime, alarmTime, alarmNoTime)) - USAGE(i18n("Invalid %1 parameter").arg(TQString::tqfromLatin1("--time"))) + USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--time"))) } else alarmTime = TQDateTime::tqcurrentDateTime(); @@ -505,9 +505,9 @@ int KAlarmApp::newInstance() if (haveRecurrence) { if (args->isSet("login")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--login")).arg(TQString::tqfromLatin1("--recurrence"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--login")).tqarg(TQString::tqfromLatin1("--recurrence"))) if (args->isSet("until")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--until")).arg(TQString::tqfromLatin1("--recurrence"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--until")).tqarg(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::tqfromLatin1("--login")).arg(TQString::tqfromLatin1("--interval"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--login")).tqarg(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::tqfromLatin1("--repeat"))) + USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--repeat"))) } else if (haveRecurrence) - USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--interval")).arg(TQString::tqfromLatin1("--repeat"))) + USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--interval")).tqarg(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::tqfromLatin1("--until"))) + USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--until"))) if (endTime < alarmTime) - USAGE(i18n("%1 earlier than %2").arg(TQString::tqfromLatin1("--until")).arg(TQString::tqfromLatin1("--time"))) + USAGE(i18n("%1 earlier than %2").tqarg(TQString::tqfromLatin1("--until")).tqarg(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::tqfromLatin1("--interval"))) + USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--interval"))) if (alarmNoTime && recurType == KARecurrence::MINUTELY) - USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(TQString::tqfromLatin1("--interval"))) + USAGE(i18n("Invalid %1 parameter for date-only alarm").tqarg(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::tqfromLatin1("--interval")).arg(TQString::tqfromLatin1("--repeat")).arg(TQString::tqfromLatin1("--recurrence"))); + 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"))); repeatCount = count; repeatInterval = interval; } @@ -566,9 +566,9 @@ int KAlarmApp::newInstance() else { if (args->isSet("repeat")) - USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--repeat")).arg(TQString::tqfromLatin1("--interval"))) + USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--repeat")).tqarg(TQString::tqfromLatin1("--interval"))) if (args->isSet("until")) - USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--until")).arg(TQString::tqfromLatin1("--interval"))) + USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--until")).tqarg(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::tqfromLatin1("--play")).arg(TQString::tqfromLatin1("--play-repeat"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--play")).tqarg(TQString::tqfromLatin1("--play-repeat"))) if (args->isSet("beep")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--beep")).arg(TQString::tqfromLatin1(audioRepeat ? "--play-repeat" : "--play"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--beep")).tqarg(TQString::tqfromLatin1(audioRepeat ? "--play-repeat" : "--play"))) if (args->isSet("speak")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--speak")).arg(TQString::tqfromLatin1(audioRepeat ? "--play-repeat" : "--play"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--speak")).tqarg(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::tqfromLatin1("--volume"))) + USAGE(i18n("Invalid %1 parameter").tqarg(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::tqfromLatin1("--volume")).arg(TQString::tqfromLatin1("--play")).arg(TQString::tqfromLatin1("--play-repeat"))) + USAGE(i18n("%1 requires %2 or %3").tqarg(TQString::tqfromLatin1("--volume")).tqarg(TQString::tqfromLatin1("--play")).tqarg(TQString::tqfromLatin1("--play-repeat"))) #endif if (args->isSet("speak")) { if (args->isSet("beep")) - USAGE(i18n("%1 incompatible with %2").arg(TQString::tqfromLatin1("--beep")).arg(TQString::tqfromLatin1("--speak"))) + USAGE(i18n("%1 incompatible with %2").tqarg(TQString::tqfromLatin1("--beep")).tqarg(TQString::tqfromLatin1("--speak"))) if (!mSpeechEnabled) - USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").arg(TQString::tqfromLatin1("--speak"))) + USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").tqarg(TQString::tqfromLatin1("--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").arg(TQString::tqfromLatin1("--reminder")).arg(TQString::tqfromLatin1("--reminder-once"))) + 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"); if (args->isSet("exec")) - USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::tqfromLatin1("--exec"))) + USAGE(i18n("%1 incompatible with %2").tqarg(opt).tqarg(TQString::tqfromLatin1("--exec"))) if (args->isSet("mail")) - USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::tqfromLatin1("--mail"))) + USAGE(i18n("%1 incompatible with %2").tqarg(opt).tqarg(TQString::tqfromLatin1("--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").arg(opt)) + USAGE(i18n("Invalid %1 parameter").tqarg(opt)) if (recurType == KARecurrence::MINUTELY && alarmNoTime) - USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(opt)) + USAGE(i18n("Invalid %1 parameter for date-only alarm").tqarg(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").arg(TQString::tqfromLatin1("late-cancel"))) + USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("late-cancel"))) } else if (args->isSet("auto-close")) - USAGE(i18n("%1 requires %2").arg(TQString::tqfromLatin1("--auto-close")).arg(TQString::tqfromLatin1("--late-cancel"))) + USAGE(i18n("%1 requires %2").tqarg(TQString::tqfromLatin1("--auto-close")).tqarg(TQString::tqfromLatin1("--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").arg(TQString::tqfromLatin1("--file")).arg(TQString::tqfromLatin1("--exec")); + usage += i18n(": option(s) only valid with a message/%1/%2").tqarg(TQString::tqfromLatin1("--file")).tqarg(TQString::tqfromLatin1("--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::tqfromLatin1("cat >>%1").arg(event.logFile())); + logproc = new ShellProcess(TQString::tqfromLatin1("cat >>%1").tqarg(event.logFile())); connect(logproc, TQT_SIGNAL(shellExited(ShellProcess*)), TQT_SLOT(slotLogProcExited(ShellProcess*))); logproc->start(KProcess::Stdin); TQCString heading; diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp index 2752a3689..e1f0823ae 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.findIndex(url); // get unique index for this URL + mUrlIndex = mCalendarUrls.tqfindIndex(url); // get unique index for this URL if (mUrlIndex < 0) { mUrlIndex = static_cast<int>(mCalendarUrls.count()); diff --git a/kalarm/kalarmd/adconfigdata.cpp b/kalarm/kalarmd/adconfigdata.cpp index 68344fa28..9f471e4da 100644 --- a/kalarm/kalarmd/adconfigdata.cpp +++ b/kalarm/kalarmd/adconfigdata.cpp @@ -104,7 +104,7 @@ void ADConfigData::writeClient(const TQCString& appName, const ClientInfo* cinfo KConfig* config = KGlobal::config(); config->setGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName)); config->writeEntry(TITLE_KEY, cinfo->title()); - config->writeEntry(DCOP_OBJECT_KEY, TQString::fromLocal8Bit(cinfo->dcopObject())); + config->writeEntry(DCOP_OBJECT_KEY, TQString(TQString::fromLocal8Bit(cinfo->dcopObject()))); config->writeEntry(START_CLIENT_KEY, cinfo->startClient()); config->writePathEntry(CALENDAR_KEY, cinfo->calendar()->urlString()); config->sync(); diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp index 98647d93b..558406626 100644 --- a/kalarm/kamail.cpp +++ b/kalarm/kamail.cpp @@ -115,14 +115,14 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify) if (identity.isNull()) { kdError(5950) << "KAMail::send(): identity" << event.emailFromId() << "not found" << endl; - errmsgs = errors(i18n("Invalid 'From' email address.\nKMail identity '%1' not found.").arg(event.emailFromId())); + errmsgs = errors(i18n("Invalid 'From' email address.\nKMail identity '%1' not found.").tqarg(event.emailFromId())); return false; } from = identity.fullEmailAddr(); if (from.isEmpty()) { kdError(5950) << "KAMail::send(): identity" << identity.identityName() << "uoid" << identity.uoid() << ": no email address" << endl; - errmsgs = errors(i18n("Invalid 'From' email address.\nEmail identity '%1' has no email address").arg(identity.identityName())); + errmsgs = errors(i18n("Invalid 'From' email address.\nEmail identity '%1' has no email address").tqarg(identity.identityName())); return false; } } @@ -167,7 +167,7 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify) command = KStandardDirs::findExe(TQString::tqfromLatin1("mail")); if (command.isNull()) { - errmsgs = errors(i18n("%1 not found").arg(TQString::tqfromLatin1("sendmail"))); // give up + errmsgs = errors(i18n("%1 not found").tqarg(TQString::tqfromLatin1("sendmail"))); // give up return false; } @@ -387,14 +387,14 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId) TQString from = data.from; from.tqreplace(TQRegExp("^.*<"), TQString()).tqreplace(TQRegExp(">.*$"), TQString()); message = TQString::tqfromLatin1(buff); - message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from); + message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").tqarg(timenow).tqarg(tod.tv_usec).tqarg(from); } message += TQString::tqfromLatin1("From: ") + data.from; message += TQString::tqfromLatin1("\nTo: ") + data.event.emailAddresses(", "); if (!data.bcc.isEmpty()) message += TQString::tqfromLatin1("\nBcc: ") + data.bcc; message += TQString::tqfromLatin1("\nSubject: ") + data.event.emailSubject(); - message += TQString::tqfromLatin1("\nX-Mailer: %1/" KALARM_VERSION).arg(kapp->aboutData()->programName()); + message += TQString::tqfromLatin1("\nX-Mailer: %1/" KALARM_VERSION).tqarg(kapp->aboutData()->programName()); return message; } @@ -427,12 +427,12 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) TQCString boundary; boundary.sprintf("------------_%lu_-%lx=", 2*timenow, timenow); message += TQString::tqfromLatin1("\nMIME-Version: 1.0"); - message += TQString::tqfromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").arg(boundary); + message += TQString::tqfromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").tqarg(boundary.data()); if (!event.message().isEmpty()) { // There is a message body - message += TQString::tqfromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").arg(boundary); + message += TQString::tqfromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").tqarg(boundary.data()); message += event.message(); } @@ -446,12 +446,12 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) KIO::UDSEntry uds; if (!KIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow())) { kdError(5950) << "KAMail::appendBodyAttachments(): not found: " << attachment << endl; - return i18n("Attachment not found:\n%1").arg(attachment); + return i18n("Attachment not found:\n%1").tqarg(attachment); } KFileItem fi(uds, url); if (fi.isDir() || !fi.isReadable()) { kdError(5950) << "KAMail::appendBodyAttachments(): not file/not readable: " << attachment << endl; - return attachError.arg(attachment); + return attachError.tqarg(attachment); } // Check if the attachment is a text file @@ -463,21 +463,21 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) text = (mimeType == textMimeTypes[i]); } - message += TQString::tqfromLatin1("\n--%1").arg(boundary); - message += TQString::tqfromLatin1("\nContent-Type: %2; name=\"%3\"").arg(mimeType).arg(fi.text()); - message += TQString::tqfromLatin1("\nContent-Transfer-Encoding: %1").arg(TQString::tqfromLatin1(text ? "8bit" : "BASE64")); - message += TQString::tqfromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").arg(fi.text()); + message += TQString::tqfromLatin1("\n--%1").tqarg(boundary.data()); + message += TQString::tqfromLatin1("\nContent-Type: %2; name=\"%3\"").tqarg(mimeType).tqarg(fi.text()); + message += TQString::tqfromLatin1("\nContent-Transfer-Encoding: %1").tqarg(TQString::tqfromLatin1(text ? "8bit" : "BASE64")); + message += TQString::tqfromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").tqarg(fi.text()); // Read the file contents TQString tmpFile; if (!KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow())) { kdError(5950) << "KAMail::appendBodyAttachments(): load failure: " << attachment << endl; - return attachError.arg(attachment); + return attachError.tqarg(attachment); } TQFile file(tmpFile); if (!file.open(IO_ReadOnly) ) { kdDebug(5950) << "KAMail::appendBodyAttachments() tmp load error: " << attachment << endl; - return attachError.arg(attachment); + return attachError.tqarg(attachment); } TQIODevice::Offset size = file.size(); char* contents = new char [size + 1]; @@ -509,9 +509,9 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) } delete[] contents; if (atterror) - return attachError.arg(attachment); + return attachError.tqarg(attachment); } - message += TQString::tqfromLatin1("\n--%1--\n.\n").arg(boundary); + message += TQString::tqfromLatin1("\n--%1--\n.\n").tqarg(boundary.data()); } return TQString(); } @@ -922,10 +922,10 @@ char* KAMail::base64Encode(const char* in, TQIODevice::Offset size, TQIODevice:: TQStringList KAMail::errors(const TQString& err, bool sendfail) { TQString error1 = sendfail ? i18n("Failed to send email") - : i18n("Error copying sent email to KMail %1 folder").arg(i18n_sent_mail()); + : i18n("Error copying sent email to KMail %1 folder").tqarg(i18n_sent_mail()); if (err.isEmpty()) return TQStringList(error1); - TQStringList errs(TQString::tqfromLatin1("%1:").arg(error1)); + TQStringList errs(TQString::tqfromLatin1("%1:").tqarg(error1)); errs += err; return errs; } diff --git a/kalarm/lib/checkbox.cpp b/kalarm/lib/checkbox.cpp index cff6cdb17..1d9cabffb 100644 --- a/kalarm/lib/checkbox.cpp +++ b/kalarm/lib/checkbox.cpp @@ -44,7 +44,7 @@ void CheckBox::setReadOnly(bool ro) if ((int)ro != (int)mReadOnly) { mReadOnly = ro; - setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy); + setFocusPolicy(ro ? Qt::NoFocus : mFocusPolicy); if (ro) clearFocus(); } @@ -86,7 +86,7 @@ void CheckBox::mousePressEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQCheckBox::mousePressEvent(e); @@ -97,7 +97,7 @@ void CheckBox::mouseReleaseEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQCheckBox::mouseReleaseEvent(e); diff --git a/kalarm/lib/checkbox.h b/kalarm/lib/checkbox.h index 6b6985cd6..e535d4eab 100644 --- a/kalarm/lib/checkbox.h +++ b/kalarm/lib/checkbox.h @@ -80,7 +80,7 @@ class CheckBox : public TQCheckBox protected slots: void slotClicked(); private: - TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the TQCheckBox + Qt::FocusPolicy mFocusPolicy; // default focus policy for the TQCheckBox TQWidget* mFocusWidget; // widget to receive focus when button is clicked on bool mFocusWidgetEnable; // enable focus widget before setting focus bool mReadOnly; // value cannot be changed diff --git a/kalarm/lib/colourcombo.cpp b/kalarm/lib/colourcombo.cpp index 769e6518b..5cea7fb83 100644 --- a/kalarm/lib/colourcombo.cpp +++ b/kalarm/lib/colourcombo.cpp @@ -41,7 +41,7 @@ ColourCombo::ColourCombo(TQWidget* tqparent, const char* name, const TQColor& de addColours(); connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int))); connect(this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotHighlighted(int))); - Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPreferencesChanged())); + Preferences::connect(TQT_SIGNAL(preferencesChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotPreferencesChanged())); } void ColourCombo::setColour(const TQColor& colour) @@ -208,7 +208,7 @@ void ColourCombo::mousePressEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQComboBox::mousePressEvent(e); diff --git a/kalarm/lib/colourlist.h b/kalarm/lib/colourlist.h index 7bee8d149..91fabaf92 100644 --- a/kalarm/lib/colourlist.h +++ b/kalarm/lib/colourlist.h @@ -95,7 +95,7 @@ class ColourList /** 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.findIndex(c.rgb()); } + int findIndex(const TQColor& c) const { return mList.tqfindIndex(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/combobox.cpp b/kalarm/lib/combobox.cpp index 0c526cae3..2acb5a442 100644 --- a/kalarm/lib/combobox.cpp +++ b/kalarm/lib/combobox.cpp @@ -47,7 +47,7 @@ void ComboBox::mousePressEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQComboBox::mousePressEvent(e); diff --git a/kalarm/lib/dateedit.cpp b/kalarm/lib/dateedit.cpp index 38a6a5cba..0a916d9f6 100644 --- a/kalarm/lib/dateedit.cpp +++ b/kalarm/lib/dateedit.cpp @@ -81,7 +81,7 @@ void DateEdit::pastLimitMessage(const TQDate& limit, const TQString& error, cons errString = i18n("today"); else errString = KGlobal::locale()->formatDate(limit, true); - errString = defaultError.arg(errString); + errString = defaultError.tqarg(errString); } KMessageBox::sorry(this, errString); } @@ -91,7 +91,7 @@ void DateEdit::mousePressEvent(TQMouseEvent *e) if (isReadOnly()) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } KDateEdit::mousePressEvent(e); diff --git a/kalarm/lib/datetime.h b/kalarm/lib/datetime.h index 976bada90..bcfa434b1 100644 --- a/kalarm/lib/datetime.h +++ b/kalarm/lib/datetime.h @@ -169,7 +169,7 @@ class DateTime * If it is a date-time, both time and date are included in the output. * If it is date-only, only the date is included in the output. */ - TQString toString(TQt::DateFormat f = TQt::TextDate) const + TQString toString(Qt::DateFormat f = Qt::TextDate) const { if (mDateOnly) return mDateTime.date().toString(f); diff --git a/kalarm/lib/label.cpp b/kalarm/lib/label.cpp index d2b18ba10..d532b67e3 100644 --- a/kalarm/lib/label.cpp +++ b/kalarm/lib/label.cpp @@ -55,7 +55,7 @@ void Label::setBuddy(TQWidget* bud) if (w) { while (w->focusProxy()) - w = w->focusProxy(); + w = TQT_TQWIDGET(w->focusProxy()); if (!w->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING)) w = 0; } @@ -106,7 +106,7 @@ void Label::activated() LabelFocusWidget::LabelFocusWidget(TQWidget* tqparent, const char* name) : TQWidget(tqparent, name) { - setFocusPolicy(ClickFocus); + setFocusPolicy(Qt::ClickFocus); setFixedSize(TQSize(1,1)); } diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp index d85a99458..f19ed8066 100644 --- a/kalarm/lib/lineedit.cpp +++ b/kalarm/lib/lineedit.cpp @@ -78,11 +78,11 @@ void LineEdit::init() void LineEdit::focusInEvent(TQFocusEvent* e) { if (mNoSelect) - TQFocusEvent::setReason(TQFocusEvent::Other); + e->setReason(TQFocusEvent::Other); KLineEdit::focusInEvent(e); if (mNoSelect) { - TQFocusEvent::resetReason(); + e->resetReason(); mNoSelect = false; } } diff --git a/kalarm/lib/pushbutton.cpp b/kalarm/lib/pushbutton.cpp index e1e04099a..c251fa3c5 100644 --- a/kalarm/lib/pushbutton.cpp +++ b/kalarm/lib/pushbutton.cpp @@ -44,7 +44,7 @@ void PushButton::setReadOnly(bool ro) if ((int)ro != (int)mReadOnly) { mReadOnly = ro; - setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy); + setFocusPolicy(ro ? Qt::NoFocus : mFocusPolicy); if (ro) clearFocus(); } @@ -55,7 +55,7 @@ void PushButton::mousePressEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQPushButton::mousePressEvent(e); @@ -66,7 +66,7 @@ void PushButton::mouseReleaseEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQPushButton::mouseReleaseEvent(e); diff --git a/kalarm/lib/pushbutton.h b/kalarm/lib/pushbutton.h index 615ea10cb..d0f4b0652 100644 --- a/kalarm/lib/pushbutton.h +++ b/kalarm/lib/pushbutton.h @@ -71,7 +71,7 @@ class PushButton : public TQPushButton virtual void keyPressEvent(TQKeyEvent*); virtual void keyReleaseEvent(TQKeyEvent*); private: - TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the TQPushButton + Qt::FocusPolicy mFocusPolicy; // default focus policy for the TQPushButton bool mReadOnly; // value cannot be changed }; diff --git a/kalarm/lib/radiobutton.cpp b/kalarm/lib/radiobutton.cpp index d08097887..f34a574e3 100644 --- a/kalarm/lib/radiobutton.cpp +++ b/kalarm/lib/radiobutton.cpp @@ -44,7 +44,7 @@ void RadioButton::setReadOnly(bool ro) if ((int)ro != (int)mReadOnly) { mReadOnly = ro; - setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy); + setFocusPolicy(ro ? Qt::NoFocus : mFocusPolicy); if (ro) clearFocus(); } @@ -86,7 +86,7 @@ void RadioButton::mousePressEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQRadioButton::mousePressEvent(e); @@ -97,7 +97,7 @@ void RadioButton::mouseReleaseEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQRadioButton::mouseReleaseEvent(e); diff --git a/kalarm/lib/radiobutton.h b/kalarm/lib/radiobutton.h index 9395be608..baa7cba39 100644 --- a/kalarm/lib/radiobutton.h +++ b/kalarm/lib/radiobutton.h @@ -80,7 +80,7 @@ class RadioButton : public TQRadioButton protected slots: void slotClicked(); private: - TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the TQRadioButton + Qt::FocusPolicy mFocusPolicy; // default focus policy for the TQRadioButton TQWidget* mFocusWidget; // widget to receive focus when button is clicked on bool mFocusWidgetEnable; // enable focus widget before setting focus bool mReadOnly; // value cannot be changed diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp index 09daf91db..c2f2e11bd 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.findRev('/'); + int i = mShellPath.tqfindRev('/'); if (i >= 0) mShellName = mShellPath.mid(i + 1); else diff --git a/kalarm/lib/slider.cpp b/kalarm/lib/slider.cpp index 0b30f744a..f901f6db1 100644 --- a/kalarm/lib/slider.cpp +++ b/kalarm/lib/slider.cpp @@ -54,7 +54,7 @@ void Slider::mousePressEvent(TQMouseEvent* e) if (mReadOnly) { // Swallow up the event if it's the left button - if (e->button() == TQt::LeftButton) + if (e->button() == Qt::LeftButton) return; } TQSlider::mousePressEvent(e); diff --git a/kalarm/lib/spinbox.cpp b/kalarm/lib/spinbox.cpp index 19608eabe..fc8e6b7c3 100644 --- a/kalarm/lib/spinbox.cpp +++ b/kalarm/lib/spinbox.cpp @@ -201,7 +201,7 @@ void SpinBox::updateDisplay() */ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e) { - if (obj == editor()) + if (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(editor())) { int step = 0; bool shift = false; @@ -263,7 +263,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e) case TQEvent::MouseButtonDblClick: { TQMouseEvent* me = (TQMouseEvent*)e; - if (me->button() == TQt::LeftButton) + if (me->button() == Qt::LeftButton) { // It's a left button press. Set normal or shift stepping as appropriate. if (mReadOnly) @@ -281,7 +281,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e) case TQEvent::MouseButtonRelease: { TQMouseEvent* me = (TQMouseEvent*)e; - if (me->button() == TQt::LeftButton && mShiftMouse) + if (me->button() == Qt::LeftButton && mShiftMouse) { setShiftStepping(false, mCurrentButton); // cancel shift stepping return false; // forward event to the destination widget @@ -291,7 +291,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e) case TQEvent::MouseMove: { TQMouseEvent* me = (TQMouseEvent*)e; - if (me->state() & TQt::LeftButton) + if (me->state() & Qt::LeftButton) { // The left button is down. Track which spin button it's in. if (mReadOnly) @@ -325,7 +325,7 @@ bool SpinBox::eventFilter(TQObject* obj, TQEvent* e) TQKeyEvent* ke = (TQKeyEvent*)e; int key = ke->key(); int state = ke->state(); - if ((state & TQt::LeftButton) + if ((state & Qt::LeftButton) && (key == TQt::Key_Shift || key == TQt::Key_Alt)) { // The left mouse button is down, and the Shift or Alt key has changed diff --git a/kalarm/lib/spinbox2.cpp b/kalarm/lib/spinbox2.cpp index 8627838b6..3d7cde021 100644 --- a/kalarm/lib/spinbox2.cpp +++ b/kalarm/lib/spinbox2.cpp @@ -85,9 +85,9 @@ void SpinBox2::init() mSpinbox->setSelectOnStep(false); // default mUpdown2->setSelectOnStep(false); // always false setFocusProxy(mSpinbox); - mUpdown2->setFocusPolicy(TQWidget::NoFocus); + mUpdown2->setFocusPolicy(Qt::NoFocus); mSpinMirror = new SpinMirror(mUpdown2, mUpdown2Frame, this); - if (!mirrorStyle(style())) + if (!mirrorStyle(tqstyle())) mSpinMirror->hide(); // hide mirrored spin buttons when they are inappropriate connect(mSpinbox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(valueChange())); connect(mSpinbox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(valueChanged(int))); @@ -243,7 +243,7 @@ TQSize SpinBox2::tqminimumSizeHint() const void SpinBox2::styleChange(TQStyle&) { - if (mirrorStyle(style())) + if (mirrorStyle(tqstyle())) mSpinMirror->show(); // show rounded corners with Plastik etc. else mSpinMirror->hide(); // keep normal shading with other styles @@ -282,16 +282,16 @@ void SpinBox2::arrange() */ void SpinBox2::getMetrics() const { - TQRect rect = mUpdown2->style().querySubControlMetrics(TQStyle::CC_SpinWidget, mUpdown2, TQStyle::SC_SpinWidgetButtonField); - if (style().inherits("PlastikStyle")) + TQRect rect = mUpdown2->tqstyle().querySubControlMetrics(TQStyle::CC_SpinWidget, mUpdown2, TQStyle::SC_SpinWidgetButtonField); + if (tqstyle().inherits("PlastikStyle")) rect.setLeft(rect.left() - 1); // Plastik excludes left border from spin widget rectangle xUpdown2 = mReverseLayout ? 0 : rect.left(); wUpdown2 = mUpdown2->width() - rect.left(); - xSpinbox = mSpinbox->style().querySubControlMetrics(TQStyle::CC_SpinWidget, mSpinbox, TQStyle::SC_SpinWidgetEditField).left(); + xSpinbox = mSpinbox->tqstyle().querySubControlMetrics(TQStyle::CC_SpinWidget, mSpinbox, TQStyle::SC_SpinWidgetEditField).left(); wGap = 0; // Make style-specific adjustments for a better appearance - if (style().inherits(TQMOTIFPLUSSTYLE_OBJECT_NAME_STRING)) + if (tqstyle().inherits(TQMOTIFPLUSSTYLE_OBJECT_NAME_STRING)) { xSpinbox = 0; // show the edit control left border wGap = 2; // leave a space to the right of the left-hand pair of spin buttons @@ -422,7 +422,7 @@ void SpinMirror::redraw() void SpinMirror::redraw(const TQPixmap& px) { TQCanvas* c = canvas(); - c->setBackgroundPixmap(px); + c->tqsetBackgroundPixmap(px); c->setAllChanged(); c->update(); } diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp index f8700a505..1a2a65008 100644 --- a/kalarm/lib/timespinbox.cpp +++ b/kalarm/lib/timespinbox.cpp @@ -31,7 +31,7 @@ class TimeSpinBox::TimeValidator : public TQValidator { public: TimeValidator(int minMin, int maxMin, TQWidget* tqparent, const char* name = 0) - : TQValidator(tqparent, name), + : TQValidator(TQT_TQOBJECT(tqparent), name), minMinute(minMin), maxMinute(maxMin), m12Hour(false), mPm(false) { } virtual State validate(TQString&, int&) const; int minMinute, maxMinute; diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp index 07e976c6a..34b13e5ff 100644 --- a/kalarm/mainwindow.cpp +++ b/kalarm/mainwindow.cpp @@ -182,7 +182,7 @@ MainWindow::~MainWindow() else theApp()->trayWindow()->removeWindow(this); } - MinuteTimer::disconnect(this); + MinuteTimer::disconnect(TQT_TQOBJECT(this)); mMinuteTimerActive = false; // to ensure that setUpdateTimer() works correctly setUpdateTimer(); MainWindow* main = mainMainWindow(); @@ -294,7 +294,7 @@ void MainWindow::show() // Show error message now that the main window has been displayed. // Waiting until now lets the user easily associate the message with // the main window which is faulty. - KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").arg(TQString::tqfromLatin1(UI_FILE))); + KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").tqarg(TQString::tqfromLatin1(UI_FILE))); mMenuError = false; } } @@ -326,55 +326,55 @@ void MainWindow::columnsReordered() void MainWindow::initActions() { KActionCollection* actions = actionCollection(); - mActionTemplates = new KAction(i18n("&Templates..."), 0, this, TQT_SLOT(slotTemplates()), actions, "templates"); - mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), this, TQT_SLOT(slotNew()), actions, "new"); - mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), this, TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl"); - mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, this, TQT_SLOT(slotNewTemplate()), actions, "createTemplate"); - mActionCopy = new KAction(i18n("&Copy..."), "editcopy", TQt::SHIFT+TQt::Key_Insert, this, TQT_SLOT(slotCopy()), actions, "copy"); - mActionModify = new KAction(i18n("&Edit..."), "edit", TQt::CTRL+TQt::Key_E, this, TQT_SLOT(slotModify()), actions, "modify"); - mActionDelete = new KAction(i18n("&Delete"), "editdelete", TQt::Key_Delete, this, TQT_SLOT(slotDelete()), actions, "delete"); - mActionReactivate = new KAction(i18n("Reac&tivate"), 0, TQt::CTRL+TQt::Key_R, this, TQT_SLOT(slotReactivate()), actions, "undelete"); - mActionEnable = new KAction(TQString(), 0, TQt::CTRL+TQt::Key_B, this, TQT_SLOT(slotEnable()), actions, "disable"); - mActionView = new KAction(i18n("&View"), "viewmag", TQt::CTRL+TQt::Key_W, this, TQT_SLOT(slotView()), actions, "view"); - mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), TQt::CTRL+TQt::Key_M, this, TQT_SLOT(slotShowTime()), actions, "showAlarmTimes"); + mActionTemplates = new KAction(i18n("&Templates..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTemplates()), actions, "templates"); + mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), TQT_TQOBJECT(this), TQT_SLOT(slotNew()), actions, "new"); + mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), TQT_TQOBJECT(this), TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl"); + mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewTemplate()), actions, "createTemplate"); + mActionCopy = new KAction(i18n("&Copy..."), "editcopy", TQt::SHIFT+TQt::Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actions, "copy"); + mActionModify = new KAction(i18n("&Edit..."), "edit", TQt::CTRL+TQt::Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotModify()), actions, "modify"); + mActionDelete = new KAction(i18n("&Delete"), "editdelete", TQt::Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotDelete()), actions, "delete"); + mActionReactivate = new KAction(i18n("Reac&tivate"), 0, TQt::CTRL+TQt::Key_R, TQT_TQOBJECT(this), TQT_SLOT(slotReactivate()), actions, "undelete"); + mActionEnable = new KAction(TQString(), 0, TQt::CTRL+TQt::Key_B, TQT_TQOBJECT(this), TQT_SLOT(slotEnable()), actions, "disable"); + mActionView = new KAction(i18n("&View"), "viewmag", TQt::CTRL+TQt::Key_W, TQT_TQOBJECT(this), TQT_SLOT(slotView()), actions, "view"); + mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), TQt::CTRL+TQt::Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotShowTime()), actions, "showAlarmTimes"); mActionShowTime->setCheckedState(i18n("Hide &Alarm Times")); - mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), TQt::CTRL+TQt::Key_I, this, TQT_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms"); + mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), TQt::CTRL+TQt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms"); mActionShowTimeTo->setCheckedState(i18n("Hide Time t&o Alarms")); - mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", TQt::CTRL+TQt::Key_P, this, TQT_SLOT(slotShowExpired()), actions, "showExpiredAlarms"); + mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", TQt::CTRL+TQt::Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotShowExpired()), actions, "showExpiredAlarms"); mActionShowExpired->setCheckedState(i18n_e_HideExpiredAlarms()); - mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, this, TQT_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray"); + mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray"); mActionToggleTrayIcon->setCheckedState(i18n("Hide From System &Tray")); - new KAction(i18n("Import &Alarms..."), 0, this, TQT_SLOT(slotImportAlarms()), actions, "importAlarms"); - new KAction(i18n("Import &Birthdays..."), 0, this, TQT_SLOT(slotBirthdays()), actions, "importBirthdays"); - new KAction(i18n("&Refresh Alarms"), "reload", 0, this, TQT_SLOT(slotResetDaemon()), actions, "refreshAlarms"); + new KAction(i18n("Import &Alarms..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportAlarms()), actions, "importAlarms"); + new KAction(i18n("Import &Birthdays..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBirthdays()), actions, "importBirthdays"); + new KAction(i18n("&Refresh Alarms"), "reload", 0, TQT_TQOBJECT(this), TQT_SLOT(slotResetDaemon()), actions, "refreshAlarms"); Daemon::createAlarmEnableAction(actions, "alarmEnable"); if (undoText.isNull()) { // Get standard texts, etc., for Undo and Redo actions - KAction* act = KStdAction::undo(this, 0, actions); + KAction* act = KStdAction::undo(TQT_TQOBJECT(this), 0, actions); undoIcon = act->icon(); undoShortcut = act->shortcut(); undoText = act->text(); undoTextStripped = KAlarm::stripAccel(undoText); delete act; - act = KStdAction::redo(this, 0, actions); + act = KStdAction::redo(TQT_TQOBJECT(this), 0, actions); redoIcon = act->icon(); redoShortcut = act->shortcut(); redoText = act->text(); redoTextStripped = KAlarm::stripAccel(redoText); delete act; } - mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, this, TQT_SLOT(slotUndo()), actions, "edit_undo"); - mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, this, TQT_SLOT(slotRedo()), actions, "edit_redo"); - KStdAction::tqfind(mListView, TQT_SLOT(slotFind()), actions); - mActionFindNext = KStdAction::findNext(mListView, TQT_SLOT(slotFindNext()), actions); - mActionFindPrev = KStdAction::findPrev(mListView, TQT_SLOT(slotFindPrev()), actions); - KStdAction::selectAll(mListView, TQT_SLOT(slotSelectAll()), actions); - KStdAction::deselect(mListView, TQT_SLOT(slotDeselect()), actions); - KStdAction::quit(this, TQT_SLOT(slotQuit()), actions); - KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actions); - KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbar()), actions); - KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actions); + mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), actions, "edit_undo"); + mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, TQT_TQOBJECT(this), TQT_SLOT(slotRedo()), actions, "edit_redo"); + KStdAction::find(TQT_TQOBJECT(mListView), TQT_SLOT(slotFind()), actions); + mActionFindNext = KStdAction::findNext(TQT_TQOBJECT(mListView), TQT_SLOT(slotFindNext()), actions); + mActionFindPrev = KStdAction::findPrev(TQT_TQOBJECT(mListView), TQT_SLOT(slotFindPrev()), actions); + KStdAction::selectAll(TQT_TQOBJECT(mListView), TQT_SLOT(slotSelectAll()), actions); + KStdAction::deselect(TQT_TQOBJECT(mListView), TQT_SLOT(slotDeselect()), actions); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actions); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()), actions); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureToolbar()), actions); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actions); setStandardToolBarMenuEnabled(true); createGUI(UI_FILE); @@ -388,7 +388,7 @@ void MainWindow::initActions() connect(mActionRedo->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotRedoItem(int))); connect(Undo::instance(), TQT_SIGNAL(changed(const TQString&, const TQString&)), TQT_SLOT(slotUndotqStatus(const TQString&, const TQString&))); connect(mListView, TQT_SIGNAL(findActive(bool)), TQT_SLOT(slotFindActive(bool))); - Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPrefsChanged())); + Preferences::connect(TQT_SIGNAL(preferencesChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotPrefsChanged())); connect(theApp(), TQT_SIGNAL(trayIconToggled()), TQT_SLOT(updateTrayIconAction())); // Set menu item states @@ -485,13 +485,13 @@ void MainWindow::setUpdateTimer() { // Timeout every minute. needTimer->mMinuteTimerActive = true; - MinuteTimer::connect(needTimer, TQT_SLOT(slotUpdateTimeTo())); + MinuteTimer::connect(TQT_TQOBJECT(needTimer), TQT_SLOT(slotUpdateTimeTo())); kdDebug(5950) << "MainWindow::setUpdateTimer(): started timer" << endl; } else if (!needTimer && timerWindow) { timerWindow->mMinuteTimerActive = false; - MinuteTimer::disconnect(timerWindow); + MinuteTimer::disconnect(TQT_TQOBJECT(timerWindow)); kdDebug(5950) << "MainWindow::setUpdateTimer(): stopped timer" << endl; } } @@ -1023,8 +1023,8 @@ void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type) TQString actText = Undo::actionText(type, id); TQString descrip = Undo::description(type, id); TQString text = descrip.isEmpty() - ? i18n("Undo/Redo [action]", "%1 %2").arg(action).arg(actText) - : i18n("Undo [action]: message", "%1 %2: %3").arg(action).arg(actText).arg(descrip); + ? i18n("Undo/Redo [action]", "%1 %2").tqarg(action).tqarg(actText) + : i18n("Undo [action]: message", "%1 %2: %3").tqarg(action).tqarg(actText).tqarg(descrip); menu->insertItem(text, id); } } @@ -1043,7 +1043,7 @@ void MainWindow::slotUndotqStatus(const TQString& undo, const TQString& redo) else { mActionUndo->setEnabled(true); - mActionUndo->setText(TQString("%1 %2").arg(undoText).arg(undo)); + mActionUndo->setText(TQString("%1 %2").tqarg(undoText).tqarg(undo)); } if (redo.isNull()) { @@ -1053,7 +1053,7 @@ void MainWindow::slotUndotqStatus(const TQString& undo, const TQString& redo) else { mActionRedo->setEnabled(true); - mActionRedo->setText(TQString("%1 %2").arg(redoText).arg(redo)); + mActionRedo->setText(TQString("%1 %2").tqarg(redoText).tqarg(redo)); } } @@ -1088,7 +1088,7 @@ void MainWindow::slotConfigureToolbar() { saveMainWindowSettings(KGlobal::config(), WINDOW_NAME); KEditToolbar dlg(factory()); - connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } @@ -1350,7 +1350,7 @@ void MainWindow::slotContextMenuRequested(TQListViewItem* item, const TQPoint& p */ void MainWindow::slotMouseClicked(int button, TQListViewItem* item, const TQPoint& pt, int) { - if (button != TQt::RightButton && !item) + if (button != Qt::RightButton && !item) { kdDebug(5950) << "MainWindow::slotMouseClicked(left)" << endl; mListView->clearSelection(); diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp index c6a0916c8..7bf51b0a6 100644 --- a/kalarm/messagewin.cpp +++ b/kalarm/messagewin.cpp @@ -429,12 +429,12 @@ void MessageWin::initView() if (mDateTime.isDateOnly() || TQDate::tqcurrentDate().daysTo(mDateTime.date()) > 0) { setRemainingTextDay(); - MidnightTimer::connect(this, TQT_SLOT(setRemainingTextDay())); // update every day + MidnightTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextDay())); // update every day } else { setRemainingTextMinute(); - MinuteTimer::connect(this, TQT_SLOT(setRemainingTextMinute())); // update every minute + MinuteTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextMinute())); // update every minute } topLayout->addWidget(mRemainingText, 0, TQt::AlignHCenter); topLayout->addSpacing(KDialog::spacingHint()); @@ -510,7 +510,7 @@ void MessageWin::initView() mOkButton = new KPushButton(KStdGuiItem::close(), topWidget); // Prevent accidental acknowledgement of the message if the user is typing when the window appears mOkButton->clearFocus(); - mOkButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection + mOkButton->setFocusPolicy(Qt::ClickFocus); // don't allow keyboard selection mOkButton->setFixedSize(mOkButton->tqsizeHint()); connect(mOkButton, TQT_SIGNAL(clicked()), TQT_SLOT(close())); grid->addWidget(mOkButton, 0, gridIndex++, AlignHCenter); @@ -520,7 +520,7 @@ void MessageWin::initView() { // Edit button mEditButton = new TQPushButton(i18n("&Edit..."), topWidget); - mEditButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection + mEditButton->setFocusPolicy(Qt::ClickFocus); // don't allow keyboard selection mEditButton->setFixedSize(mEditButton->tqsizeHint()); connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit())); grid->addWidget(mEditButton, 0, gridIndex++, AlignHCenter); @@ -531,7 +531,7 @@ void MessageWin::initView() { // Defer button mDeferButton = new TQPushButton(i18n("&Defer..."), topWidget); - mDeferButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection + mDeferButton->setFocusPolicy(Qt::ClickFocus); // don't allow keyboard selection mDeferButton->setFixedSize(mDeferButton->tqsizeHint()); connect(mDeferButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefer())); grid->addWidget(mDeferButton, 0, gridIndex++, AlignHCenter); @@ -619,9 +619,9 @@ void MessageWin::setRemainingTextDay() if (days <= 0 && !mDateTime.isDateOnly()) { // The alarm is due today, so start refreshing every minute - MidnightTimer::disconnect(this, TQT_SLOT(setRemainingTextDay())); + MidnightTimer::disconnect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextDay())); setRemainingTextMinute(); - MinuteTimer::connect(this, TQT_SLOT(setRemainingTextMinute())); // update every minute + MinuteTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(setRemainingTextMinute())); // update every minute } else { @@ -650,7 +650,7 @@ void MessageWin::setRemainingTextMinute() else if (mins % 60 == 1) text = i18n("in 1 hour 1 minute's time", "in %n hours 1 minute's time", mins/60); else - text = i18n("in 1 hour %1 minutes' time", "in %n hours %1 minutes' time", mins/60).arg(mins%60); + text = i18n("in 1 hour %1 minutes' time", "in %n hours %1 minutes' time", mins/60).tqarg(mins%60); mRemainingText->setText(text); } @@ -859,7 +859,7 @@ void MessageWin::slotPlayAudio() kdError(5950) << "MessageWin::playAudio(): Open failure: " << mAudioFile << endl; if (!haveErrorMessage(ErrMsg_AudioFile)) { - KMessageBox::error(this, i18n("Cannot open audio file:\n%1").arg(mAudioFile)); + KMessageBox::error(this, i18n("Cannot open audio file:\n%1").tqarg(mAudioFile)); clearErrorMessage(ErrMsg_AudioFile); } return; @@ -882,7 +882,7 @@ void MessageWin::slotPlayAudio() kdWarning(5950) << "Unable to set master volume (KMix: " << mKMixError << ")\n"; if (!haveErrorMessage(ErrMsg_Volume)) { - KMessageBox::information(this, i18n("Unable to set master volume\n(Error accessing KMix:\n%1)").arg(mKMixError), + KMessageBox::information(this, i18n("Unable to set master volume\n(Error accessing KMix:\n%1)").tqarg(mKMixError), TQString(), TQString::tqfromLatin1("KMixError")); clearErrorMessage(ErrMsg_Volume); } @@ -1497,7 +1497,7 @@ void MessageWin::setDeferralLimit(const KAEvent& event) if (mDeferButton) { mDeferLimit = event.deferralLimit().dateTime(); - MidnightTimer::connect(this, TQT_SLOT(checkDeferralLimit())); // check every day + MidnightTimer::connect(TQT_TQOBJECT(this), TQT_SLOT(checkDeferralLimit())); // check every day mDisableDeferral = false; checkDeferralLimit(); } @@ -1519,7 +1519,7 @@ void MessageWin::checkDeferralLimit() int n = TQDate::tqcurrentDate().daysTo(mDeferLimit.date()); if (n > 0) return; - MidnightTimer::disconnect(this, TQT_SLOT(checkDeferralLimit())); + MidnightTimer::disconnect(TQT_TQOBJECT(this), TQT_SLOT(checkDeferralLimit())); if (n == 0) { // The deferral limit will be reached today @@ -1540,7 +1540,7 @@ void MessageWin::checkDeferralLimit() */ void MessageWin::slotDefer() { - mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime::tqcurrentDateTime().addSecs(60), + mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime(TQDateTime::tqcurrentDateTime().addSecs(60)), false, this, "deferDlg"); if (mDefaultDeferMinutes > 0) mDeferDlg->setDeferMinutes(mDefaultDeferMinutes); diff --git a/kalarm/prefdlg.cpp b/kalarm/prefdlg.cpp index ec6aa4837..90b48dd85 100644 --- a/kalarm/prefdlg.cpp +++ b/kalarm/prefdlg.cpp @@ -233,7 +233,7 @@ PrefsTabBase::PrefsTabBase(TQVBox* frame) mPage(frame) { if (!mIndentWidth) - mIndentWidth = style().subRect(TQStyle::SR_RadioButtonIndicator, this).width(); + mIndentWidth = tqstyle().subRect(TQStyle::SR_RadioButtonIndicator, this).width(); } void PrefsTabBase::apply(bool syncToDisc) @@ -310,7 +310,7 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) TQWhatsThis::add(mAutostartDaemon, i18n("Automatically start alarm monitoring whenever you start KDE, by running the alarm daemon (%1).\n\n" "This option should always be checked unless you intend to discontinue use of KAlarm.") - .arg(TQString::tqfromLatin1(DAEMON_APP_NAME))); + .tqarg(TQString::tqfromLatin1(DAEMON_APP_NAME))); grid->addMultiCellWidget(mAutostartDaemon, 6, 6, 0, 2, tqalignment); group->setFixedHeight(group->tqsizeHint().height()); @@ -325,7 +325,7 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) label->setBuddy(mStartOfDay); static const TQString startOfDayText = i18n("The earliest time of day at which a date-only alarm (i.e. " "an alarm with \"any time\" specified) will be triggered."); - TQWhatsThis::add(box, TQString("%1\n\n%2").arg(startOfDayText).arg(TimeSpinBox::shiftWhatsThis())); + TQWhatsThis::add(box, TQString("%1\n\n%2").tqarg(startOfDayText).tqarg(TimeSpinBox::shiftWhatsThis())); itemBox->setStretchFactor(new TQWidget(itemBox), 1); // left adjust the controls itemBox->setFixedHeight(box->tqsizeHint().height()); @@ -404,7 +404,7 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) cmd.tqreplace("%w", "<command; sleep>"); cmd.tqreplace("%C", "[command]"); cmd.tqreplace("%W", "[command; sleep]"); - TQWhatsThis::add(radio, whatsThis.arg(cmd)); + TQWhatsThis::add(radio, whatsThis.tqarg(cmd)); grid->addWidget(radio, (row = index/3 + 1), index % 3, TQt::AlignAuto); ++index; } @@ -470,7 +470,7 @@ void MiscPrefTab::apply(bool syncToDisc) if (KStandardDirs::findExe(cmd).isEmpty()) { mXtermCommand->setFocus(); - if (KMessageBox::warningContinueCancel(this, i18n("Command to invoke terminal window not found:\n%1").arg(cmd)) + if (KMessageBox::warningContinueCancel(this, i18n("Command to invoke terminal window not found:\n%1").tqarg(cmd)) != KMessageBox::Continue) return; } @@ -618,10 +618,10 @@ EmailPrefTab::EmailPrefTab(TQVBox* frame) "your system is configured to use sendmail or a sendmail compatible mail transport agent.")); box = new TQHBox(mPage); // this is to allow left adjustment - mEmailCopyToKMail = new TQCheckBox(i18n("Co&py sent emails into KMail's %1 folder").arg(KAMail::i18n_sent_mail()), box); + mEmailCopyToKMail = new TQCheckBox(i18n("Co&py sent emails into KMail's %1 folder").tqarg(KAMail::i18n_sent_mail()), box); mEmailCopyToKMail->setFixedSize(mEmailCopyToKMail->tqsizeHint()); TQWhatsThis::add(mEmailCopyToKMail, - i18n("After sending an email, store a copy in KMail's %1 folder").arg(KAMail::i18n_sent_mail())); + i18n("After sending an email, store a copy in KMail's %1 folder").tqarg(KAMail::i18n_sent_mail())); box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls box->setFixedHeight(box->tqsizeHint().height()); @@ -793,18 +793,18 @@ TQString EmailPrefTab::validate() TQString EmailPrefTab::validateAddr(ButtonGroup* group, TQLineEdit* addr, const TQString& msg) { - TQString errmsg = i18n("%1\nAre you sure you want to save your changes?").arg(msg); + TQString errmsg = i18n("%1\nAre you sure you want to save your changes?").tqarg(msg); switch (group->selectedId()) { case Preferences::MAIL_FROM_CONTROL_CENTRE: if (!KAMail::controlCentreAddress().isEmpty()) return TQString(); - errmsg = i18n("No email address is currently set in the KDE Control Center. %1").arg(errmsg); + errmsg = i18n("No email address is currently set in the KDE Control Center. %1").tqarg(errmsg); break; case Preferences::MAIL_FROM_KMAIL: if (KAMail::identitiesExist()) return TQString(); - errmsg = i18n("No KMail identities currently exist. %1").arg(errmsg); + errmsg = i18n("No KMail identities currently exist. %1").tqarg(errmsg); break; case Preferences::MAIL_FROM_ADDR: if (!addr->text().stripWhiteSpace().isEmpty()) @@ -902,12 +902,12 @@ EditPrefTab::EditPrefTab(TQVBox* frame) mConfirmAck = new TQCheckBox(EditAlarmDlg::i18n_k_ConfirmAck(), group, "defConfAck"); mConfirmAck->setMinimumSize(mConfirmAck->tqsizeHint()); - TQWhatsThis::add(mConfirmAck, defsetting.arg(EditAlarmDlg::i18n_ConfirmAck())); + TQWhatsThis::add(mConfirmAck, defsetting.tqarg(EditAlarmDlg::i18n_ConfirmAck())); tqlayout->addWidget(mConfirmAck, 0, TQt::AlignAuto); mAutoClose = new TQCheckBox(LateCancelSelector::i18n_i_AutoCloseWinLC(), group, "defAutoClose"); mAutoClose->setMinimumSize(mAutoClose->tqsizeHint()); - TQWhatsThis::add(mAutoClose, defsetting.arg(LateCancelSelector::i18n_AutoCloseWin())); + TQWhatsThis::add(mAutoClose, defsetting.tqarg(LateCancelSelector::i18n_AutoCloseWin())); tqlayout->addWidget(mAutoClose, 0, TQt::AlignAuto); TQHBox* box = new TQHBox(group); @@ -942,14 +942,14 @@ EditPrefTab::EditPrefTab(TQVBox* frame) if (theApp()->speechEnabled()) mSound->insertItem(SoundPicker::i18n_Speak()); // index 3 mSound->setMinimumSize(mSound->tqsizeHint()); - TQWhatsThis::add(mSound, defsetting.arg(SoundPicker::i18n_Sound())); + TQWhatsThis::add(mSound, defsetting.tqarg(SoundPicker::i18n_Sound())); htqlayout->addWidget(mSound); htqlayout->addStretch(1); #ifndef WITHOUT_ARTS mSoundRepeat = new TQCheckBox(i18n("Repea&t sound file"), bgroup, "defRepeatSound"); mSoundRepeat->setMinimumSize(mSoundRepeat->tqsizeHint()); - TQWhatsThis::add(mSoundRepeat, i18n("sound file \"Repeat\" checkbox", "The default setting for sound file \"%1\" in the alarm edit dialog.").arg(SoundDlg::i18n_Repeat())); + TQWhatsThis::add(mSoundRepeat, i18n("sound file \"Repeat\" checkbox", "The default setting for sound file \"%1\" in the alarm edit dialog.").tqarg(SoundDlg::i18n_Repeat())); htqlayout->addWidget(mSoundRepeat); #endif @@ -978,13 +978,13 @@ EditPrefTab::EditPrefTab(TQVBox* frame) mCmdScript = new TQCheckBox(EditAlarmDlg::i18n_p_EnterScript(), group, "defCmdScript"); mCmdScript->setMinimumSize(mCmdScript->tqsizeHint()); - TQWhatsThis::add(mCmdScript, defsetting.arg(EditAlarmDlg::i18n_EnterScript())); + TQWhatsThis::add(mCmdScript, defsetting.tqarg(EditAlarmDlg::i18n_EnterScript())); tqlayout->addWidget(mCmdScript); tqlayout->addStretch(); mCmdXterm = new TQCheckBox(EditAlarmDlg::i18n_w_ExecInTermWindow(), group, "defCmdXterm"); mCmdXterm->setMinimumSize(mCmdXterm->tqsizeHint()); - TQWhatsThis::add(mCmdXterm, defsetting.arg(EditAlarmDlg::i18n_ExecInTermWindow())); + TQWhatsThis::add(mCmdXterm, defsetting.tqarg(EditAlarmDlg::i18n_ExecInTermWindow())); tqlayout->addWidget(mCmdXterm); // EMAIL ALARMS @@ -995,21 +995,21 @@ EditPrefTab::EditPrefTab(TQVBox* frame) // BCC email to sender mEmailBcc = new TQCheckBox(EditAlarmDlg::i18n_e_CopyEmailToSelf(), group, "defEmailBcc"); mEmailBcc->setMinimumSize(mEmailBcc->tqsizeHint()); - TQWhatsThis::add(mEmailBcc, defsetting.arg(EditAlarmDlg::i18n_CopyEmailToSelf())); + TQWhatsThis::add(mEmailBcc, defsetting.tqarg(EditAlarmDlg::i18n_CopyEmailToSelf())); tqlayout->addWidget(mEmailBcc, 0, TQt::AlignAuto); // MISCELLANEOUS // Show in KOrganizer mCopyToKOrganizer = new TQCheckBox(EditAlarmDlg::i18n_g_ShowInKOrganizer(), mPage, "defShowKorg"); mCopyToKOrganizer->setMinimumSize(mCopyToKOrganizer->tqsizeHint()); - TQWhatsThis::add(mCopyToKOrganizer, defsetting.arg(EditAlarmDlg::i18n_ShowInKOrganizer())); + TQWhatsThis::add(mCopyToKOrganizer, defsetting.tqarg(EditAlarmDlg::i18n_ShowInKOrganizer())); // Late cancellation box = new TQHBox(mPage); box->setSpacing(KDialog::spacingHint()); mLateCancel = new TQCheckBox(LateCancelSelector::i18n_n_CancelIfLate(), box, "defCancelLate"); mLateCancel->setMinimumSize(mLateCancel->tqsizeHint()); - TQWhatsThis::add(mLateCancel, defsetting.arg(LateCancelSelector::i18n_CancelIfLate())); + TQWhatsThis::add(mLateCancel, defsetting.tqarg(LateCancelSelector::i18n_CancelIfLate())); box->setStretchFactor(new TQWidget(box), 1); // left adjust the control // Recurrence @@ -1179,7 +1179,7 @@ TQString EditPrefTab::validate() if (mSound->currentItem() == SoundPicker::PLAY_FILE && mSoundFile->text().isEmpty()) { mSoundFile->setFocus(); - return i18n("You must enter a sound file when %1 is selected as the default sound type").arg(SoundPicker::i18n_File());; + return i18n("You must enter a sound file when %1 is selected as the default sound type").tqarg(SoundPicker::i18n_File());; } return TQString(); } diff --git a/kalarm/recurrenceedit.cpp b/kalarm/recurrenceedit.cpp index 5ac3c9bf5..e360ef49c 100644 --- a/kalarm/recurrenceedit.cpp +++ b/kalarm/recurrenceedit.cpp @@ -103,7 +103,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* tqparent, const char* na * selection of its corresponding radio button. */ - TQGroupBox* recurGroup = new TQGroupBox(1, TQt::Vertical, i18n("Recurrence Rule"), this, "recurGroup"); + TQGroupBox* recurGroup = new TQGroupBox(1, Qt::Vertical, i18n("Recurrence Rule"), this, "recurGroup"); topLayout->addWidget(recurGroup); TQFrame* ruleFrame = new TQFrame(recurGroup, "ruleFrame"); tqlayout = new TQVBoxLayout(ruleFrame, 0); @@ -111,7 +111,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* tqparent, const char* na tqlayout = new TQHBoxLayout(tqlayout, 0); TQBoxLayout* lay = new TQVBoxLayout(tqlayout, 0); - mRuleButtonGroup = new ButtonGroup(1, TQt::Horizontal, ruleFrame); + mRuleButtonGroup = new ButtonGroup(1, Qt::Horizontal, ruleFrame); mRuleButtonGroup->setInsideMargin(0); mRuleButtonGroup->setFrameStyle(TQFrame::NoFrame); lay->addWidget(mRuleButtonGroup); @@ -268,7 +268,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* tqparent, const char* na mEndTimeEdit->setFixedSize(mEndTimeEdit->tqsizeHint()); mEndTimeEdit->setReadOnly(mReadOnly); static const TQString lastTimeText = i18n("Enter the last time to repeat the alarm."); - TQWhatsThis::add(mEndTimeEdit, TQString("%1\n\n%2").arg(lastTimeText).arg(TimeSpinBox::shiftWhatsThis())); + TQWhatsThis::add(mEndTimeEdit, TQString("%1\n\n%2").tqarg(lastTimeText).tqarg(TimeSpinBox::shiftWhatsThis())); mEndAnyTimeCheckBox = new CheckBox(i18n("Any time"), mRangeButtonGroup); mEndAnyTimeCheckBox->setFixedSize(mEndAnyTimeCheckBox->tqsizeHint()); mEndAnyTimeCheckBox->setReadOnly(mReadOnly); @@ -619,7 +619,7 @@ void RecurrenceEdit::enableExceptionButtons() mChangeExceptionButton->setEnabled(enable); // Prevent the exceptions list box receiving keyboard focus is it's empty - mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? TQWidget::WheelFocus : TQWidget::NoFocus); + mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? Qt::WheelFocus : Qt::NoFocus); } /****************************************************************************** diff --git a/kalarm/sounddlg.cpp b/kalarm/sounddlg.cpp index 02d3af55b..feb53bd68 100644 --- a/kalarm/sounddlg.cpp +++ b/kalarm/sounddlg.cpp @@ -133,7 +133,7 @@ SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fad i18n("Select to choose the volume for playing the sound file.")); // Volume slider - mVolumeSlider = new Slider(0, 100, 10, 0, TQt::Horizontal, box); + mVolumeSlider = new Slider(0, 100, 10, 0, Qt::Horizontal, box); mVolumeSlider->setTickmarks(TQSlider::Below); mVolumeSlider->setTickInterval(10); mVolumeSlider->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); @@ -168,7 +168,7 @@ SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fad grid->addWidget(mFadeVolumeBox, 4, 2); label = new TQLabel(i18n("Initial volume:"), mFadeVolumeBox); label->setFixedSize(label->tqsizeHint()); - mFadeSlider = new Slider(0, 100, 10, 0, TQt::Horizontal, mFadeVolumeBox); + mFadeSlider = new Slider(0, 100, 10, 0, Qt::Horizontal, mFadeVolumeBox); mFadeSlider->setTickmarks(TQSlider::Below); mFadeSlider->setTickInterval(10); mFadeSlider->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); @@ -299,7 +299,7 @@ void SoundDlg::playSound() || !KIO::NetAccess::download(url, mLocalAudioFile, mmw)) { kdError(5950) << "SoundDlg::playAudio(): Open failure: " << mFileName << endl; - KMessageBox::error(this, i18n("Cannot open audio file:\n%1").arg(mFileName)); + KMessageBox::error(this, i18n("Cannot open audio file:\n%1").tqarg(mFileName)); return; } mPlayTimer = new TQTimer(this); diff --git a/kalarm/soundpicker.cpp b/kalarm/soundpicker.cpp index 25d871c41..c6915601b 100644 --- a/kalarm/soundpicker.cpp +++ b/kalarm/soundpicker.cpp @@ -114,9 +114,9 @@ void SoundPicker::showSpeak(bool show) if (show == mSpeakShowing) return; // no change TQString whatsThis = "<p>" + i18n("Choose a sound to play when the message is displayed.") - + "<br>" + i18n("%1: the message is displayed silently.").arg("<b>" + i18n_None() + "</b>") - + "<br>" + i18n("%1: a simple beep is sounded.").arg("<b>" + i18n_Beep() + "</b>") - + "<br>" + i18n("%1: an audio file is played. You will be prompted to choose the file and set play options.").arg("<b>" + i18n_File() + "</b>"); + + "<br>" + i18n("%1: the message is displayed silently.").tqarg("<b>" + i18n_None() + "</b>") + + "<br>" + i18n("%1: a simple beep is sounded.").tqarg("<b>" + i18n_Beep() + "</b>") + + "<br>" + i18n("%1: an audio file is played. You will be prompted to choose the file and set play options.").tqarg("<b>" + i18n_File() + "</b>"); if (!show && mTypeCombo->currentItem() == SPEAK) mTypeCombo->setCurrentItem(NONE); if (mTypeCombo->count() == SPEAK+1) @@ -124,7 +124,7 @@ void SoundPicker::showSpeak(bool show) if (show) { mTypeCombo->insertItem(i18n_Speak()); - whatsThis += "<br>" + i18n("%1: the message text is spoken.").arg("<b>" + i18n_Speak() + "</b>") + "</p>"; + whatsThis += "<br>" + i18n("%1: the message text is spoken.").tqarg("<b>" + i18n_Speak() + "</b>") + "</p>"; } TQWhatsThis::add(mTypeBox, whatsThis + "</p>"); mSpeakShowing = show; @@ -283,7 +283,7 @@ TQString SoundPicker::browseFile(TQString& defaultDir, const TQString& initialFi defaultDir = kdeSoundDir; } #ifdef WITHOUT_ARTS - TQString filter = TQString::tqfromLatin1("*.wav *.mp3 *.ogg|%1\n*|%2").arg(i18n("Sound Files")).arg(i18n("All Files")); + TQString filter = TQString::tqfromLatin1("*.wav *.mp3 *.ogg|%1\n*|%2").tqarg(i18n("Sound Files")).tqarg(i18n("All Files")); #else TQStringList filters = KDE::PlayObjectFactory::mimeTypes(); TQString filter = filters.join(" "); diff --git a/kalarm/templatedlg.cpp b/kalarm/templatedlg.cpp index 6e493b91e..64a247c7d 100644 --- a/kalarm/templatedlg.cpp +++ b/kalarm/templatedlg.cpp @@ -80,8 +80,8 @@ TemplateDlg::TemplateDlg(TQWidget* tqparent, const char* name) tqlayout->addWidget(mDeleteButton); KAccel* accel = new KAccel(this); - accel->insert(KStdAccel::SelectAll, mTemplateList, TQT_SLOT(slotSelectAll())); - accel->insert(KStdAccel::Deselect, mTemplateList, TQT_SLOT(slotDeselect())); + accel->insert(KStdAccel::SelectAll, TQT_TQOBJECT(mTemplateList), TQT_SLOT(slotSelectAll())); + accel->insert(KStdAccel::Deselect, TQT_TQOBJECT(mTemplateList), TQT_SLOT(slotDeselect())); accel->readSettings(); mTemplateList->refresh(); diff --git a/kalarm/traywindow.cpp b/kalarm/traywindow.cpp index 190cb5384..3dd686a9e 100644 --- a/kalarm/traywindow.cpp +++ b/kalarm/traywindow.cpp @@ -88,15 +88,15 @@ TrayWindow::TrayWindow(MainWindow* tqparent, const char* name) AlarmEnableAction* a = Daemon::createAlarmEnableAction(actcol, "tAlarmEnable"); a->plug(contextMenu()); connect(a, TQT_SIGNAL(switched(bool)), TQT_SLOT(setEnabledtqStatus(bool))); - KAlarm::createNewAlarmAction(i18n("&New Alarm..."), this, TQT_SLOT(slotNewAlarm()), actcol, "tNew")->plug(contextMenu()); - KAlarm::createNewFromTemplateAction(i18n("New Alarm From &Template"), this, TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actcol, "tNewFromTempl")->plug(contextMenu()); - KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actcol)->plug(contextMenu()); + KAlarm::createNewAlarmAction(i18n("&New Alarm..."), TQT_TQOBJECT(this), TQT_SLOT(slotNewAlarm()), actcol, "tNew")->plug(contextMenu()); + KAlarm::createNewFromTemplateAction(i18n("New Alarm From &Template"), TQT_TQOBJECT(this), TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actcol, "tNewFromTempl")->plug(contextMenu()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actcol)->plug(contextMenu()); // Replace the default handler for the Quit context menu item const char* quitName = KStdAction::name(KStdAction::Quit); actcol->remove(actcol->action(quitName)); actcol->accel()->remove(quitName); - KStdAction::quit(this, TQT_SLOT(slotQuit()), actcol); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actcol); // Set icon to correspond with the alarms enabled menu status Daemon::checktqStatus(); @@ -173,12 +173,12 @@ void TrayWindow::setEnabledtqStatus(bool status) */ void TrayWindow::mousePressEvent(TQMouseEvent* e) { - if (e->button() == LeftButton && !theApp()->wantRunInSystemTray()) + if (e->button() == Qt::LeftButton && !theApp()->wantRunInSystemTray()) { // Left click: display/hide the first main window mAssocMainWindow = MainWindow::toggleWindow(mAssocMainWindow); } - else if (e->button() == MidButton) + else if (e->button() == Qt::MidButton) MainWindow::executeNew(); // display a New Alarm dialog else KSystemTray::mousePressEvent(e); @@ -191,7 +191,7 @@ void TrayWindow::mousePressEvent(TQMouseEvent* e) */ void TrayWindow::mouseReleaseEvent(TQMouseEvent* e) { - if (e->button() == LeftButton && mAssocMainWindow && mAssocMainWindow->isVisible()) + if (e->button() == Qt::LeftButton && mAssocMainWindow && mAssocMainWindow->isVisible()) { mAssocMainWindow->raise(); mAssocMainWindow->setActiveWindow(); @@ -266,9 +266,9 @@ void TrayWindow::tooltipAlarmText(TQString& text) const minutes[0] = (mins%60) / 10 + '0'; minutes[1] = (mins%60) % 10 + '0'; if (Preferences::showTooltipAlarmTime()) - item.text += i18n("prefix + hours:minutes", "(%1%2:%3)").arg(prefix).arg(mins/60).arg(minutes); + item.text += i18n("prefix + hours:minutes", "(%1%2:%3)").tqarg(prefix).tqarg(mins/60).tqarg(minutes); else - item.text += i18n("prefix + hours:minutes", "%1%2:%3").arg(prefix).arg(mins/60).arg(minutes); + item.text += i18n("prefix + hours:minutes", "%1%2:%3").tqarg(prefix).tqarg(mins/60).tqarg(minutes); item.text += ' '; space = true; } @@ -353,7 +353,7 @@ void TrayTooltip::maybeTip(const TQPoint&) if (Daemon::monitoringAlarms()) text = kapp->aboutData()->programName(); else - text = i18n("%1 - disabled").arg(kapp->aboutData()->programName()); + text = i18n("%1 - disabled").tqarg(kapp->aboutData()->programName()); kdDebug(5950) << "TrayTooltip::maybeTip(): " << text << endl; if (Preferences::tooltipAlarmCount()) tqparent->tooltipAlarmText(text); diff --git a/kalarm/undo.cpp b/kalarm/undo.cpp index c3b56612d..81d101c3f 100644 --- a/kalarm/undo.cpp +++ b/kalarm/undo.cpp @@ -207,7 +207,7 @@ Undo::List Undo::mRedoList; Undo* Undo::instance() { if (!mInstance) - mInstance = new Undo(kapp); + mInstance = new Undo(TQT_TQOBJECT(kapp)); return mInstance; } @@ -357,7 +357,7 @@ bool Undo::undo(Undo::Iterator it, Undo::Type type, TQWidget* tqparent, const TQ case UndoItem::ERR_PROG: err = i18n("Program error"); break; default: err = i18n("Unknown error"); break; } - KMessageBox::sorry(tqparent, i18n("Undo-action: message", "%1: %2").arg(action).arg(err)); + KMessageBox::sorry(tqparent, i18n("Undo-action: message", "%1: %2").tqarg(action).tqarg(err)); return false; } |