From 7984ff277bdb263cf0f6cc37eb1fc6d56c3d9eb3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 9 Mar 2026 13:32:26 +0900 Subject: Remove use of KDE_IS_VERSION Signed-off-by: Michele Calgaro --- .../batchprocessimages/renameimageswidget.cpp | 5 ----- kipi-plugins/calendar/calpainter.cpp | 22 ---------------------- kipi-plugins/calendar/calwizard.cpp | 13 ------------- kipi-plugins/calendar/monthwidget.cpp | 11 +---------- kipi-plugins/common/libkipiplugins/kpaboutdata.cpp | 3 --- kipi-plugins/configure.in.in | 5 ----- kipi-plugins/flickrexport/flickrwindow.cpp | 10 ---------- kipi-plugins/galleryexport/galleries.cpp | 5 ----- kipi-plugins/picasawebexport/picasawebwindow.cpp | 9 --------- kipi-plugins/printwizard/frmprintwizard.cpp | 3 --- kipi-plugins/slideshow/slideshow.cpp | 9 --------- kipi-plugins/slideshow/slideshowgl.cpp | 9 --------- kipi-plugins/slideshow/slideshowkb.cpp | 9 --------- kipi-plugins/sync/sink.h | 4 ---- kipi-plugins/sync/sinks.cpp | 5 ----- kipi-plugins/wallpaper/plugin_wallpaper.cpp | 5 ----- 16 files changed, 1 insertion(+), 126 deletions(-) diff --git a/kipi-plugins/batchprocessimages/renameimageswidget.cpp b/kipi-plugins/batchprocessimages/renameimageswidget.cpp index 4e03852..b32dbcf 100644 --- a/kipi-plugins/batchprocessimages/renameimageswidget.cpp +++ b/kipi-plugins/batchprocessimages/renameimageswidget.cpp @@ -58,7 +58,6 @@ extern "C" #include #include #include -#include // Libkipi includes. @@ -83,11 +82,7 @@ RenameImagesWidget::RenameImagesWidget(TQWidget *parent, m_urlList(urlList) { m_listView->setSorting(-1); -#if KDE_IS_VERSION(3,4,0) - // next can be done directly into designer but it seems not to compile - // under kde < 3.4.0 m_listView->setShadeSortColumn( false ); -#endif readSettings(); diff --git a/kipi-plugins/calendar/calpainter.cpp b/kipi-plugins/calendar/calpainter.cpp index 5c816f7..3beafa4 100644 --- a/kipi-plugins/calendar/calpainter.cpp +++ b/kipi-plugins/calendar/calpainter.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -215,13 +214,8 @@ void CalPainter::paint(bool useDeviceMetrics) painter->setFont(f); painter->drawText(rCalHeader, TQt::AlignLeft|TQt::AlignVCenter, TQString::number(year_)); -#if KDE_IS_VERSION(3,2,0) painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter, TDEGlobal::locale()->calendar()->monthName(month_, year_)); -#else - painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter, - TDEGlobal::locale()->monthName(month_)); -#endif painter->restore(); // --------------------------------------------------------------- @@ -249,14 +243,8 @@ void CalPainter::paint(bool useDeviceMetrics) rsmall = r; rsmall.setWidth(r.width() - 2); rsmall.setHeight(r.height() - 2); -#if KDE_IS_VERSION(3,2,0) painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, TDEGlobal::locale()->calendar()->weekDayName(dayname, true)); -#else - painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, - TDEGlobal::locale()->weekDayName(dayname, true)); -#endif - } painter->restore(); @@ -441,13 +429,8 @@ CalBlockPainter::CalBlockPainter(TQObject *parent, int year, int month, painter->setFont(f); painter->drawText(rCalHeader, TQt::AlignLeft|TQt::AlignVCenter, TQString::number(year)); -#if KDE_IS_VERSION(3,2,0) painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter, TDEGlobal::locale()->calendar()->monthName(month, year)); -#else - painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter, - TDEGlobal::locale()->monthName(month)); -#endif painter->restore(); // --------------------------------------------------------------- @@ -475,13 +458,8 @@ CalBlockPainter::CalBlockPainter(TQObject *parent, int year, int month, rsmall = r; rsmall.setWidth(r.width() - 2); rsmall.setHeight(r.height() - 2); -#if KDE_IS_VERSION(3,2,0) painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, TDEGlobal::locale()->calendar()->weekDayName(dayname, true)); -#else - painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom, - TDEGlobal::locale()->weekDayName(dayname, true)); -#endif } painter->restore(); diff --git a/kipi-plugins/calendar/calwizard.cpp b/kipi-plugins/calendar/calwizard.cpp index a02a349..e889037 100644 --- a/kipi-plugins/calendar/calwizard.cpp +++ b/kipi-plugins/calendar/calwizard.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include @@ -198,11 +197,7 @@ void CalWizard::slotPageSelected(const TQString&) TQDate d; TDEGlobal::locale()->calendar()->setYMD(d, cSettings_->getYear(), 1, 1); for (int i=1; i<=TDEGlobal::locale()->calendar()->monthsInYear(d); i++) { -#if KDE_IS_VERSION(3,2,0) month = TDEGlobal::locale()->calendar()->monthName(i, cSettings_->getYear(), false); -#else - month = TDEGlobal::locale()->monthName(i); -#endif image = cSettings_->getImage(i); if (!image.isEmpty()) { monthNumbers_.append(i); @@ -256,9 +251,7 @@ void CalWizard::slotPageSelected(const TQString&) if (!printer_) printer_ = new KPrinter(false); -#if KDE_IS_VERSION(3,2,0) printer_->setUsePrinterResolution(true); -#endif // TODO: Let user choose resolutions //, TQPrinter::HighResolution); @@ -318,15 +311,9 @@ void CalWizard::slotPrintOnePage() TQString yearName = TQString::number(cSettings_->getYear()); -#if KDE_IS_VERSION(3,2,0) wFinishLabel_->setText(i18n("Printing Calendar Page for %1 of %2") .arg(TDEGlobal::locale()->calendar()->monthName(month, cSettings_->getYear(), false)) .arg(yearName)); -#else - wFinishLabel_->setText(i18n("Printing Calendar Page for %1 of %2") - .arg(TDEGlobal::locale()->monthName(month)). - .arg(yearName)); -#endif currPage_++; if (currPage_ != 0) diff --git a/kipi-plugins/calendar/monthwidget.cpp b/kipi-plugins/calendar/monthwidget.cpp index e5a61f4..062dfb6 100644 --- a/kipi-plugins/calendar/monthwidget.cpp +++ b/kipi-plugins/calendar/monthwidget.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include // LibKipi includes. @@ -84,16 +83,8 @@ KURL MonthWidget::imagePath() void MonthWidget::drawContents(TQPainter *p) { - -#if KDE_IS_VERSION(3,2,0) TQString name = TDEGlobal::locale()->calendar()->monthName(month_, CalSettings::instance()->getYear(), true); -#else - TQString name = TDEGlobal::locale()->monthName(month_, true); -#endif - - TQRect cr; - - cr = contentsRect(); + TQRect cr = contentsRect(); cr.setBottom(70); p->drawPixmap(cr.width()/2 - pixmap_->width()/2, cr.height()/2 - pixmap_->height()/2, diff --git a/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp b/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp index 73b0727..590c3ec 100644 --- a/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp +++ b/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include "kpaboutdata.h" #include "pluginsversion.h" @@ -44,7 +43,6 @@ namespace KIPIPlugins pluginDescription, "http://www.kipi-plugins.org") { -#if KDE_IS_VERSION(3,4,0) // setProgramLogo is defined from kde 3.4.0 on TQString directory; TDEGlobal::dirs()->addResourceType("kipi_plugins_logo", TDEGlobal::dirs()->kde_default("data") + "kipi/data"); @@ -52,7 +50,6 @@ namespace KIPIPlugins // set the kipiplugins logo inside the about dialog setProgramLogo(TQImage(directory + "kipi-plugins_logo.png")); -#endif // set the plugin description into long text description setOtherText(pluginDescription); diff --git a/kipi-plugins/configure.in.in b/kipi-plugins/configure.in.in index e93d021..e1be09a 100644 --- a/kipi-plugins/configure.in.in +++ b/kipi-plugins/configure.in.in @@ -32,14 +32,9 @@ CPPFLAGS="$CPPFLAGS $all_includes" AC_MSG_CHECKING([if hidden visibility should be enabled]) AC_COMPILE_IFELSE( [ - #include #include int other_func( void ) { - #if KDE_IS_VERSION(3,3,2) - #else - iam dying; - #endif #ifdef __TDE_HAVE_GCC_VISIBILITY #else no, iam really dead; diff --git a/kipi-plugins/flickrexport/flickrwindow.cpp b/kipi-plugins/flickrexport/flickrwindow.cpp index 4e85595..c20caf6 100644 --- a/kipi-plugins/flickrexport/flickrwindow.cpp +++ b/kipi-plugins/flickrexport/flickrwindow.cpp @@ -48,10 +48,6 @@ #include #include #include -#include -#if KDE_IS_VERSION(3,2,0) -#include -#endif // Libkipi includes. @@ -83,7 +79,6 @@ FlickrWindow::FlickrWindow(KIPI::Interface* interface, const TQString &tmpFolder m_interface = interface; m_uploadCount = 0; m_uploadTotal = 0; -// m_wallet = 0; m_widget = new FlickrWidget(this, interface); m_photoView = m_widget->m_photoView; // m_newAlbumBtn = m_widget->m_newAlbumBtn; @@ -206,11 +201,6 @@ FlickrWindow::FlickrWindow(KIPI::Interface* interface, const TQString &tmpFolder FlickrWindow::~FlickrWindow() { -#if KDE_IS_VERSION(3,2,0) -// if (m_wallet) -// delete m_wallet; -#endif - delete m_progressDlg; delete m_authProgressDlg; delete m_talker; diff --git a/kipi-plugins/galleryexport/galleries.cpp b/kipi-plugins/galleryexport/galleries.cpp index 9658ffa..7bc41aa 100644 --- a/kipi-plugins/galleryexport/galleries.cpp +++ b/kipi-plugins/galleryexport/galleries.cpp @@ -23,10 +23,7 @@ #include #include #include -#include -#if KDE_IS_VERSION(3,2,0) #include -#endif #include "galleries.h" @@ -117,7 +114,6 @@ void Galleries::Load() bln_loaded = true; bool bln_use_wallet = false; -#if KDE_IS_VERSION(3,2,0) mpWallet = TDEWallet::Wallet::openWallet(TDEWallet::Wallet::NetworkWallet(), tdeApp->activeWindow()->winId(), TDEWallet::Wallet::Synchronous); @@ -138,7 +134,6 @@ void Galleries::Load() else bln_use_wallet = true; } -#endif // read config diff --git a/kipi-plugins/picasawebexport/picasawebwindow.cpp b/kipi-plugins/picasawebexport/picasawebwindow.cpp index 6c1a3b0..22e4795 100644 --- a/kipi-plugins/picasawebexport/picasawebwindow.cpp +++ b/kipi-plugins/picasawebexport/picasawebwindow.cpp @@ -52,10 +52,7 @@ #include #include #include -#include -#if KDE_IS_VERSION(3,2,0) #include -#endif // Libkipi includes. @@ -87,7 +84,6 @@ PicasawebWindow::PicasawebWindow(KIPI::Interface* interface, const TQString &tmp m_interface = interface; m_uploadCount = 0; m_uploadTotal = 0; -// m_wallet = 0; m_urls = 0; m_widget = new PicasawebWidget(this); m_tagView = m_widget->m_tagView; @@ -248,11 +244,6 @@ void PicasawebWindow::slotClose() PicasawebWindow::~PicasawebWindow() { -#if KDE_IS_VERSION(3,2,0) - // if (m_wallet) - // delete m_wallet; -#endif - // write config TDESimpleConfig config("kipirc"); config.setGroup("PicasawebExport Settings"); diff --git a/kipi-plugins/printwizard/frmprintwizard.cpp b/kipi-plugins/printwizard/frmprintwizard.cpp index 6ff2963..869181c 100644 --- a/kipi-plugins/printwizard/frmprintwizard.cpp +++ b/kipi-plugins/printwizard/frmprintwizard.cpp @@ -56,7 +56,6 @@ extern "C" #include #include #include -#include #include #include @@ -356,9 +355,7 @@ void FrmPrintWizard::FrmPrintWizardBaseSelected(const TQString &) printer.setMargins (0, 0, 0, 0); } -#if KDE_IS_VERSION(3,2,0) printer.setUsePrinterResolution(true); -#endif if (printer.setup()) printPhotos(m_photos, s->layouts, printer); } diff --git a/kipi-plugins/slideshow/slideshow.cpp b/kipi-plugins/slideshow/slideshow.cpp index a09f403..8c0c493 100644 --- a/kipi-plugins/slideshow/slideshow.cpp +++ b/kipi-plugins/slideshow/slideshow.cpp @@ -45,7 +45,6 @@ // KDE includes. #include -#include #include #include #include @@ -62,19 +61,11 @@ namespace KIPISlideShowPlugin SlideShow::SlideShow(const FileList& fileList, const TQStringList& commentsList, bool ImagesHasComments) : TQWidget(0, 0, WStyle_StaysOnTop | WType_Popup | WX11BypassWM | WDestructiveClose) { -#if KDE_IS_VERSION(3,2,0) TQRect deskRect = TDEGlobalSettings::desktopGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); m_deskHeight = deskRect.height(); -#else - TQRect deskRect = TQApplication::desktop()->screenGeometry(this); - m_deskX = deskRect.x(); - m_deskY = deskRect.y(); - m_deskWidth = deskRect.width(); - m_deskHeight = deskRect.height(); -#endif move(m_deskX, m_deskY); resize(m_deskWidth, m_deskHeight); diff --git a/kipi-plugins/slideshow/slideshowgl.cpp b/kipi-plugins/slideshow/slideshowgl.cpp index 28d900d..9e31d2b 100644 --- a/kipi-plugins/slideshow/slideshowgl.cpp +++ b/kipi-plugins/slideshow/slideshowgl.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -52,19 +51,11 @@ SlideShowGL::SlideShowGL(const TQValueList >& fileList, : TQGLWidget(0, 0, 0, WStyle_StaysOnTop | WType_Popup | WX11BypassWM | WDestructiveClose) { -#if KDE_IS_VERSION(3,2,0) TQRect deskRect = TDEGlobalSettings::desktopGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); m_deskHeight = deskRect.height(); -#else - TQRect deskRect = TQApplication::desktop()->screenGeometry(this); - m_deskX = deskRect.x(); - m_deskY = deskRect.y(); - m_deskWidth = deskRect.width(); - m_deskHeight = deskRect.height(); -#endif move(m_deskX, m_deskY); resize(m_deskWidth, m_deskHeight); diff --git a/kipi-plugins/slideshow/slideshowkb.cpp b/kipi-plugins/slideshow/slideshowkb.cpp index 3904dba..32e524d 100644 --- a/kipi-plugins/slideshow/slideshowkb.cpp +++ b/kipi-plugins/slideshow/slideshowkb.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include // Local includes. @@ -142,19 +141,11 @@ namespace KIPISlideShowPlugin : TQGLWidget(0, 0, 0, WStyle_StaysOnTop | WType_Popup | WX11BypassWM | WDestructiveClose) { - #if KDE_IS_VERSION(3,2,0) TQRect deskRect = TDEGlobalSettings::desktopGeometry(this); m_deskX = deskRect.x(); m_deskY = deskRect.y(); m_deskWidth = deskRect.width(); m_deskHeight = deskRect.height(); - #else - TQRect deskRect = TQApplication::desktop()->screenGeometry(this); - m_deskX = deskRect.x(); - m_deskY = deskRect.y(); - m_deskWidth = deskRect.width(); - m_deskHeight = deskRect.height(); - #endif move(m_deskX, m_deskY); resize(m_deskWidth, m_deskHeight); diff --git a/kipi-plugins/sync/sink.h b/kipi-plugins/sync/sink.h index fd8392b..b75cbbe 100644 --- a/kipi-plugins/sync/sink.h +++ b/kipi-plugins/sync/sink.h @@ -23,10 +23,6 @@ #include "libkipi2/interface.h" #include -#include -#if KDE_IS_VERSION(3,2,0) -#include -#endif namespace KIPI2 { diff --git a/kipi-plugins/sync/sinks.cpp b/kipi-plugins/sync/sinks.cpp index 93f3585..a066990 100644 --- a/kipi-plugins/sync/sinks.cpp +++ b/kipi-plugins/sync/sinks.cpp @@ -23,10 +23,7 @@ #include #include #include -#include -#if KDE_IS_VERSION(3,2,0) #include -#endif #include "sinks.h" #include "sink.h" @@ -59,7 +56,6 @@ Sinks::Sinks() mMaxSinkId(0) { TDEWallet::Wallet* p_wallet = NULL; -#if KDE_IS_VERSION(3,2,0) mpWallet = TDEWallet::Wallet::openWallet(TDEWallet::Wallet::NetworkWallet(), tdeApp->activeWindow()->winId(), TDEWallet::Wallet::Synchronous); @@ -80,7 +76,6 @@ Sinks::Sinks() else p_wallet = mpWallet; } -#endif // Read config TDEConfig config("kipirc"); diff --git a/kipi-plugins/wallpaper/plugin_wallpaper.cpp b/kipi-plugins/wallpaper/plugin_wallpaper.cpp index ce259f3..82ac49c 100644 --- a/kipi-plugins/wallpaper/plugin_wallpaper.cpp +++ b/kipi-plugins/wallpaper/plugin_wallpaper.cpp @@ -31,7 +31,6 @@ #include #include #include - #include #include #include #include @@ -120,16 +119,12 @@ void Plugin_WallPaper::setup( TQWidget* widget ) "images2desktop_centered_auto_fit")); //The Scale & crop code was available from Beta1 on - #if KDE_IS_VERSION(3,3,91) m_action_Background->insert(new TDEAction (i18n("Scale && Crop"), 0, this, TQ_SLOT(slotSetScaleAndCrop()), actionCollection(), "images2desktop_scale_and_crop")); - - #endif - addAction( m_action_Background ); KIPI::Interface* interface = dynamic_cast( parent() ); -- cgit v1.2.3