From 3aab8aa05b954b80e336517f93463a9b5f50f3d6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 14 Dec 2023 21:19:12 +0900 Subject: Remove various '#define' strings - part 6 Signed-off-by: Michele Calgaro --- lib/kofficecore/KoContainerHandler.cpp | 12 ++--- lib/kofficecore/KoDocument.cpp | 2 +- lib/kofficecore/KoMainWindow.cpp | 88 +++++++++++++++++----------------- lib/kofficecore/KoMainWindowIface.cpp | 2 +- lib/kofficecore/KoView.cpp | 6 +-- lib/kofficeui/KoContextCelp.cpp | 2 +- lib/kofficeui/KoTooluButton.cpp | 8 ++-- lib/kofficeui/KoUnitWidgets.cpp | 12 ++--- lib/kofficeui/Kolinewidthaction.cpp | 2 +- lib/kofficeui/tkcoloractions.cpp | 4 +- lib/koproperty/editor.cpp | 2 +- lib/koproperty/editors/spinbox.cpp | 8 ++-- lib/koproperty/test/test.cpp | 2 +- 13 files changed, 75 insertions(+), 75 deletions(-) (limited to 'lib') diff --git a/lib/kofficecore/KoContainerHandler.cpp b/lib/kofficecore/KoContainerHandler.cpp index 74c49a7e..e11654e9 100644 --- a/lib/kofficecore/KoContainerHandler.cpp +++ b/lib/kofficecore/KoContainerHandler.cpp @@ -71,7 +71,7 @@ public: KoPartResizeHandler::KoPartResizeHandler( TQWidget* widget, const TQWMatrix& matrix, KoView* view, KoChild* child, KoChild::Gadget gadget, const TQPoint& point ) - : KoEventHandler( TQT_TQOBJECT(widget) ) + : KoEventHandler( widget ) { child->lock(); d=new KoPartResizeHandlerPrivate(matrix, view, child, gadget, point); @@ -230,7 +230,7 @@ public: KoPartMoveHandler::KoPartMoveHandler( TQWidget* widget, const TQWMatrix& matrix, KoView* view, KoChild* child, const TQPoint& point ) - : KoEventHandler( TQT_TQOBJECT(widget) ) + : KoEventHandler( widget ) { child->lock(); d=new KoPartMoveHandlerPrivate(matrix, view, child, point); @@ -274,7 +274,7 @@ bool KoPartMoveHandler::eventFilter( TQObject*, TQEvent* ev ) // ------------------------------------------------------- KoContainerHandler::KoContainerHandler( KoView* view, TQWidget* widget ) - : KoEventHandler( TQT_TQOBJECT(widget) ) + : KoEventHandler( widget ) { m_view = view; } @@ -312,19 +312,19 @@ bool KoContainerHandler::eventFilter( TQObject*, TQEvent* ev ) } else if ( e->button() == TQt::LeftButton && gadget == KoChild::Move ) { - (void)new KoPartMoveHandler( TQT_TQWIDGET(target()), m_view->matrix(), m_view, ch, pos ); + (void)new KoPartMoveHandler( static_cast(target()), m_view->matrix(), m_view, ch, pos ); return true; } else if ( e->button() == TQt::LeftButton && gadget != KoChild::NoGadget ) { - (void)new KoPartResizeHandler( TQT_TQWIDGET(target()), m_view->matrix(), m_view, ch, gadget, pos ); + (void)new KoPartResizeHandler( static_cast(target()), m_view->matrix(), m_view, ch, gadget, pos ); return true; } return false; } else if ( ev->type() == TQEvent::MouseMove ) { - TQWidget *targetWidget = TQT_TQWIDGET( target() ); + TQWidget *targetWidget = static_cast( target() ); KoChild::Gadget gadget; TQPoint pos; TQMouseEvent *e=static_cast(ev); diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index 99bd8459..6a6331de 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -184,7 +184,7 @@ public: { TQObject *wid = child( 0, "TQWidget" ); if ( wid ) - TQT_TQWIDGET(wid)->setGeometry( 0, 0, width(), height() ); + static_cast(wid)->setGeometry( 0, 0, width(), height() ); } virtual void childEvent( TQChildEvent *ev ) 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(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 ); } diff --git a/lib/kofficecore/KoMainWindowIface.cpp b/lib/kofficecore/KoMainWindowIface.cpp index 51d782b1..fda04670 100644 --- a/lib/kofficecore/KoMainWindowIface.cpp +++ b/lib/kofficecore/KoMainWindowIface.cpp @@ -27,7 +27,7 @@ #include KoMainWindowIface::KoMainWindowIface( KoMainWindow *mainwindow ) - : DCOPObject( TQT_TQOBJECT(mainwindow) ) + : DCOPObject( mainwindow ) { m_pMainWindow = mainwindow; m_actionProxy = new KDCOPActionProxy( mainwindow->actionCollection(), this ); diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp index 322c1a7d..6bebf91e 100644 --- a/lib/kofficecore/KoView.cpp +++ b/lib/kofficecore/KoView.cpp @@ -114,7 +114,7 @@ KoView::KoView( KoDocument *document, TQWidget *parent, const char *name ) //kdDebug(30003) << "KoView::KoView " << this << endl; d = new KoViewPrivate; d->m_doc = document; - KParts::PartBase::setPartObject( TQT_TQOBJECT(this) ); + KParts::PartBase::setPartObject( this ); setFocusPolicy( TQWidget::StrongFocus ); @@ -533,7 +533,7 @@ void KoView::slotChildActivated( bool a ) // Is the new active view a child of this one ? // In this case we may not delete! // TQObject *n = d->m_manager->activeWidget(); - TQObject *n = TQT_TQOBJECT(activeWidget); + TQObject *n = activeWidget; while( n ) if ( n == (TQObject *)view ) return; @@ -627,7 +627,7 @@ void KoView::slotAutoScroll( ) void KoView::setupGlobalActions() { actionNewView = new TDEAction( i18n( "&New View" ), "window-new", 0, - TQT_TQOBJECT(this), TQT_SLOT( newView() ), + this, TQT_SLOT( newView() ), actionCollection(), "view_newview" ); } diff --git a/lib/kofficeui/KoContextCelp.cpp b/lib/kofficeui/KoContextCelp.cpp index b530a93c..2db2bd31 100644 --- a/lib/kofficeui/KoContextCelp.cpp +++ b/lib/kofficeui/KoContextCelp.cpp @@ -364,7 +364,7 @@ void KoHelpWidget::timerEvent( TQTimerEvent* ) void KoHelpWidget::stopScrolling() { - TQT_TQOBJECT(this)->killTimers(); + this->killTimers(); } // KoHelpWidget::stopScrolling KoContextHelpPopup::KoContextHelpPopup( TQWidget* parent ) diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp index bbe4145a..f202177c 100644 --- a/lib/kofficeui/KoTooluButton.cpp +++ b/lib/kofficeui/KoTooluButton.cpp @@ -75,7 +75,7 @@ TQPopupMenu* KoColorPanel::createColorPopup( KoColorPanel::MenuStyle style, cons TQPainter p( &pixmap ); p.fillRect( 0, 0, 12, 12, defaultColor ); p.end(); - proxy = new KoColorPopupProxy( defaultColor, 0, TQT_TQOBJECT(menu), "color proxy" ); + proxy = new KoColorPopupProxy( defaultColor, 0, menu, "color proxy" ); connect( proxy, TQT_SIGNAL( colorSelected( const TQColor& ) ), receiver, slot ); menu->insertItem( TQIconSet( pixmap ), i18n( "Default Color" ), proxy, TQT_SLOT( slotDefaultColor() ) ); menu->insertSeparator(); @@ -92,7 +92,7 @@ TQPopupMenu* KoColorPanel::createColorPopup( KoColorPanel::MenuStyle style, cons connect( panel, TQT_SIGNAL( colorSelected( const TQColor& ) ), receiver, slot ); menu->insertItem( panel ); if ( !proxy ) { - proxy = new KoColorPopupProxy( TQColor(), panel, TQT_TQOBJECT(menu), "color proxy" ); + proxy = new KoColorPopupProxy( TQColor(), panel, menu, "color proxy" ); connect( proxy, TQT_SIGNAL( colorSelected( const TQColor& ) ), receiver, slot ); } else @@ -636,7 +636,7 @@ void KoColorPopupProxy::slotMoreColors() TQColor newColor; TQWidget* p = 0; if ( parent() && parent()->isWidgetType() ) - p = TQT_TQWIDGET( parent() ); + p = static_cast( parent() ); if ( KColorDialog::getColor( newColor, p ) == TQDialog::Accepted ) { m_recentColors->insertColor( newColor ); @@ -832,7 +832,7 @@ bool KoToolButton::eventFilter( TQObject* o, TQEvent* e ) void KoToolButton::init() { - m_popup = KoColorPanel::createColorPopup( KoColorPanel::CustomColors, TQt::yellow, TQT_TQOBJECT(this), + m_popup = KoColorPanel::createColorPopup( KoColorPanel::CustomColors, TQt::yellow, this, TQT_SLOT( colorSelected( const TQColor& ) ), this, "no-name" ); // We are interested in the mouse clicks on the arrow button diff --git a/lib/kofficeui/KoUnitWidgets.cpp b/lib/kofficeui/KoUnitWidgets.cpp index 4c4a5c45..5c5bdbd9 100644 --- a/lib/kofficeui/KoUnitWidgets.cpp +++ b/lib/kofficeui/KoUnitWidgets.cpp @@ -124,7 +124,7 @@ KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *parent, const char *name ) , m_stepInPoints( 1 ) { KDoubleSpinBox::setPrecision( 2 ); - m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); + m_validator = new KoUnitDoubleValidator( this, this ); TQSpinBox::setValidator( m_validator ); setAcceptLocalizedNumbers( true ); setUnit( KoUnit::U_PT ); @@ -145,7 +145,7 @@ KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *parent, m_lowerInPoints( lower ), m_upperInPoints( upper ), m_stepInPoints( step ) { m_unit = KoUnit::U_PT; - m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); + m_validator = new KoUnitDoubleValidator( this, this ); TQSpinBox::setValidator( m_validator ); setAcceptLocalizedNumbers( true ); setUnit( unit ); @@ -224,7 +224,7 @@ KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *parent, const char *name ) m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { setAlignment( TQt::AlignRight ); - m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); + m_validator = new KoUnitDoubleValidator( this, this ); setValidator( m_validator ); setUnit( KoUnit::U_PT ); changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) ); @@ -236,7 +236,7 @@ KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *parent, double lower, doub m_lowerInPoints( lower ), m_upperInPoints( upper ) { setAlignment( TQt::AlignRight ); - m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); + m_validator = new KoUnitDoubleValidator( this, this ); setValidator( m_validator ); setUnit( unit ); changeValue( KoUnit::ptToUnit( value, unit ) ); @@ -288,7 +288,7 @@ KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *parent, const char *name ) : KComboBox( true, parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { lineEdit()->setAlignment( TQt::AlignRight ); - m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); + m_validator = new KoUnitDoubleValidator( this, this ); lineEdit()->setValidator( m_validator ); setUnit( KoUnit::U_PT ); changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) ); @@ -301,7 +301,7 @@ KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *parent, double lower, doub m_lowerInPoints( lower ), m_upperInPoints( upper ) { lineEdit()->setAlignment( TQt::AlignRight ); - m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); + m_validator = new KoUnitDoubleValidator( this, this ); lineEdit()->setValidator( m_validator ); setUnit( unit ); changeValue( KoUnit::ptToUnit( value, unit ) ); diff --git a/lib/kofficeui/Kolinewidthaction.cpp b/lib/kofficeui/Kolinewidthaction.cpp index b9ff452a..a000ca56 100644 --- a/lib/kofficeui/Kolinewidthaction.cpp +++ b/lib/kofficeui/Kolinewidthaction.cpp @@ -109,7 +109,7 @@ void KoLineWidthAction::execute(int index) d->m_currentWidth = (double) index + 1.0; ok = true; } if(index == 11) { // Custom width dialog... - KoLineWidthChooser dlg(TQT_TQWIDGET(tqApp->activeWindow())); + KoLineWidthChooser dlg(tqApp->activeWindow()); dlg.setUnit(d->m_unit); dlg.setWidth(d->m_currentWidth); diff --git a/lib/kofficeui/tkcoloractions.cpp b/lib/kofficeui/tkcoloractions.cpp index cf55a84a..8eaf1d9d 100644 --- a/lib/kofficeui/tkcoloractions.cpp +++ b/lib/kofficeui/tkcoloractions.cpp @@ -240,7 +240,7 @@ void TTDESelectColorAction::selectColorDialog() if ( d->defaultColorMenu ) { - if ( KColorDialog::getColor(c,d->defaultColor, TQT_TQWIDGET(tqApp->activeWindow())) == TQDialog::Accepted ) + if ( KColorDialog::getColor(c,d->defaultColor, tqApp->activeWindow()) == TQDialog::Accepted ) { setCurrentColor(c); m_pRecentColor->insertColor(m_pCurrentColor); @@ -250,7 +250,7 @@ void TTDESelectColorAction::selectColorDialog() } else { - if ( KColorDialog::getColor(c, TQT_TQWIDGET(tqApp->activeWindow())) == TQDialog::Accepted ) + if ( KColorDialog::getColor(c, tqApp->activeWindow()) == TQDialog::Accepted ) { setCurrentColor(c); m_pRecentColor->insertColor(m_pCurrentColor); diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp index ddd23539..8dfb6e8b 100644 --- a/lib/koproperty/editor.cpp +++ b/lib/koproperty/editor.cpp @@ -590,7 +590,7 @@ Editor::slotClicked(TQListViewItem *it) if (d->currentWidget) { if (d->currentWidget->visibleFlag()) { d->currentWidget->show(); - if (hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(kapp->focusWidget()) )) + if (hasParent( this, kapp->focusWidget() )) d->currentWidget->setFocus(); } } diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp index 81f0c1cb..3a53d9a0 100644 --- a/lib/koproperty/editors/spinbox.cpp +++ b/lib/koproperty/editors/spinbox.cpp @@ -40,7 +40,7 @@ IntSpinBox::IntSpinBox(int lower, int upper, int step, int value, int base, IntE installEventFilter(editor()); installEventFilter(this); TQObjectList *spinwidgets = queryList( "TQSpinWidget", 0, false, true ); - TQSpinWidget* spin = static_cast(TQT_TQWIDGET(spinwidgets->first())); + TQSpinWidget* spin = static_cast(spinwidgets->first()); if (spin) spin->installEventFilter(this); delete spinwidgets; @@ -155,7 +155,7 @@ void IntEdit::updateSpinWidgets() { TQObjectList *spinwidgets = queryList( "TQSpinWidget", 0, false, true ); - TQSpinWidget* spin = static_cast(TQT_TQWIDGET(spinwidgets->first())); + TQSpinWidget* spin = static_cast(spinwidgets->first()); if (spin) { spin->setUpEnabled(!isReadOnly()); spin->setDownEnabled(!isReadOnly()); @@ -183,7 +183,7 @@ DoubleSpinBox::DoubleSpinBox (double lower, double upper, double step, double va installEventFilter(editor()); installEventFilter(this); TQObjectList *spinwidgets = queryList( "TQSpinWidget", 0, false, true ); - TQSpinWidget* spin = static_cast(TQT_TQWIDGET(spinwidgets->first())); + TQSpinWidget* spin = static_cast(spinwidgets->first()); if (spin) spin->installEventFilter(this); delete spinwidgets; @@ -308,7 +308,7 @@ void DoubleEdit::updateSpinWidgets() { TQObjectList *spinwidgets = queryList( "TQSpinWidget", 0, false, true ); - TQSpinWidget* spin = static_cast(TQT_TQWIDGET(spinwidgets->first())); + TQSpinWidget* spin = static_cast(spinwidgets->first()); if (spin) { spin->setUpEnabled(!isReadOnly()); spin->setDownEnabled(!isReadOnly()); diff --git a/lib/koproperty/test/test.cpp b/lib/koproperty/test/test.cpp index 23bb80f7..b5d9cae5 100644 --- a/lib/koproperty/test/test.cpp +++ b/lib/koproperty/test/test.cpp @@ -50,7 +50,7 @@ Test::Test() /* First, create the Set which will hold the properties. */ Property *p = 0; - m_set = new Set(TQT_TQOBJECT(this), "test"); + m_set = new Set(this, "test"); m_set->setReadOnly(readOnly); TQCString group; if (!flat) { -- cgit v1.2.1