From 52a5c48dfef0d212ffc34524efbbe4bf87034cfb Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 7 Mar 2026 23:17:53 +0900 Subject: Remove use of KDE_IS_VERSION Signed-off-by: Michele Calgaro --- kig/kig/kig.cpp | 34 ---------------------------------- kig/kig/kig.h | 18 ------------------ kig/kig/kig_part.cpp | 13 ------------- kig/misc/common.cpp | 15 --------------- kig/misc/common.h | 8 -------- kig/misc/coordinate_system.cpp | 4 ---- kig/modes/popup.cpp | 8 -------- kstars/kstars/ksnewstuff.cpp | 4 ---- kstars/kstars/kstarsactions.cpp | 5 ----- kstars/kstars/kswizard.cpp | 10 ---------- kstars/kstars/thumbnailpicker.cpp | 4 ---- 11 files changed, 123 deletions(-) diff --git a/kig/kig/kig.cpp b/kig/kig/kig.cpp index 4dd41cc3..88d6b88d 100644 --- a/kig/kig/kig.cpp +++ b/kig/kig/kig.cpp @@ -109,25 +109,15 @@ void Kig::setupActions() KStdAction::open(this, TQ_SLOT(fileOpen()), actionCollection()); KStdAction::quit(this, TQ_SLOT(close()), actionCollection()); -#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES - m_toolbarAction = KStdAction::showToolbar(this, TQ_SLOT(optionsShowToolbar()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(this, TQ_SLOT(optionsShowStatusbar()), actionCollection()); -#else createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); -#endif // FIXME: this (recent files) should be app-wide, not specific to each window... m_recentFilesAction = KStdAction::openRecent(this, TQ_SLOT(openURL(const KURL&)), actionCollection()); m_recentFilesAction->loadEntries(config); -#if KDE_IS_VERSION( 3, 2, 90 ) KStdAction::keyBindings( guiFactory(), TQ_SLOT( configureShortcuts() ), actionCollection() ); -#else - KStdAction::keyBindings(this, TQ_SLOT(optionsConfigureKeys()), actionCollection()); -#endif KStdAction::configureToolbars(this, TQ_SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::tipOfDay( this, TQ_SLOT( tipOfDay() ), actionCollection(), "help_tipofday" ); } @@ -187,14 +177,7 @@ void Kig::openURL(const KURL& url) void Kig::optionsConfigureKeys() { -#if KDE_IS_VERSION( 3, 2, 90 ) assert( false ); -#else - KKeyDialog dlg( true, this ); - dlg.insert( actionCollection() ); - dlg.insert( m_part->actionCollection() ); - (void) dlg.configure( true ); -#endif } void Kig::optionsConfigureToolbars() @@ -272,32 +255,15 @@ void Kig::fileOpen() if (!file_name.isEmpty()) openURL(file_name); } -// ifdef's disabled, cause TQt moc doesn't handle ifdef's.. -// #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES void Kig::optionsShowToolbar() { -#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES - if (m_toolbarAction->isChecked()) - toolBar()->show(); - else - toolBar()->hide(); -#else assert( false ); -#endif } void Kig::optionsShowStatusbar() { -#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES - if (m_statusbarAction->isChecked()) - statusBar()->show(); - else - statusBar()->hide(); -#else assert( false ); -#endif } -// #endif void Kig::tipOfDay() { KTipDialog::showTip( "kig/tips", true ); diff --git a/kig/kig/kig.h b/kig/kig/kig.h index d6681570..f0d84124 100644 --- a/kig/kig/kig.h +++ b/kig/kig/kig.h @@ -23,18 +23,6 @@ #include #endif -#include - -#ifdef KDE_IS_VERSION -#if KDE_IS_VERSION( 3, 1, 90 ) -#undef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES -#else -#define KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES -#endif -#else -#define KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES -#endif - #include #include #include @@ -116,13 +104,9 @@ class Kig : public KParts::MainWindow void fileNew(); void fileOpen(); // TQt moc doesn't handle ifdef's, so i'm disabling it.. -// #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES void optionsShowToolbar(); void optionsShowStatusbar(); -// #endif -// #if KDE_IS_VERSION( 3, 2, 90 ) void optionsConfigureKeys(); -// #endif void optionsConfigureToolbars(); void applyNewToolbarConfig(); @@ -135,10 +119,8 @@ class Kig : public KParts::MainWindow KParts::ReadWritePart *m_part; -//#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES TDEToggleAction *m_toolbarAction; TDEToggleAction *m_statusbarAction; -//#endif TDERecentFilesAction *m_recentFilesAction; TDEConfig* config; diff --git a/kig/kig/kig_part.cpp b/kig/kig/kig_part.cpp index be58e391..c5b59b8d 100644 --- a/kig/kig/kig_part.cpp +++ b/kig/kig/kig_part.cpp @@ -275,20 +275,7 @@ void KigPart::setupActions() a->setToolTip( i18n( "Recenter the screen on the document" ) ); a->setWhatsThis( i18n( "Recenter the screen on the document" ) ); -#ifdef KDE_IS_VERSION -#if KDE_IS_VERSION(3,1,90) -#define KIG_PART_CPP_STD_FULLSCREEN_ACTION -#endif -#endif -#ifdef KIG_PART_CPP_STD_FULLSCREEN_ACTION a = KStdAction::fullScreen( m_widget, TQ_SLOT( toggleFullScreen() ), actionCollection(), (TQWidget*)(widget()->parent()),"fullscreen" ); -#else - tmp = l->loadIcon( "view-fullscreen", TDEIcon::Toolbar ); - a = new TDEAction( - i18n( "Full Screen" ), tmp, CTRL+SHIFT+Key_F, - m_widget, TQ_SLOT( toggleFullScreen() ), - actionCollection(), "fullscreen" ); -#endif a->setToolTip( i18n( "View this document full-screen." ) ); a->setWhatsThis( i18n( "View this document full-screen." ) ); diff --git a/kig/misc/common.cpp b/kig/misc/common.cpp index 5e82d564..9553b14f 100644 --- a/kig/misc/common.cpp +++ b/kig/misc/common.cpp @@ -28,11 +28,7 @@ #include #include #include -#if KDE_IS_VERSION( 3, 1, 90 ) #include -#else -#include -#endif Coordinate calcPointOnPerpend( const LineData& l, const Coordinate& t ) { @@ -349,21 +345,10 @@ Coordinate calcCircleRadicalStartPoint( const Coordinate& ca, const Coordinate& double getDoubleFromUser( const TQString& caption, const TQString& label, double value, TQWidget* parent, bool* ok, double min, double max, int decimals ) { -#ifdef KIG_USE_KDOUBLEVALIDATOR KDoubleValidator vtor( min, max, decimals, 0, 0 ); -#else - KFloatValidator vtor( min, max, (TQWidget*) 0, 0 ); -#endif -#if KDE_IS_VERSION( 3, 1, 90 ) TQString input = KInputDialog::getText( caption, label, TDEGlobal::locale()->formatNumber( value, decimals ), ok, parent, "getDoubleFromUserDialog", &vtor ); -#else - TQString input = - KLineEditDlg::getText( caption, label, - TDEGlobal::locale()->formatNumber( value, decimals ), - ok, parent, &vtor ); -#endif bool myok = true; double ret = TDEGlobal::locale()->readNumber( input, &myok ); diff --git a/kig/misc/common.h b/kig/misc/common.h index e06bccef..b3a2fc06 100644 --- a/kig/misc/common.h +++ b/kig/misc/common.h @@ -31,15 +31,7 @@ #include #include -#ifdef KDE_IS_VERSION -#if KDE_IS_VERSION( 3, 1, 0 ) #define KIG_USE_KDOUBLEVALIDATOR -#else -#undef KIG_USE_KDOUBLEVALIDATOR -#endif -#else -#undef KIG_USE_KDOUBLEVALIDATOR -#endif class ObjectImp; class KigWidget; diff --git a/kig/misc/coordinate_system.cpp b/kig/misc/coordinate_system.cpp index 194a008f..bdd3f1da 100644 --- a/kig/misc/coordinate_system.cpp +++ b/kig/misc/coordinate_system.cpp @@ -43,11 +43,7 @@ class CoordinateValidator : public TQValidator { bool mpolar; -#ifdef KIG_USE_KDOUBLEVALIDATOR KDoubleValidator mdv; -#else - KFloatValidator mdv; -#endif mutable TQRegExp mre; public: CoordinateValidator( bool polar ); diff --git a/kig/modes/popup.cpp b/kig/modes/popup.cpp index 0a7e0265..21ba7626 100644 --- a/kig/modes/popup.cpp +++ b/kig/modes/popup.cpp @@ -57,11 +57,7 @@ #include #include #include -#if KDE_IS_VERSION( 3, 1, 90 ) #include -#else -#include -#endif #include @@ -540,11 +536,7 @@ bool NameObjectActionsProvider::executeAction( TQRegExpValidator* rev = new TQRegExpValidator( re, &doc ); TQString caption = i18n( "Set Object Name" ); TQString label = i18n( "Set Name of this Object:" ); -#if KDE_IS_VERSION( 3, 1, 90 ) name = KInputDialog::getText( caption, label, name, &ok, &w, 0, rev ); -#else - name = KLineEditDlg::getText( caption, label, name, &ok, &w, rev ); -#endif if ( ok ) { bool justadded = false; diff --git a/kstars/kstars/ksnewstuff.cpp b/kstars/kstars/ksnewstuff.cpp index f0163440..effa90d6 100644 --- a/kstars/kstars/ksnewstuff.cpp +++ b/kstars/kstars/ksnewstuff.cpp @@ -15,9 +15,6 @@ * * ***************************************************************************/ -#include -#if KDE_IS_VERSION( 3, 2, 90 ) - #include #include #include @@ -170,4 +167,3 @@ void KSNewStuff::slotProcessEvents() { tdeApp->processEvents( 500 ); } #include "ksnewstuff.moc" -#endif // KDE >= 3.2.90 diff --git a/kstars/kstars/kstarsactions.cpp b/kstars/kstars/kstarsactions.cpp index 0f2288d6..aaa3a569 100644 --- a/kstars/kstars/kstarsactions.cpp +++ b/kstars/kstars/kstarsactions.cpp @@ -81,10 +81,7 @@ #include "telescopewizardprocess.h" #include "telescopeprop.h" #include "fitsviewer.h" - -#if ( KDE_IS_VERSION( 3, 2, 90 ) ) #include "ksnewstuff.h" -#endif // KDE >= 3.2.90 #include "imagesequence.h" //This file contains function definitions for Actions declared in kstars.h @@ -173,10 +170,8 @@ void KStars::slotWizard() { } void KStars::slotDownload() { -#if ( KDE_IS_VERSION( 3, 2, 90 ) ) if (!kns) kns = new KSNewStuff( this ); kns->download(); -#endif //KDE >= 3.2.90 } void KStars::slotLCGenerator() { diff --git a/kstars/kstars/kswizard.cpp b/kstars/kstars/kswizard.cpp index ff8015dc..9d7d6356 100644 --- a/kstars/kstars/kswizard.cpp +++ b/kstars/kstars/kswizard.cpp @@ -40,11 +40,6 @@ KSWizard::KSWizard( TQWidget *parent, const char *name ) //Removing telescope page for now... removePage( page(2) ); - //Remove Download page if KDE < 3.2.90 - #if ( ! KDE_IS_VERSION( 3, 2, 90 ) ) - removePage( page(3) ); - #endif - //each page should have a finish button for ( unsigned int i=0; i<((unsigned int) pageCount()); ++i ) { setFinishEnabled( page(i), true ); @@ -76,14 +71,11 @@ KSWizard::KSWizard( TQWidget *parent, const char *name ) // } // Banner3->setPixmap( im ); - //Only load the download page banner if KDE >= 3.2.90 - #if ( KDE_IS_VERSION( 3, 2, 90 ) ) if ( KSUtils::openDataFile( imFile, "wzdownload.png" ) ) { imFile.close(); //Just need the filename... im.load( imFile.name() ); } Banner4->setPixmap( im ); - #endif //connect signals/slots connect( CityListBox, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( slotChangeCity() ) ); @@ -92,9 +84,7 @@ KSWizard::KSWizard( TQWidget *parent, const char *name ) connect( CountryFilter, TQ_SIGNAL( textChanged( const TQString & ) ), this, TQ_SLOT( slotFilterCities() ) ); //Uncomment if we ever need the telescope page... // connect( TelescopeWizardButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotTelescopeSetup() ) ); - #if ( KDE_IS_VERSION( 3, 2, 90 ) ) connect( DownloadButton, TQ_SIGNAL( clicked() ), ksw, TQ_SLOT( slotDownload() ) ); - #endif //Initialize Geographic Location page filteredCityList.setAutoDelete( false ); diff --git a/kstars/kstars/thumbnailpicker.cpp b/kstars/kstars/thumbnailpicker.cpp index 229052dc..4b7fd3f5 100644 --- a/kstars/kstars/thumbnailpicker.cpp +++ b/kstars/kstars/thumbnailpicker.cpp @@ -112,9 +112,7 @@ void ThumbnailPicker::slotFillList() { TQFile *tmpFile = ktf.file(); ktf.unlink(); //just need filename JobList.append( TDEIO::copy( u, KURL( tmpFile->name() ), false ) ); //false = no progress window -#if KDE_IS_VERSION( 3, 3, 90 ) ((TDEIO::CopyJob*)JobList.current())->setInteractive( false ); // suppress error dialogs -#endif connect (JobList.current(), TQ_SIGNAL (result(TDEIO::Job *)), TQ_SLOT (downloadReady (TDEIO::Job *))); } @@ -340,9 +338,7 @@ void ThumbnailPicker::slotSetFromURL() { TQFile *tmpFile = ktf.file(); ktf.unlink(); //just need filename JobList.append( TDEIO::copy( u, KURL( tmpFile->name() ), false ) ); //false = no progress window -#if KDE_IS_VERSION( 3, 3, 90 ) ((TDEIO::CopyJob*)JobList.current())->setInteractive( false ); // suppress error dialogs -#endif connect (JobList.current(), TQ_SIGNAL (result(TDEIO::Job *)), TQ_SLOT (downloadReady (TDEIO::Job *))); // -- cgit v1.2.3