From 1a75f32008be8c5bcb3add8055f1db5ae8bd602f Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 17 Dec 2023 20:55:09 +0900 Subject: [PATCH] Replace various '#define' strings - part 6 Signed-off-by: Michele Calgaro --- src/app/mainWindow.cpp | 26 +++++++++++++------------- src/part/part.cpp | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp index 1b35f70..fc855dd 100644 --- a/src/app/mainWindow.cpp +++ b/src/app/mainWindow.cpp @@ -43,7 +43,7 @@ MainWindow::MainWindow() exit( 1 ); //don't use TQApplication::exit() - it causes a crash } - m_part = (Part *)factory->create( TQT_TQOBJECT(this), "part", "KParts::ReadOnlyPart" ); + m_part = (Part *)factory->create( this, "part", "KParts::ReadOnlyPart" ); setCentralWidget( m_part->widget() ); setStandardToolBarMenuEnabled( true ); @@ -82,22 +82,22 @@ MainWindow::setupActions() //singleton function m_combo->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); m_combo->setDuplicatesEnabled( false ); - KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT(slotScanDirectory()), ac, "scan_directory" ); - KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), ac ); - KStdAction::up( TQT_TQOBJECT(this), TQT_SLOT(slotUp()), ac ); - KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(configToolbars()), ac); - KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configKeys()), ac); + KStdAction::open( this, TQT_SLOT(slotScanDirectory()), ac, "scan_directory" ); + KStdAction::quit( this, TQT_SLOT(close()), ac ); + KStdAction::up( this, TQT_SLOT(slotUp()), ac ); + KStdAction::configureToolbars(this, TQT_SLOT(configToolbars()), ac); + KStdAction::keyBindings(this, TQT_SLOT(configKeys()), ac); - new TDEAction( i18n( "Scan &Home Directory" ), "folder_home", CTRL+Key_Home, TQT_TQOBJECT(this), TQT_SLOT(slotScanHomeDirectory()), ac, "scan_home" ); - new TDEAction( i18n( "Scan &Root Directory" ), "folder_red", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScanRootDirectory()), ac, "scan_root" ); - new TDEAction( i18n( "Rescan" ), "reload", TDEStdAccel::reload(), TQT_TQOBJECT(m_part), TQT_SLOT(rescan()), ac, "scan_rescan" ); - new TDEAction( i18n( "Stop" ), "process-stop", TQt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotAbortScan()), ac, "scan_stop" ); - new TDEAction( i18n( "Clear Location Bar" ), TDEApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, TQT_TQOBJECT(m_combo), TQT_SLOT(clearEdit()), ac, "clear_location" ); - new TDEAction( i18n( "Go" ), "key_enter", 0, TQT_TQOBJECT(m_combo), TQT_SIGNAL(returnPressed()), ac, "go" ); + new TDEAction( i18n( "Scan &Home Directory" ), "folder_home", CTRL+Key_Home, this, TQT_SLOT(slotScanHomeDirectory()), ac, "scan_home" ); + new TDEAction( i18n( "Scan &Root Directory" ), "folder_red", 0, this, TQT_SLOT(slotScanRootDirectory()), ac, "scan_root" ); + new TDEAction( i18n( "Rescan" ), "reload", TDEStdAccel::reload(), m_part, TQT_SLOT(rescan()), ac, "scan_rescan" ); + new TDEAction( i18n( "Stop" ), "process-stop", TQt::Key_Escape, this, TQT_SLOT(slotAbortScan()), ac, "scan_stop" ); + new TDEAction( i18n( "Clear Location Bar" ), TDEApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, m_combo, TQT_SLOT(clearEdit()), ac, "clear_location" ); + new TDEAction( i18n( "Go" ), "key_enter", 0, m_combo, TQT_SIGNAL(returnPressed()), ac, "go" ); KWidgetAction *combo = new KWidgetAction( m_combo, i18n( "Location Bar" ), 0, 0, 0, ac, "location_bar" ); m_recentScans = new TDERecentFilesAction( i18n( "&Recent Scans" ), 0, ac, "scan_recent", 8 ); - m_histories = new HistoryCollection( ac, TQT_TQOBJECT(this), "history_collection" ); + m_histories = new HistoryCollection( ac, this, "history_collection" ); ac->action( "scan_directory" )->setText( i18n( "&Scan Directory..." ) ); m_recentScans->loadEntries( TDEGlobal::config() ); diff --git a/src/part/part.cpp b/src/part/part.cpp index ce8a78b..ee020f6 100644 --- a/src/part/part.cpp +++ b/src/part/part.cpp @@ -57,8 +57,8 @@ Part::Part( TQWidget *parentWidget, const char *widgetName, TQObject *parent, co m_map = new RadialMap::Widget( widget() ); m_map->hide(); - KStdAction::zoomIn( TQT_TQOBJECT(m_map), TQT_SLOT(zoomIn()), actionCollection() ); - KStdAction::zoomOut( TQT_TQOBJECT(m_map), TQT_SLOT(zoomOut()), actionCollection() ); + KStdAction::zoomIn( m_map, TQT_SLOT(zoomIn()), actionCollection() ); + KStdAction::zoomOut( m_map, TQT_SLOT(zoomOut()), actionCollection() ); KStdAction::preferences( this, TQT_SLOT(configFilelight()), actionCollection(), "configure_filelight" )->setText( i18n( "Configure Filelight..." ) ); connect( m_map, TQT_SIGNAL(created( const Directory* )), TQT_SIGNAL(completed()) ); @@ -243,7 +243,7 @@ Part::mapChanged( const Directory *tree ) emit setWindowCaption( prettyURL() ); - ProgressBox *progress = static_cast(TQT_TQWIDGET(statusBar()->child( "ProgressBox" ))); + ProgressBox *progress = static_cast(statusBar()->child( "ProgressBox" )); if( progress ) progress->setText( tree->children() );