From 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:50:21 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kontact/src/aboutdialog.cpp | 10 ++--- kontact/src/iconsidepane.cpp | 20 +++++----- kontact/src/iconsidepane.h | 8 ++-- kontact/src/kcmkontact.cpp | 6 +-- kontact/src/main.cpp | 4 +- kontact/src/mainwindow.cpp | 90 +++++++++++++++++++++--------------------- kontact/src/profiledialog.cpp | 10 ++--- kontact/src/profilemanager.cpp | 2 +- 8 files changed, 75 insertions(+), 75 deletions(-) (limited to 'kontact/src') diff --git a/kontact/src/aboutdialog.cpp b/kontact/src/aboutdialog.cpp index 1bbd0ef6..6f27a4cf 100644 --- a/kontact/src/aboutdialog.cpp +++ b/kontact/src/aboutdialog.cpp @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include @@ -81,7 +81,7 @@ void AboutDialog::addAboutData( const TQString &title, const TQString &icon, text += "

" + about->programName() + "
"; - text += i18n( "Version %1

" ).tqarg( about->version() ); + text += i18n( "Version %1

" ).arg( about->version() ); if ( !about->shortDescription().isEmpty() ) { text += "

" + about->shortDescription() + "
" + @@ -96,7 +96,7 @@ void AboutDialog::addAboutData( const TQString &title, const TQString &icon, text.replace( "\n", "
" ); KActiveLabel *label = new KActiveLabel( text, topFrame ); - label->tqsetAlignment( AlignTop ); + label->setAlignment( AlignTop ); topLayout->addWidget( label ); @@ -163,13 +163,13 @@ void AboutDialog::addLicenseText( const KAboutData *about ) TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( "signature", KIcon::Desktop, 48 ); - TQString title = i18n( "%1 License" ).tqarg( about->programName() ); + TQString title = i18n( "%1 License" ).arg( about->programName() ); TQFrame *topFrame = addPage( title, TQString(), pixmap ); TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); KTextBrowser *textBrowser = new KTextBrowser( topFrame ); - textBrowser->setText( TQString( "

%1
" ).tqarg( about->license() ) ); + textBrowser->setText( TQString( "
%1
" ).arg( about->license() ) ); topLayout->addWidget( textBrowser ); } diff --git a/kontact/src/iconsidepane.cpp b/kontact/src/iconsidepane.cpp index 4eacd608..a6490766 100644 --- a/kontact/src/iconsidepane.cpp +++ b/kontact/src/iconsidepane.cpp @@ -173,13 +173,13 @@ void EntryItem::paint( TQPainter *p ) TQBrush brush; if ( isCurrent() || isSelected() || mPaintActive ) - brush = box->tqcolorGroup().brush( TQColorGroup::Highlight ); + brush = box->colorGroup().brush( TQColorGroup::Highlight ); else - brush = TQBrush(box->tqcolorGroup().highlight().light( 115 )); + brush = TQBrush(box->colorGroup().highlight().light( 115 )); p->fillRect( 1, 0, w - 2, h - 1, brush ); TQPen pen = p->pen(); TQPen oldPen = pen; - pen.setColor( box->tqcolorGroup().mid() ); + pen.setColor( box->colorGroup().mid() ); p->setPen( pen ); p->drawPoint( 1, 0 ); @@ -196,9 +196,9 @@ void EntryItem::paint( TQPainter *p ) p->drawPixmap( x, y, mPixmap ); } - TQColor shadowColor = listBox()->tqcolorGroup().background().dark(115); + TQColor shadowColor = listBox()->colorGroup().background().dark(115); if ( isCurrent() || isSelected() ) { - p->setPen( box->tqcolorGroup().highlightedText() ); + p->setPen( box->colorGroup().highlightedText() ); } if ( !text().isEmpty() && navigator()->showText() ) { @@ -223,15 +223,15 @@ void EntryItem::paint( TQPainter *p ) } if ( plugin()->disabled() ) { - p->setPen( box->tqpalette().disabled().text( ) ); + p->setPen( box->palette().disabled().text( ) ); } else if ( isCurrent() || isSelected() || mHasHover ) { - p->setPen( box->tqcolorGroup().highlight().dark(115) ); + p->setPen( box->colorGroup().highlight().dark(115) ); p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1), y + 1, text() ); - p->setPen( box->tqcolorGroup().highlightedText() ); + p->setPen( box->colorGroup().highlightedText() ); } else - p->setPen( box->tqcolorGroup().text() ); + p->setPen( box->colorGroup().text() ); p->drawText( x, y, text() ); } @@ -284,7 +284,7 @@ Navigator::Navigator( IconSidePane *parent, const char *name ) } -TQSize Navigator::tqsizeHint() const +TQSize Navigator::sizeHint() const { return TQSize( 100, 100 ); } diff --git a/kontact/src/iconsidepane.h b/kontact/src/iconsidepane.h index d215558d..13533228 100644 --- a/kontact/src/iconsidepane.h +++ b/kontact/src/iconsidepane.h @@ -101,12 +101,12 @@ class EntryItemToolTip : public TQToolTip if ( !mListBox ) return; TQListBoxItem* item = mListBox->itemAt( p ); if ( !item ) return; - const TQRect tqitemRect = mListBox->tqitemRect( item ); - if ( !tqitemRect.isValid() ) return; + const TQRect itemRect = mListBox->itemRect( item ); + if ( !itemRect.isValid() ) return; const EntryItem *entryItem = static_cast( item ); TQString tipStr = entryItem->text(); - tip( tqitemRect, tipStr ); + tip( itemRect, tipStr ); } private: TQListBox* mListBox; @@ -126,7 +126,7 @@ class Navigator : public KListBox void updatePlugins( TQValueList plugins ); - TQSize tqsizeHint() const; + TQSize sizeHint() const; void highlightItem( EntryItem* item ); diff --git a/kontact/src/kcmkontact.cpp b/kontact/src/kcmkontact.cpp index 7bfed9cd..87ce5726 100644 --- a/kontact/src/kcmkontact.cpp +++ b/kontact/src/kcmkontact.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include @@ -114,8 +114,8 @@ PluginSelection::~PluginSelection() void PluginSelection::readConfig() { const KTrader::OfferList offers = KTrader::self()->query( - TQString::tqfromLatin1( "Kontact/Plugin" ), - TQString( "[X-KDE-KontactPluginVersion] == %1" ).tqarg( KONTACT_PLUGIN_VERSION ) ); + TQString::fromLatin1( "Kontact/Plugin" ), + TQString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) ); int activeComponent = 0; mPluginCombo->clear(); diff --git a/kontact/src/main.cpp b/kontact/src/main.cpp index d2a57bcb..20c6f545 100644 --- a/kontact/src/main.cpp +++ b/kontact/src/main.cpp @@ -76,8 +76,8 @@ static void listPlugins() { KInstance instance( "kontact" ); // Can't use KontactApp since it's too late for adding cmdline options KTrader::OfferList offers = KTrader::self()->query( - TQString::tqfromLatin1( "Kontact/Plugin" ), - TQString( "[X-KDE-KontactPluginVersion] == %1" ).tqarg( KONTACT_PLUGIN_VERSION ) ); + TQString::fromLatin1( "Kontact/Plugin" ), + TQString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) ); for ( KService::List::Iterator it = offers.begin(); it != offers.end(); ++it ) { KService::Ptr service = (*it); // skip summary only plugins diff --git a/kontact/src/mainwindow.cpp b/kontact/src/mainwindow.cpp index fe24bd8d..88be77c7 100644 --- a/kontact/src/mainwindow.cpp +++ b/kontact/src/mainwindow.cpp @@ -124,8 +124,8 @@ void MainWindow::initGUI() TQT_SLOT( showAboutDialog() ) ); KTrader::OfferList offers = KTrader::self()->query( - TQString::tqfromLatin1( "Kontact/Plugin" ), - TQString( "[X-KDE-KontactPluginVersion] == %1" ).tqarg( KONTACT_PLUGIN_VERSION ) ); + TQString::fromLatin1( "Kontact/Plugin" ), + TQString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) ); mPluginInfos = KPluginInfo::fromServices( offers, Prefs::self()->config(), "Plugins" ); KPluginInfo::List::Iterator it; @@ -136,7 +136,7 @@ void MainWindow::initGUI() TQT_TQOBJECT(this), TQT_SLOT(slotActionTriggered()), actionCollection(), (*it)->pluginName().latin1() ); action->setName( (*it)->pluginName().latin1() ); - action->setWhatsThis( i18n( "Switch to plugin %1" ).tqarg( (*it)->name() ) ); + action->setWhatsThis( i18n( "Switch to plugin %1" ).arg( (*it)->name() ) ); TQVariant hasPartProp = (*it)->property( "X-KDE-KontactPluginHasPart" ); if ( !hasPartProp.isValid() || hasPartProp.toBool() ) { @@ -244,7 +244,7 @@ void MainWindow::initWidgets() mSplitter = new TQSplitter( mTopWidget ); mBox = new TQHBox( mTopWidget ); mSidePane = new IconSidePane( this, mSplitter ); - mSidePane->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, + mSidePane->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); // donÄt occupy screen estate on load TQValueList sizes; @@ -267,7 +267,7 @@ void MainWindow::initWidgets() initAboutScreen(); TQString loading = i18n( "

%1

" ) - .tqarg( i18n("Loading Kontact...") ); + .arg( i18n("Loading Kontact...") ); paintAboutScreen( loading ); @@ -278,7 +278,7 @@ void MainWindow::initWidgets() mLittleProgress = new KPIM::StatusbarProgressWidget( progressDialog, statusBar() ); mStatusMsgLabel = new KRSqueezedTextLabel( i18n( " Initializing..." ), statusBar() ); - mStatusMsgLabel->tqsetAlignment( AlignLeft | AlignVCenter ); + mStatusMsgLabel->setAlignment( AlignLeft | AlignVCenter ); statusBar()->addWidget( mStatusMsgLabel, 10 , false ); statusBar()->addWidget( mLittleProgress, 0 , true ); @@ -290,11 +290,11 @@ void MainWindow::paintAboutScreen( const TQString& msg ) { TQString location = locate( "data", "kontact/about/main.html" ); TQString content = KPIM::kFileToString( location ); - content = content.tqarg( locate( "data", "libtdepim/about/kde_infopage.css" ) ); + content = content.arg( locate( "data", "libtdepim/about/kde_infopage.css" ) ); if ( kapp->reverseLayout() ) - content = content.tqarg( "@import \"%1\";" ).tqarg( locate( "data", "libtdepim/about/kde_infopage_rtl.css" ) ); + content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libtdepim/about/kde_infopage_rtl.css" ) ); else - content = content.tqarg( "" ); + content = content.arg( "" ); mIntroPart->begin( KURL( location ) ); @@ -302,8 +302,8 @@ void MainWindow::paintAboutScreen( const TQString& msg ) TQString catchPhrase( i18n( "Get Organized!" ) ); TQString quickDescription( i18n( "The KDE Personal Information Management Suite" ) ); - mIntroPart->write( content.tqarg( TQFont().pointSize() + 2 ).tqarg( appName ) - .tqarg( catchPhrase ).tqarg( quickDescription ).tqarg( msg ) ); + mIntroPart->write( content.arg( TQFont().pointSize() + 2 ).arg( appName ) + .arg( catchPhrase ).arg( quickDescription ).arg( msg ) ); mIntroPart->end(); } @@ -629,7 +629,7 @@ void MainWindow::updateShortcuts() ++it; if ( isPluginLoadedByAction( action ) ) { loadedActions.append( action ); - TQString shortcut = TQString( "CTRL+%1" ).tqarg( i ); + TQString shortcut = TQString( "CTRL+%1" ).arg( i ); action->setShortcut( KShortcut( shortcut ) ); i++; } else { @@ -794,7 +794,7 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin ) if ( !part ) { KApplication::restoreOverrideCursor(); KMessageBox::error( this, i18n( "Cannot load part for %1." ) - .tqarg( plugin->title() ) + .arg( plugin->title() ) + "\n" + lastErrorMessage() ); plugin->setDisabled( true ); mSidePane->updatePlugins(); @@ -802,13 +802,13 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin ) } // store old focus widget - TQWidget *tqfocusWidget = kapp->tqfocusWidget(); - if ( mCurrentPlugin && tqfocusWidget ) { + TQWidget *focusWidget = kapp->focusWidget(); + if ( mCurrentPlugin && focusWidget ) { // save the focus widget only when it belongs to the activated part - TQWidget *parent = tqfocusWidget->parentWidget(); + TQWidget *parent = focusWidget->parentWidget(); while ( parent ) { if ( parent == mCurrentPlugin->part()->widget() ) - mFocusWidgets.insert( mCurrentPlugin->identifier(), TQGuardedPtr( tqfocusWidget ) ); + mFocusWidgets.insert( mCurrentPlugin->identifier(), TQGuardedPtr( focusWidget ) ); parent = parent->parentWidget(); } @@ -829,9 +829,9 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin ) view->show(); if ( mFocusWidgets.contains( plugin->identifier() ) ) { - tqfocusWidget = mFocusWidgets[ plugin->identifier() ]; - if ( tqfocusWidget ) - tqfocusWidget->setFocus(); + focusWidget = mFocusWidgets[ plugin->identifier() ]; + if ( focusWidget ) + focusWidget->setFocus(); } else view->setFocus(); @@ -848,7 +848,7 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin ) topDock()->moveDockWindow( navigatorToolBar, -1 ); } - setCaption( i18n( "Plugin dependent window title" ,"%1 - Kontact" ).tqarg( plugin->title() ) ); + setCaption( i18n( "Plugin dependent window title" ,"%1 - Kontact" ).arg( plugin->title() ) ); if ( newAction ) { mNewActions->setIcon( newAction->icon() ); @@ -1178,30 +1178,30 @@ TQString MainWindow::introductionString() "%1
%1" "" "

Skip this introduction

" ) - .tqarg( kapp->aboutData()->version() ) - .tqarg( i18n( "Kontact handles your e-mail, addressbook, calendar, to-do list and more." ) ) - .tqarg( "exec:/help?kontact" ) - .tqarg( iconSize ) - .tqarg( iconSize ) - .tqarg( handbook_icon_path ) - .tqarg( "exec:/help?kontact" ) - .tqarg( i18n( "Read Manual" ) ) - .tqarg( i18n( "Learn more about Kontact and its components" ) ) - .tqarg( "http://kontact.org" ) - .tqarg( iconSize ) - .tqarg( iconSize ) - .tqarg( html_icon_path ) - .tqarg( "http://kontact.org" ) - .tqarg( i18n( "Visit Kontact Website" ) ) - .tqarg( i18n( "Access online resources and tutorials" ) ) - .tqarg( "exec:/gwwizard" ) - .tqarg( iconSize ) - .tqarg( iconSize ) - .tqarg( wizard_icon_path ) - .tqarg( "exec:/gwwizard" ) - .tqarg( i18n( "Configure Kontact as Groupware Client" ) ) - .tqarg( i18n( "Prepare Kontact for use in corporate networks" ) ) - .tqarg( "exec:/switch" ); + .arg( kapp->aboutData()->version() ) + .arg( i18n( "Kontact handles your e-mail, addressbook, calendar, to-do list and more." ) ) + .arg( "exec:/help?kontact" ) + .arg( iconSize ) + .arg( iconSize ) + .arg( handbook_icon_path ) + .arg( "exec:/help?kontact" ) + .arg( i18n( "Read Manual" ) ) + .arg( i18n( "Learn more about Kontact and its components" ) ) + .arg( "http://kontact.org" ) + .arg( iconSize ) + .arg( iconSize ) + .arg( html_icon_path ) + .arg( "http://kontact.org" ) + .arg( i18n( "Visit Kontact Website" ) ) + .arg( i18n( "Access online resources and tutorials" ) ) + .arg( "exec:/gwwizard" ) + .arg( iconSize ) + .arg( iconSize ) + .arg( wizard_icon_path ) + .arg( "exec:/gwwizard" ) + .arg( i18n( "Configure Kontact as Groupware Client" ) ) + .arg( i18n( "Prepare Kontact for use in corporate networks" ) ) + .arg( "exec:/switch" ); return info; } diff --git a/kontact/src/profiledialog.cpp b/kontact/src/profiledialog.cpp index c5837780..87b5d139 100644 --- a/kontact/src/profiledialog.cpp +++ b/kontact/src/profiledialog.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include @@ -140,7 +140,7 @@ void Kontact::ProfileDialog::profileLoaded( const TQString& id ) const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id ); if ( profile.isNull() ) return; - KMessageBox::information( this, i18n("The profile \"%1\" was successfully loaded. Some profile settings require a restart to get activated.").tqarg( profile.name() ), i18n("Profile Loaded") ); + KMessageBox::information( this, i18n("The profile \"%1\" was successfully loaded. Some profile settings require a restart to get activated.").arg( profile.name() ), i18n("Profile Loaded") ); } void Kontact::ProfileDialog::saveToSelectedProfile() @@ -148,7 +148,7 @@ void Kontact::ProfileDialog::saveToSelectedProfile() const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( selectedProfile() ); if ( profile.isNull() ) return; - if ( KMessageBox::Yes != KMessageBox::warningYesNo( this, i18n("The profile \"%1\" will be overwritten with the current settings. Are you sure?").tqarg( profile.name() ), i18n("Save to Profile"), KStdGuiItem::overwrite(), KStdGuiItem::cancel() ) ) + if ( KMessageBox::Yes != KMessageBox::warningYesNo( this, i18n("The profile \"%1\" will be overwritten with the current settings. Are you sure?").arg( profile.name() ), i18n("Save to Profile"), KStdGuiItem::overwrite(), KStdGuiItem::cancel() ) ) return; Kontact::ProfileManager::self()->saveToProfile( profile.id() ); } @@ -158,7 +158,7 @@ void Kontact::ProfileDialog::deleteSelectedProfile() const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( selectedProfile() ); if ( profile.isNull() ) return; - if ( KMessageBox::Yes != KMessageBox::warningYesNo( this, i18n("Do you really want to delete the profile \"%1\"? All profile settings will be lost!").tqarg( profile.name() ), i18n("Delete Profile"), KStdGuiItem::del(), KStdGuiItem::cancel() ) ) + if ( KMessageBox::Yes != KMessageBox::warningYesNo( this, i18n("Do you really want to delete the profile \"%1\"? All profile settings will be lost!").arg( profile.name() ), i18n("Delete Profile"), KStdGuiItem::del(), KStdGuiItem::cancel() ) ) return; Kontact::ProfileManager::self()->removeProfile( profile ); } @@ -175,7 +175,7 @@ void Kontact::ProfileDialog::exportSelectedProfile() const Kontact::ProfileManager::ExportError error = Kontact::ProfileManager::self()->exportProfileToDirectory( id, path ); if ( error == Kontact::ProfileManager::SuccessfulExport ) { - KMessageBox::information( this, i18n("The profile \"%1\" was successfully exported.").tqarg( profile.name() ), i18n("Profile Exported") ); + KMessageBox::information( this, i18n("The profile \"%1\" was successfully exported.").arg( profile.name() ), i18n("Profile Exported") ); } else { diff --git a/kontact/src/profilemanager.cpp b/kontact/src/profilemanager.cpp index 91fc370d..67f1bd19 100644 --- a/kontact/src/profilemanager.cpp +++ b/kontact/src/profilemanager.cpp @@ -178,7 +178,7 @@ void Kontact::ProfileManager::writeProfileConfig( const Kontact::Profile& profil void Kontact::ProfileManager::readConfig() { - const TQStringList profilePaths = KGlobal::dirs()->findAllResources( "data", TQString::tqfromLatin1( "kontact/profiles/*/profile.cfg" ) ); + const TQStringList profilePaths = KGlobal::dirs()->findAllResources( "data", TQString::fromLatin1( "kontact/profiles/*/profile.cfg" ) ); typedef TQMap ProfileMap; ProfileMap profiles; -- cgit v1.2.3