From d3656a49e67074e23e8df5daef0f585199b0a8da Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 14 Jan 2024 13:10:18 +0900 Subject: Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines Signed-off-by: Michele Calgaro (cherry picked from commit b0c86264e0cd10a0d3a47de3b05be453d9417bcd) --- kompare/komparepart/kompare_part.cpp | 116 +++++++++++------------ kompare/komparepart/kompareconnectwidget.cpp | 4 +- kompare/komparepart/komparelistview.cpp | 10 +- kompare/komparepart/komparesaveoptionswidget.cpp | 34 +++---- kompare/komparepart/komparesplitter.cpp | 20 ++-- 5 files changed, 92 insertions(+), 92 deletions(-) (limited to 'kompare/komparepart') diff --git a/kompare/komparepart/kompare_part.cpp b/kompare/komparepart/kompare_part.cpp index 7cc62ef8..bffcc72a 100644 --- a/kompare/komparepart/kompare_part.cpp +++ b/kompare/komparepart/kompare_part.cpp @@ -76,64 +76,64 @@ KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName, // This creates the "Model creator" and connects the signals and slots m_modelList = new Diff2::KompareModelList( m_diffSettings, m_info, this, "komparemodellist" ); - connect( m_modelList, TQT_SIGNAL(status( Kompare::Status )), - this, TQT_SLOT(slotSetStatus( Kompare::Status )) ); - connect( m_modelList, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )), - this, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) ); - connect( m_modelList, TQT_SIGNAL(error( TQString )), - this, TQT_SLOT(slotShowError( TQString )) ); - connect( m_modelList, TQT_SIGNAL(applyAllDifferences( bool )), - this, TQT_SLOT(updateActions()) ); - connect( m_modelList, TQT_SIGNAL(applyDifference( bool )), - this, TQT_SLOT(updateActions()) ); - connect( m_modelList, TQT_SIGNAL(applyAllDifferences( bool )), - this, TQT_SIGNAL(appliedChanged()) ); - connect( m_modelList, TQT_SIGNAL(applyDifference( bool )), - this, TQT_SIGNAL(appliedChanged()) ); - - connect( m_modelList, TQT_SIGNAL( setModified( bool ) ), - this, TQT_SLOT( slotSetModified( bool ) ) ); + connect( m_modelList, TQ_SIGNAL(status( Kompare::Status )), + this, TQ_SLOT(slotSetStatus( Kompare::Status )) ); + connect( m_modelList, TQ_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )), + this, TQ_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) ); + connect( m_modelList, TQ_SIGNAL(error( TQString )), + this, TQ_SLOT(slotShowError( TQString )) ); + connect( m_modelList, TQ_SIGNAL(applyAllDifferences( bool )), + this, TQ_SLOT(updateActions()) ); + connect( m_modelList, TQ_SIGNAL(applyDifference( bool )), + this, TQ_SLOT(updateActions()) ); + connect( m_modelList, TQ_SIGNAL(applyAllDifferences( bool )), + this, TQ_SIGNAL(appliedChanged()) ); + connect( m_modelList, TQ_SIGNAL(applyDifference( bool )), + this, TQ_SIGNAL(appliedChanged()) ); + + connect( m_modelList, TQ_SIGNAL( setModified( bool ) ), + this, TQ_SLOT( slotSetModified( bool ) ) ); // This is the stuff to connect the "interface" of the kompare part to the model inside - connect( m_modelList, TQT_SIGNAL(modelsChanged(const Diff2::DiffModelList*)), - this, TQT_SIGNAL(modelsChanged(const Diff2::DiffModelList*)) ); - - connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)), - this, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)) ); - connect( this, TQT_SIGNAL(selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)), - m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)) ); - - connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::Difference*)), - this, TQT_SIGNAL(setSelection(const Diff2::Difference*)) ); - connect( this, TQT_SIGNAL(selectionChanged(const Diff2::Difference*)), - m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*)) ); - - connect( m_modelList, TQT_SIGNAL(applyDifference(bool)), - this, TQT_SIGNAL(applyDifference(bool)) ); - connect( m_modelList, TQT_SIGNAL(applyAllDifferences(bool)), - this, TQT_SIGNAL(applyAllDifferences(bool)) ); - connect( m_modelList, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)), - this, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)) ); + connect( m_modelList, TQ_SIGNAL(modelsChanged(const Diff2::DiffModelList*)), + this, TQ_SIGNAL(modelsChanged(const Diff2::DiffModelList*)) ); + + connect( m_modelList, TQ_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)), + this, TQ_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)) ); + connect( this, TQ_SIGNAL(selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)), + m_modelList, TQ_SLOT(slotSelectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)) ); + + connect( m_modelList, TQ_SIGNAL(setSelection(const Diff2::Difference*)), + this, TQ_SIGNAL(setSelection(const Diff2::Difference*)) ); + connect( this, TQ_SIGNAL(selectionChanged(const Diff2::Difference*)), + m_modelList, TQ_SLOT(slotSelectionChanged(const Diff2::Difference*)) ); + + connect( m_modelList, TQ_SIGNAL(applyDifference(bool)), + this, TQ_SIGNAL(applyDifference(bool)) ); + connect( m_modelList, TQ_SIGNAL(applyAllDifferences(bool)), + this, TQ_SIGNAL(applyAllDifferences(bool)) ); + connect( m_modelList, TQ_SIGNAL(applyDifference(const Diff2::Difference*, bool)), + this, TQ_SIGNAL(applyDifference(const Diff2::Difference*, bool)) ); // This creates the splitterwidget and connects the signals and slots m_splitter = new KompareSplitter ( m_viewSettings, parentWidget, widgetName ); - connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)), - m_splitter, TQT_SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) ); -// connect( m_splitter, TQT_SIGNAL(selectionChanged(const Diff2::Difference*, const Diff2::Difference*)), -// m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*, const Diff2::Difference*)) ); - connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::Difference*)), - m_splitter, TQT_SLOT(slotSetSelection(const Diff2::Difference*)) ); - connect( m_splitter, TQT_SIGNAL(selectionChanged(const Diff2::Difference*)), - m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*)) ); - - connect( m_modelList, TQT_SIGNAL(applyDifference(bool)), - m_splitter, TQT_SLOT(slotApplyDifference(bool)) ); - connect( m_modelList, TQT_SIGNAL(applyAllDifferences(bool)), - m_splitter, TQT_SLOT(slotApplyAllDifferences(bool)) ); - connect( m_modelList, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)), - m_splitter, TQT_SLOT(slotApplyDifference(const Diff2::Difference*, bool)) ); - connect( this, TQT_SIGNAL(configChanged()), m_splitter, TQT_SIGNAL(configChanged()) ); + connect( m_modelList, TQ_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)), + m_splitter, TQ_SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) ); +// connect( m_splitter, TQ_SIGNAL(selectionChanged(const Diff2::Difference*, const Diff2::Difference*)), +// m_modelList, TQ_SLOT(slotSelectionChanged(const Diff2::Difference*, const Diff2::Difference*)) ); + connect( m_modelList, TQ_SIGNAL(setSelection(const Diff2::Difference*)), + m_splitter, TQ_SLOT(slotSetSelection(const Diff2::Difference*)) ); + connect( m_splitter, TQ_SIGNAL(selectionChanged(const Diff2::Difference*)), + m_modelList, TQ_SLOT(slotSelectionChanged(const Diff2::Difference*)) ); + + connect( m_modelList, TQ_SIGNAL(applyDifference(bool)), + m_splitter, TQ_SLOT(slotApplyDifference(bool)) ); + connect( m_modelList, TQ_SIGNAL(applyAllDifferences(bool)), + m_splitter, TQ_SLOT(slotApplyAllDifferences(bool)) ); + connect( m_modelList, TQ_SIGNAL(applyDifference(const Diff2::Difference*, bool)), + m_splitter, TQ_SLOT(slotApplyDifference(const Diff2::Difference*, bool)) ); + connect( this, TQ_SIGNAL(configChanged()), m_splitter, TQ_SIGNAL(configChanged()) ); // notify the part that this is our internal widget setWidget( m_splitter->parentWidget() ); @@ -163,19 +163,19 @@ void KomparePart::setupActions() // create our actions m_saveAll = new TDEAction( i18n("Save &All"), "save_all", 0, - this, TQT_SLOT(saveAll()), + this, TQ_SLOT(saveAll()), actionCollection(), "file_save_all" ); m_saveDiff = new TDEAction( i18n("Save .&diff..."), 0, - this, TQT_SLOT(saveDiff()), + this, TQ_SLOT(saveDiff()), actionCollection(), "file_save_diff" ); m_swap = new TDEAction( i18n( "Swap Source with Destination" ), 0, - this, TQT_SLOT(slotSwap()), + this, TQ_SLOT(slotSwap()), actionCollection(), "file_swap" ); m_diffStats = new TDEAction( i18n( "Show Statistics" ), 0, - this, TQT_SLOT(slotShowDiffstats()), + this, TQ_SLOT(slotShowDiffstats()), actionCollection(), "file_diffstats" ); - KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); + KStdAction::preferences(this, TQ_SLOT(optionsPreferences()), actionCollection()); } void KomparePart::updateActions() @@ -742,7 +742,7 @@ void KomparePart::optionsPreferences() // show preferences KomparePrefDlg* pref = new KomparePrefDlg( m_viewSettings, m_diffSettings ); - connect( pref, TQT_SIGNAL(applyClicked()), this, TQT_SIGNAL(configChanged()) ); + connect( pref, TQ_SIGNAL(applyClicked()), this, TQ_SIGNAL(configChanged()) ); if ( pref->exec() ) emit configChanged(); diff --git a/kompare/komparepart/kompareconnectwidget.cpp b/kompare/komparepart/kompareconnectwidget.cpp index 35b40f2e..b15849e4 100644 --- a/kompare/komparepart/kompareconnectwidget.cpp +++ b/kompare/komparepart/kompareconnectwidget.cpp @@ -109,7 +109,7 @@ KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListVi m_selectedModel( 0 ), m_selectedDifference( 0 ) { -// connect( m_settings, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotDelayedRepaint() ) ); +// connect( m_settings, TQ_SIGNAL( settingsChanged() ), this, TQ_SLOT( slotDelayedRepaint() ) ); setBackgroundMode( NoBackground ); setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) ); setFocusProxy( parent->parentWidget() ); @@ -139,7 +139,7 @@ void KompareConnectWidget::slotSetSelection( const DiffModel* model, const Diffe void KompareConnectWidget::slotDelayedRepaint() { - TQTimer::singleShot( 0, this, TQT_SLOT( repaint() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( repaint() ) ); } void KompareConnectWidget::slotSetSelection( const Difference* diff ) diff --git a/kompare/komparepart/komparelistview.cpp b/kompare/komparepart/komparelistview.cpp index 63ac3787..cf40b8e5 100644 --- a/kompare/komparepart/komparelistview.cpp +++ b/kompare/komparepart/komparelistview.cpp @@ -68,12 +68,12 @@ KompareListViewFrame::KompareListViewFrame( bool isSource, m_layout.addWidget(bottomLine); m_layout.addWidget(&m_view); - connect( &m_view, TQT_SIGNAL(differenceClicked(const Diff2::Difference*)), - parent, TQT_SLOT(slotDifferenceClicked(const Diff2::Difference*)) ); + connect( &m_view, TQ_SIGNAL(differenceClicked(const Diff2::Difference*)), + parent, TQ_SLOT(slotDifferenceClicked(const Diff2::Difference*)) ); - connect( parent, TQT_SIGNAL(scrollViewsToId(int)), &m_view, TQT_SLOT(scrollToId(int)) ); - connect( parent, TQT_SIGNAL(setXOffset(int)), &m_view, TQT_SLOT(setXOffset(int)) ); - connect( &m_view, TQT_SIGNAL(resized()), parent, TQT_SLOT(slotUpdateScrollBars()) ); + connect( parent, TQ_SIGNAL(scrollViewsToId(int)), &m_view, TQ_SLOT(scrollToId(int)) ); + connect( parent, TQ_SIGNAL(setXOffset(int)), &m_view, TQ_SLOT(setXOffset(int)) ); + connect( &m_view, TQ_SIGNAL(resized()), parent, TQ_SLOT(slotUpdateScrollBars()) ); } void KompareListViewFrame::slotSetModel( const DiffModel* model ) diff --git a/kompare/komparepart/komparesaveoptionswidget.cpp b/kompare/komparepart/komparesaveoptionswidget.cpp index 95a641cb..84d2ba51 100644 --- a/kompare/komparepart/komparesaveoptionswidget.cpp +++ b/kompare/komparepart/komparesaveoptionswidget.cpp @@ -58,23 +58,23 @@ KompareSaveOptionsWidget::KompareSaveOptionsWidget( TQString source, TQString de m_directoryRequester->setURL( root.url() ); } - connect( m_SmallerChangesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_LargeFilesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_IgnoreCaseCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_ExpandTabsCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_IgnoreEmptyLinesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_IgnoreWhiteSpaceCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_FunctionNamesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_RecursiveCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_NewFilesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_ContextRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_EdRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_NormalRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_RCSRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_UnifiedRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_SideBySideRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) ); - connect( m_ContextLinesSB, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateCommandLine()) ); - connect( m_directoryRequester, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(updateCommandLine()) ); + connect( m_SmallerChangesCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_LargeFilesCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_IgnoreCaseCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_ExpandTabsCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_IgnoreEmptyLinesCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_IgnoreWhiteSpaceCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_FunctionNamesCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_RecursiveCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_NewFilesCB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_ContextRB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_EdRB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_NormalRB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_RCSRB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_UnifiedRB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_SideBySideRB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(updateCommandLine()) ); + connect( m_ContextLinesSB, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(updateCommandLine()) ); + connect( m_directoryRequester, TQ_SIGNAL(textChanged(const TQString&)), TQ_SLOT(updateCommandLine()) ); loadOptions(); } diff --git a/kompare/komparepart/komparesplitter.cpp b/kompare/komparepart/komparesplitter.cpp index 6300837e..64f3d518 100644 --- a/kompare/komparepart/komparesplitter.cpp +++ b/kompare/komparepart/komparesplitter.cpp @@ -66,19 +66,19 @@ KompareSplitter::KompareSplitter( ViewSettings *settings, TQWidget * parent, setOpaqueResize( true ); setFocusPolicy( TQWidget::WheelFocus ); - connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotConfigChanged()) ); - connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedRepaintHandles()) ); - connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedUpdateScrollBars()) ); + connect( this, TQ_SIGNAL(configChanged()), TQ_SLOT(slotConfigChanged()) ); + connect( this, TQ_SIGNAL(configChanged()), TQ_SLOT(slotDelayedRepaintHandles()) ); + connect( this, TQ_SIGNAL(configChanged()), TQ_SLOT(slotDelayedUpdateScrollBars()) ); // scrolling - connect( m_vScroll, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollToId(int)) ); - connect( m_vScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(scrollToId(int)) ); - connect( m_hScroll, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(setXOffset(int)) ); - connect( m_hScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SIGNAL(setXOffset(int)) ); + connect( m_vScroll, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(scrollToId(int)) ); + connect( m_vScroll, TQ_SIGNAL(sliderMoved(int)), TQ_SLOT(scrollToId(int)) ); + connect( m_hScroll, TQ_SIGNAL(valueChanged(int)), TQ_SIGNAL(setXOffset(int)) ); + connect( m_hScroll, TQ_SIGNAL(sliderMoved(int)), TQ_SIGNAL(setXOffset(int)) ); m_scrollTimer=new TQTimer(); restartTimer = false; - connect (m_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(timerTimeout()) ); + connect (m_scrollTimer, TQ_SIGNAL(timeout()), TQ_SLOT(timerTimeout()) ); // we need to receive childEvents now so that d->list is ready for when // slotSetSelection(...) arrives @@ -502,7 +502,7 @@ void KompareSplitter::scrollToId( int id ) void KompareSplitter::slotDelayedUpdateScrollBars() { - TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateScrollBars() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( slotUpdateScrollBars() ) ); } void KompareSplitter::slotUpdateScrollBars() @@ -543,7 +543,7 @@ void KompareSplitter::slotUpdateScrollBars() void KompareSplitter::slotDelayedUpdateVScrollValue() { - TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateVScrollValue() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( slotUpdateVScrollValue() ) ); } void KompareSplitter::slotUpdateVScrollValue() -- cgit v1.2.1