From 13281e2856a2ef43bbab78c5528470309c23aa77 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:48:49 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kparts/browserextension.cpp | 8 ++++---- kparts/browserextension.h | 2 +- kparts/browserinterface.cpp | 2 +- kparts/browserrun.cpp | 6 +++--- kparts/browserrun.h | 2 +- kparts/componentfactory.h | 6 +++--- kparts/dockmainwindow.cpp | 4 ++-- kparts/mainwindow.cpp | 4 ++-- kparts/part.cpp | 8 ++++---- kparts/partmanager.cpp | 2 +- kparts/plugin.cpp | 6 +++--- kparts/statusbarextension.cpp | 2 +- kparts/tests/notepad.cpp | 2 +- kparts/tests/parts.cpp | 2 +- 14 files changed, 28 insertions(+), 28 deletions(-) (limited to 'kparts') diff --git a/kparts/browserextension.cpp b/kparts/browserextension.cpp index e3ae1a516..2fc071ba8 100644 --- a/kparts/browserextension.cpp +++ b/kparts/browserextension.cpp @@ -20,13 +20,13 @@ #include "browserextension.h" #include -#include +#include #include #include #include #include #include -#include +#include #include #include @@ -370,7 +370,7 @@ BrowserExtension::BrowserExtension( KParts::ReadOnlyPart *parent, // they're supported or not ActionSlotMap::ConstIterator it = s_actionSlotMap->begin(); ActionSlotMap::ConstIterator itEnd = s_actionSlotMap->end(); - TQStrList slotNames = tqmetaObject()->slotNames(); + TQStrList slotNames = metaObject()->slotNames(); for ( int i=0 ; it != itEnd ; ++it, ++i ) { // Does the extension have a slot with the name of this action ? @@ -452,7 +452,7 @@ void BrowserExtension::slotCompleted() void BrowserExtension::pasteRequest() { TQCString plain( "plain" ); - TQString url = TQApplication::tqclipboard()->text(plain, TQClipboard::Selection).stripWhiteSpace(); + TQString url = TQApplication::clipboard()->text(plain, TQClipboard::Selection).stripWhiteSpace(); // Remove linefeeds and any whitespace surrounding it. url.remove(TQRegExp("[\\ ]*\\n+[\\ ]*")); diff --git a/kparts/browserextension.h b/kparts/browserextension.h index 364e300c4..17bf9d65e 100644 --- a/kparts/browserextension.h +++ b/kparts/browserextension.h @@ -446,7 +446,7 @@ public: * Checking if the extension implements a certain slot can be done like this: * * \code - * extension->tqmetaObject()->slotNames().contains( actionName + "()" ) + * extension->metaObject()->slotNames().contains( actionName + "()" ) * \endcode * * (note that @p actionName is the iterator's key value if already diff --git a/kparts/browserinterface.cpp b/kparts/browserinterface.cpp index 6882132fe..ae66dd6c0 100644 --- a/kparts/browserinterface.cpp +++ b/kparts/browserinterface.cpp @@ -19,7 +19,7 @@ BrowserInterface::~BrowserInterface() void BrowserInterface::callMethod( const char *name, const TQVariant &argument ) { - int slot = tqmetaObject()->findSlot( name ); + int slot = metaObject()->findSlot( name ); if ( slot == -1 ) return; diff --git a/kparts/browserrun.cpp b/kparts/browserrun.cpp index c617a5f99..0500e0631 100644 --- a/kparts/browserrun.cpp +++ b/kparts/browserrun.cpp @@ -209,7 +209,7 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const TQString& !m_strURL.isLocalFile() ) { if ( isTextExecutable(mimeType) ) - mimeType = TQString::tqfromLatin1("text/plain"); // view, don't execute + mimeType = TQString::fromLatin1("text/plain"); // view, don't execute kdDebug(1000) << "BrowserRun: ask for saving" << endl; KService::Ptr offer = KServiceTypeProfile::preferredService(mimeType, "Application"); // ... -> ask whether to save @@ -313,7 +313,7 @@ BrowserRun::AskSaveResult BrowserRun::askSave( const KURL & url, KService::Ptr o int choice = KMessageBox::questionYesNoCancel( 0L, question, url.host(), KStdGuiItem::saveAs(), openText, - TQString::tqfromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!! + TQString::fromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!! return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel ); // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC @@ -351,7 +351,7 @@ BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const TQ int choice = KMessageBox::questionYesNoCancel( 0L, question, url.host(), KStdGuiItem::saveAs(), KGuiItem( i18n( "&Open" ), "fileopen"), - TQString::tqfromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!! + TQString::fromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!! return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel ); // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC } diff --git a/kparts/browserrun.h b/kparts/browserrun.h index 0a0ec1be4..79a7386c6 100644 --- a/kparts/browserrun.h +++ b/kparts/browserrun.h @@ -98,7 +98,7 @@ namespace KParts { */ TQString contentDisposition() const; - bool serverSuggestsSave() const { return contentDisposition() == TQString::tqfromLatin1("attachment"); } + bool serverSuggestsSave() const { return contentDisposition() == TQString::fromLatin1("attachment"); } enum AskSaveResult { Save, Open, Cancel }; /** diff --git a/kparts/componentfactory.h b/kparts/componentfactory.h index ac37cabfe..67f98a90f 100644 --- a/kparts/componentfactory.h +++ b/kparts/componentfactory.h @@ -63,7 +63,7 @@ namespace KParts const TQStringList &args = TQStringList() ) { TQObject *object = factory->create( parent, name, - T::tqstaticMetaObject()->className(), + T::staticMetaObject()->className(), args ); T *result = tqt_dynamic_cast( object ); @@ -101,7 +101,7 @@ namespace KParts { KParts::Part *object = factory->createPart( parentWidget, widgetName, parent, name, - T::tqstaticMetaObject()->className(), + T::staticMetaObject()->className(), args ); T *result = tqt_dynamic_cast( object ); @@ -376,7 +376,7 @@ namespace KParts const TQStringList &args = TQStringList(), int *error = 0 ) { - KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::tqfromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null ); + KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::fromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null ); if ( offers.isEmpty() ) { if ( error ) diff --git a/kparts/dockmainwindow.cpp b/kparts/dockmainwindow.cpp index 461bc0ec3..9f7703ab6 100644 --- a/kparts/dockmainwindow.cpp +++ b/kparts/dockmainwindow.cpp @@ -76,7 +76,7 @@ void DockMainWindow::createGUI( Part * part ) KXMLGUIFactory *factory = guiFactory(); - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); TQPtrList plugins; @@ -117,7 +117,7 @@ void DockMainWindow::createGUI( Part * part ) } - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); d->m_activePart = part; } diff --git a/kparts/mainwindow.cpp b/kparts/mainwindow.cpp index facc5a0ec..c0c4cd086 100644 --- a/kparts/mainwindow.cpp +++ b/kparts/mainwindow.cpp @@ -93,7 +93,7 @@ void MainWindow::createGUI( Part * part ) assert( factory ); - tqsetUpdatesEnabled( false ); + setUpdatesEnabled( false ); TQPtrList plugins; @@ -137,7 +137,7 @@ void MainWindow::createGUI( Part * part ) applyMainWindowSettings( KGlobal::config(), autoSaveGroup() ); } - tqsetUpdatesEnabled( true ); + setUpdatesEnabled( true ); d->m_activePart = part; } diff --git a/kparts/part.cpp b/kparts/part.cpp index aacdf4c74..6d34160ca 100644 --- a/kparts/part.cpp +++ b/kparts/part.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include @@ -114,7 +114,7 @@ void PartBase::setInstance( KInstance *inst, bool bLoadPlugins ) // install 'instancename'data resource type KGlobal::dirs()->addResourceType( inst->instanceName() + "data", KStandardDirs::kde_default( "data" ) - + TQString::tqfromLatin1( inst->instanceName() ) + '/' ); + + TQString::fromLatin1( inst->instanceName() ) + '/' ); if ( bLoadPlugins ) loadPlugins( m_obj, this, instance() ); } @@ -365,7 +365,7 @@ bool ReadOnlyPart::openURL( const KURL &url ) KURL destURL; destURL.setPath( m_file ); d->m_job = KIO::file_copy( m_url, destURL, 0600, true, false, d->m_showProgressInfo ); - d->m_job->setWindow( widget() ? widget()->tqtopLevelWidget() : 0 ); + d->m_job->setWindow( widget() ? widget()->topLevelWidget() : 0 ); emit started( d->m_job ); connect( d->m_job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) ); return true; @@ -638,7 +638,7 @@ bool ReadWritePart::saveToURL() return false; } d->m_uploadJob = KIO::file_move( uploadUrl, m_url, -1, true /*overwrite*/ ); - d->m_uploadJob->setWindow( widget() ? widget()->tqtopLevelWidget() : 0 ); + d->m_uploadJob->setWindow( widget() ? widget()->topLevelWidget() : 0 ); connect( d->m_uploadJob, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotUploadFinished (KIO::Job *) ) ); return true; } diff --git a/kparts/partmanager.cpp b/kparts/partmanager.cpp index ca8a3a76d..97a8b9961 100644 --- a/kparts/partmanager.cpp +++ b/kparts/partmanager.cpp @@ -206,7 +206,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev ) { TQPoint pos; - if ( !d->m_managedTopLevelWidgets.containsRef( w->tqtopLevelWidget() ) ) + if ( !d->m_managedTopLevelWidgets.containsRef( w->topLevelWidget() ) ) return false; if ( d->m_bIgnoreScrollBars && w->inherits( TQSCROLLBAR_OBJECT_NAME_STRING ) ) diff --git a/kparts/plugin.cpp b/kparts/plugin.cpp index a42839c23..c9b0d2e36 100644 --- a/kparts/plugin.cpp +++ b/kparts/plugin.cpp @@ -68,7 +68,7 @@ TQString Plugin::xmlFile() const if ( !d->m_parentInstance || ( path.length() > 0 && path[ 0 ] == '/' ) ) return path; - TQString absPath = locate( "data", TQString::tqfromLatin1( d->m_parentInstance->instanceName() ) + '/' + path ); + TQString absPath = locate( "data", TQString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path ); assert( !absPath.isEmpty() ); return absPath; } @@ -80,7 +80,7 @@ TQString Plugin::localXMLFile() const if ( !d->m_parentInstance || ( path.length() > 0 && path[ 0 ] == '/' ) ) return path; - TQString absPath = locateLocal( "data", TQString::tqfromLatin1( d->m_parentInstance->instanceName() ) + '/' + path ); + TQString absPath = locateLocal( "data", TQString::fromLatin1( d->m_parentInstance->instanceName() ) + '/' + path ); assert( !absPath.isEmpty() ); return absPath; } @@ -104,7 +104,7 @@ TQValueList Plugin::pluginInfos( const KInstance * instance for (; pIt != pEnd; ++pIt ) { TQFileInfo fInfo( *pIt ); - if ( fInfo.extension() == TQString::tqfromLatin1( "desktop" ) ) + if ( fInfo.extension() == TQString::fromLatin1( "desktop" ) ) continue; TQMap::Iterator mapIt = sortedPlugins.find( fInfo.fileName() ); diff --git a/kparts/statusbarextension.cpp b/kparts/statusbarextension.cpp index 3e64bcece..a90a50689 100644 --- a/kparts/statusbarextension.cpp +++ b/kparts/statusbarextension.cpp @@ -135,7 +135,7 @@ KStatusBar * StatusBarExtension::statusBar() const { if ( !m_statusBar ) { TQWidget* w = static_cast(parent())->widget(); - KMainWindow* mw = tqt_dynamic_cast( w->tqtopLevelWidget() ); + KMainWindow* mw = tqt_dynamic_cast( w->topLevelWidget() ); if ( mw ) m_statusBar = mw->statusBar(); } diff --git a/kparts/tests/notepad.cpp b/kparts/tests/notepad.cpp index e0857a51e..311a49372 100644 --- a/kparts/tests/notepad.cpp +++ b/kparts/tests/notepad.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/kparts/tests/parts.cpp b/kparts/tests/parts.cpp index d932a168f..2d4409dda 100644 --- a/kparts/tests/parts.cpp +++ b/kparts/tests/parts.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.1