diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-14 21:19:12 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-15 00:43:41 +0900 |
commit | 3aab8aa05b954b80e336517f93463a9b5f50f3d6 (patch) | |
tree | be6bb581b1cb695d388cb4be10282514bb067401 /lib/kofficecore/KoMainWindow.cpp | |
parent | fb6b4d204d1155fa3a1bc7a128873340db1524f7 (diff) | |
download | koffice-3aab8aa05b954b80e336517f93463a9b5f50f3d6.tar.gz koffice-3aab8aa05b954b80e336517f93463a9b5f50f3d6.zip |
Remove various '#define' strings - part 6
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'lib/kofficecore/KoMainWindow.cpp')
-rw-r--r-- | lib/kofficecore/KoMainWindow.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp index a1675514..c2680b44 100644 --- a/lib/kofficecore/KoMainWindow.cpp +++ b/lib/kofficecore/KoMainWindow.cpp @@ -193,7 +193,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name ) d->m_manager = new KoPartManager( this ); connect( d->m_manager, TQT_SIGNAL( activePartChanged( KParts::Part * ) ), - TQT_TQOBJECT(this), TQT_SLOT( slotActivePartChanged( KParts::Part * ) ) ); + this, TQT_SLOT( slotActivePartChanged( KParts::Part * ) ) ); if ( instance ) setInstance( instance, false ); // don't load plugins! we don't want @@ -205,41 +205,41 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name ) setXMLFile( findMostRecentXMLFile( allFiles, doc ) ); setLocalXMLFile( locateLocal( "data", "koffice/koffice_shell.rc" ) ); - KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ), actionCollection(), "file_new" ); - KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" ); - m_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection() ); - d->m_paSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( slotFileSave() ), actionCollection(), "file_save" ); - d->m_paSaveAs = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs() ), actionCollection(), "file_save_as" ); - d->m_paPrint = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( slotFilePrint() ), actionCollection(), "file_print" ); - d->m_paPrintPreview = KStdAction::printPreview( TQT_TQOBJECT(this), TQT_SLOT( slotFilePrintPreview() ), actionCollection(), "file_print_preview" ); - d->m_sendfile = KStdAction::mail( TQT_TQOBJECT(this), TQT_SLOT( slotEmailFile() ), actionCollection(), "file_send_file"); + KStdAction::openNew( this, TQT_SLOT( slotFileNew() ), actionCollection(), "file_new" ); + KStdAction::open( this, TQT_SLOT( slotFileOpen() ), actionCollection(), "file_open" ); + m_recent = KStdAction::openRecent( this, TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection() ); + d->m_paSave = KStdAction::save( this, TQT_SLOT( slotFileSave() ), actionCollection(), "file_save" ); + d->m_paSaveAs = KStdAction::saveAs( this, TQT_SLOT( slotFileSaveAs() ), actionCollection(), "file_save_as" ); + d->m_paPrint = KStdAction::print( this, TQT_SLOT( slotFilePrint() ), actionCollection(), "file_print" ); + d->m_paPrintPreview = KStdAction::printPreview( this, TQT_SLOT( slotFilePrintPreview() ), actionCollection(), "file_print_preview" ); + d->m_sendfile = KStdAction::mail( this, TQT_SLOT( slotEmailFile() ), actionCollection(), "file_send_file"); - d->m_paCloseFile = KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( slotFileClose() ), actionCollection(), "file_close" ); - KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotFileQuit() ), actionCollection(), "file_quit" ); + d->m_paCloseFile = KStdAction::close( this, TQT_SLOT( slotFileClose() ), actionCollection(), "file_close" ); + KStdAction::quit( this, TQT_SLOT( slotFileQuit() ), actionCollection(), "file_quit" ); d->m_reloadfile = new TDEAction( i18n( "Reload"), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotReloadFile() ), + this, TQT_SLOT( slotReloadFile() ), actionCollection(), "file_reload_file"); d->m_versionsfile = new TDEAction( i18n( "Versions..."), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotVersionsFile() ), + this, TQT_SLOT( slotVersionsFile() ), actionCollection(), "file_versions_file"); d->m_importFile = new TDEAction( i18n( "I&mport..." ), 0, // clashing accel key :( - TQT_TQOBJECT(this), TQT_SLOT( slotImportFile() ), + this, TQT_SLOT( slotImportFile() ), actionCollection(), "file_import_file"); d->m_exportFile = new TDEAction( i18n( "E&xport..." ), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotExportFile() ), + this, TQT_SLOT( slotExportFile() ), actionCollection(), "file_export_file"); /* The following entry opens the document information dialog. Since the action is named so it intends to show data this entry should not have a trailing ellipses (...). */ d->m_paDocInfo = new TDEAction( i18n( "&Document Information" ), "documentinfo", 0, - TQT_TQOBJECT(this), TQT_SLOT( slotDocumentInfo() ), + this, TQT_SLOT( slotDocumentInfo() ), actionCollection(), "file_documentinfo" ); - KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeys() ), actionCollection() ); - KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); + KStdAction::keyBindings( this, TQT_SLOT( slotConfigureKeys() ), actionCollection() ); + KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); d->m_paDocInfo->setEnabled( false ); d->m_paSaveAs->setEnabled( false ); @@ -260,20 +260,20 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name ) // set up the action "list" for "Close all Views" (hacky :) (Werner) d->m_veryHackyActionList.append( new TDEAction(i18n("&Close All Views"), "window-close", - "ctrl+shift+w", TQT_TQOBJECT(this), TQT_SLOT(slotCloseAllViews()), + "ctrl+shift+w", this, TQT_SLOT(slotCloseAllViews()), actionCollection(), "view_closeallviews") ); // set up the action list for the splitter stuff d->m_splitViewActionList.append(new TDEAction(i18n("&Split View"), "view_split", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSplitView()), + this, TQT_SLOT(slotSplitView()), actionCollection(), "view_split")); d->m_removeView=new TDEAction(i18n("&Remove View"), "view_remove", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotRemoveView()), + this, TQT_SLOT(slotRemoveView()), actionCollection(), "view_rm_splitter"); d->m_splitViewActionList.append(d->m_removeView); d->m_removeView->setEnabled(false); d->m_orientation=new TDESelectAction(i18n("Splitter &Orientation"), "view_orientation", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSetOrientation()), + this, TQT_SLOT(slotSetOrientation()), actionCollection(), "view_splitter_orientation"); TQStringList items; items << i18n("&Vertical") @@ -281,7 +281,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name ) d->m_orientation->setItems(items); d->m_orientation->setCurrentItem(static_cast<int>(d->m_splitter->orientation())); d->m_splitViewActionList.append(d->m_orientation); - d->m_splitViewActionList.append(new TDEActionSeparator(TQT_TQOBJECT(this))); + d->m_splitViewActionList.append(new TDEActionSeparator(this)); // Load list of recent files TDEConfig * config = instance ? instance->config() : TDEGlobal::config(); @@ -596,9 +596,9 @@ bool KoMainWindow::openDocumentInternal( const KURL & url, KoDocument *newdoc ) return false; d->m_firstTime=true; - connect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int))); - connect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted())); - connect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & ))); + connect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int))); + connect(newdoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotLoadCompleted())); + connect(newdoc, TQT_SIGNAL(canceled( const TQString & )), this, TQT_SLOT(slotLoadCanceled( const TQString & ))); newdoc->addShell( this ); // used by openURL bool openRet = (!isImporting ()) ? newdoc->openURL(url) : newdoc->import(url); if(!openRet) @@ -639,9 +639,9 @@ void KoMainWindow::slotLoadCompleted() // We had no document, set the new one setRootDocument( newdoc ); } - disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int))); - disconnect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted())); - disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & ))); + disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int))); + disconnect(newdoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotLoadCompleted())); + disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), this, TQT_SLOT(slotLoadCanceled( const TQString & ))); } void KoMainWindow::slotLoadCanceled( const TQString & errMsg ) @@ -652,9 +652,9 @@ void KoMainWindow::slotLoadCanceled( const TQString & errMsg ) // ... can't delete the document, it's the one who emitted the signal... KoDocument* newdoc = (KoDocument *)(sender()); - disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int))); - disconnect(newdoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCompleted())); - disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), TQT_TQOBJECT(this), TQT_SLOT(slotLoadCanceled( const TQString & ))); + disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int))); + disconnect(newdoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotLoadCompleted())); + disconnect(newdoc, TQT_SIGNAL(canceled( const TQString & )), this, TQT_SLOT(slotLoadCanceled( const TQString & ))); newdoc->removeShell(this); delete newdoc; @@ -672,10 +672,10 @@ void KoMainWindow::slotSaveCompleted() { kdDebug(30003) << "KoMainWindow::slotSaveCompleted" << endl; KoDocument* pDoc = (KoDocument *)(sender()); - disconnect(pDoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int))); - disconnect(pDoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotSaveCompleted())); + disconnect(pDoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int))); + disconnect(pDoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSaveCompleted())); disconnect(pDoc, TQT_SIGNAL(canceled( const TQString & )), - TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanceled( const TQString & ))); + this, TQT_SLOT(slotSaveCanceled( const TQString & ))); } // returns true if we should save, false otherwise. @@ -739,10 +739,10 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent ) else reset_url = false; - connect(pDoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int))); - connect(pDoc, TQT_SIGNAL(completed()), TQT_TQOBJECT(this), TQT_SLOT(slotSaveCompleted())); + connect(pDoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int))); + connect(pDoc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSaveCompleted())); connect(pDoc, TQT_SIGNAL(canceled( const TQString & )), - TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanceled( const TQString & ))); + this, TQT_SLOT(slotSaveCanceled( const TQString & ))); KURL oldURL = pDoc->url(); TQString oldFile = pDoc->file(); @@ -893,7 +893,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent ) // (not Save As) they won't be expecting that they are // using their File/Export settings // - // As a bad side-effect of TQT_TQOBJECT(this), the modified flag will not + // As a bad side-effect of this, the modified flag will not // be updated and it is possible that what is currently on // their screen is not what is stored on disk (through loss // of formatting). But if you are dumb enough to change @@ -1088,8 +1088,8 @@ void KoMainWindow::chooseNewDocument( int /*KoDocument::InitDocFlags*/ initDocFl return; //FIXME: This needs to be handled differently - connect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int))); - disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), TQT_TQOBJECT(this), TQT_SLOT(slotProgress(int))); + connect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int))); + disconnect(newdoc, TQT_SIGNAL(sigProgress(int)), this, TQT_SLOT(slotProgress(int))); if ( ( !doc && ( initDocFlags == KoDocument::InitDocFileNew ) ) || ( doc && !doc->isEmpty() ) ) { @@ -1447,7 +1447,7 @@ void KoMainWindow::slotProgress(int value) { TQObjectList *l = queryList( "TQStatusBar" ); if ( !l || !l->first() ) { statusBar()->show(); - TQApplication::sendPostedEvents( TQT_TQOBJECT(this), TQEvent::ChildInserted ); + TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); setUpLayout(); } delete l; @@ -1506,7 +1506,7 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart ) if ( !d->bMainWindowGUIBuilt ) { // Load mainwindow plugins - KParts::Plugin::loadPlugins( TQT_TQOBJECT(this), this, instance(), true ); + KParts::Plugin::loadPlugins( this, this, instance(), true ); createShellGUI(); } @@ -1541,7 +1541,7 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart ) TDEToggleAction * act = new TDEToggleAction( i18n("Show %1 Toolbar").arg( tb->text() ), 0, actionCollection(), tb->name() ); act->setCheckedState(i18n("Hide %1 Toolbar").arg( tb->text() )); - connect( act, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(this), TQT_SLOT( slotToolbarToggled( bool ) ) ); + connect( act, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotToolbarToggled( bool ) ) ); act->setChecked ( !tb->isHidden() ); d->m_toolbarList.append( act ); } |