From fb4d5c737b126d337f3b3987d17069e815b96453 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Tue, 7 Mar 2023 14:39:41 +0000 Subject: [PATCH] Removal Of Dead QT_VERSION checks We require Qt6, so no need for these any more. --- DeepSkyStacker/About.cpp | 4 ---- DeepSkyStacker/DarkFrame.cpp | 4 ---- DeepSkyStacker/DeBloom.cpp | 4 ---- DeepSkyStacker/DeepSkyStacker.cpp | 11 ----------- DeepSkyStacker/ImageListModel.cpp | 3 --- DeepSkyStacker/RecommendedSettings.cpp | 4 ---- DeepSkyStacker/RegisterEngine.cpp | 4 ---- DeepSkyStacker/Workspace.cpp | 4 ---- DeepSkyStacker/editstars.cpp | 5 ----- DeepSkyStacker/toolbar.h | 4 ---- 10 files changed, 47 deletions(-) diff --git a/DeepSkyStacker/About.cpp b/DeepSkyStacker/About.cpp index 9caf2d5b..3cc1b634 100644 --- a/DeepSkyStacker/About.cpp +++ b/DeepSkyStacker/About.cpp @@ -253,11 +253,7 @@ void About::storeSettings() // QString translatorFileName = QLatin1String("qt_"); translatorFileName += language; -#if QT_VERSION >= 0x060000 if (theQtTranslator.load(translatorFileName, QLibraryInfo::path(QLibraryInfo::TranslationsPath))) -#else - if (theQtTranslator.load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) -#endif qApp->installTranslator(&theQtTranslator); settings.setValue("InternetCheck", m_InternetCheck); diff --git a/DeepSkyStacker/DarkFrame.cpp b/DeepSkyStacker/DarkFrame.cpp index d7220125..9311b8b7 100644 --- a/DeepSkyStacker/DarkFrame.cpp +++ b/DeepSkyStacker/DarkFrame.cpp @@ -10,10 +10,6 @@ #include "CFABitmapInfo.h" #include "StackingTasks.h" -#if QT_VERSION < 0x060000 -#define _USE_MATH_DEFINES -#endif - using namespace DSS; /* ------------------------------------------------------------------- */ diff --git a/DeepSkyStacker/DeBloom.cpp b/DeepSkyStacker/DeBloom.cpp index bf38f3dc..c391d4f1 100644 --- a/DeepSkyStacker/DeBloom.cpp +++ b/DeepSkyStacker/DeBloom.cpp @@ -6,10 +6,6 @@ #include "BackgroundCalibration.h" #include "Ztrace.h" -#if QT_VERSION < 0x060000 -#define _USE_MATH_DEFINES -#endif - using namespace DSS; #ifdef DSSBETA diff --git a/DeepSkyStacker/DeepSkyStacker.cpp b/DeepSkyStacker/DeepSkyStacker.cpp index e575e3d4..c55c95d3 100644 --- a/DeepSkyStacker/DeepSkyStacker.cpp +++ b/DeepSkyStacker/DeepSkyStacker.cpp @@ -873,12 +873,6 @@ int main(int argc, char* argv[]) // std::signal(SIGTERM, signalHandler); //#endif - // High DPI support -#if QT_VERSION < 0x060000 - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -#endif - //QMfcApp app(&theApp, argc, argv); QApplication app(argc, argv); @@ -936,13 +930,8 @@ int main(int argc, char* argv[]) translatorFileName += language; qDebug() << "qt translator filename: " << translatorFileName; -#if QT_VERSION >= 0x060000 qDebug() << "translationPath " << QLibraryInfo::path(QLibraryInfo::TranslationsPath); if (theQtTranslator.load(translatorFileName, QLibraryInfo::path(QLibraryInfo::TranslationsPath))) -#else - qDebug() << "translationPath " << QLibraryInfo::location(QLibraryInfo::TranslationsPath); - if (theQtTranslator.load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) -#endif { app.installTranslator(&theQtTranslator); } diff --git a/DeepSkyStacker/ImageListModel.cpp b/DeepSkyStacker/ImageListModel.cpp index a99b7f15..3f6545a7 100644 --- a/DeepSkyStacker/ImageListModel.cpp +++ b/DeepSkyStacker/ImageListModel.cpp @@ -38,9 +38,6 @@ namespace DSS { -#if QT_VERSION < 0x060000 - constexpr auto M_PI = 3.14159265358979323846; -#endif // // Initial code based on https://meetingcpp.com/blog/items/an-introduction-into-qt-part-3.html // diff --git a/DeepSkyStacker/RecommendedSettings.cpp b/DeepSkyStacker/RecommendedSettings.cpp index 88392e93..6136b2ff 100644 --- a/DeepSkyStacker/RecommendedSettings.cpp +++ b/DeepSkyStacker/RecommendedSettings.cpp @@ -25,11 +25,7 @@ bool RecommendationItem::differsFromWorkspace() currentValue = workspace.value(keyName); value = setting.value(); -#if QT_VERSION >= 0x060000 switch (static_cast(value.typeId())) -#else - switch (value.type()) -#endif { case QMetaType::Bool: bResult = value.toBool() != currentValue.toBool(); diff --git a/DeepSkyStacker/RegisterEngine.cpp b/DeepSkyStacker/RegisterEngine.cpp index 729595cb..248d1a1b 100644 --- a/DeepSkyStacker/RegisterEngine.cpp +++ b/DeepSkyStacker/RegisterEngine.cpp @@ -17,10 +17,6 @@ #include "TIFFUtil.h" #include "MasterFrames.h" -#if QT_VERSION < 0x060000 -#define _USE_MATH_DEFINES -#endif - /* ------------------------------------------------------------------- */ class CStarAxisInfo diff --git a/DeepSkyStacker/Workspace.cpp b/DeepSkyStacker/Workspace.cpp index 5298ac23..cc4d558e 100644 --- a/DeepSkyStacker/Workspace.cpp +++ b/DeepSkyStacker/Workspace.cpp @@ -415,11 +415,7 @@ bool WorkspaceSettings::ReadFromString(const QString& theString) // We need to convert it to the same type as is currently stored // QVariant variant(value); -#if QT_VERSION < 0x060000 - QVariant::Type type = it->value().type(); -#else QMetaType type = it->value().metaType(); -#endif ZASSERT(variant.canConvert(type)); variant.convert(type); it->setValue(variant); diff --git a/DeepSkyStacker/editstars.cpp b/DeepSkyStacker/editstars.cpp index a39823e9..78a3fa23 100644 --- a/DeepSkyStacker/editstars.cpp +++ b/DeepSkyStacker/editstars.cpp @@ -364,12 +364,7 @@ namespace DSS // // Get the mouse location and convert to image coordinates // -#if QT_VERSION >= 0x060000 QPointF pt{ e->position() }; -#else - QPointF pt{ static_cast(e->x()), - static_cast(e->y()) }; -#endif pt = imageView->screenToImage(pt); if (pt.x() >= 0 && pt.x() < imageView->imageWidth() && diff --git a/DeepSkyStacker/toolbar.h b/DeepSkyStacker/toolbar.h index da37afb0..6d0ac057 100644 --- a/DeepSkyStacker/toolbar.h +++ b/DeepSkyStacker/toolbar.h @@ -70,11 +70,7 @@ namespace DSS } protected: -#if QT_VERSION < 0x060000 - inline void enterEvent([[maybe_unused]] QEvent* e) override -#else inline void enterEvent([[maybe_unused]] QEnterEvent* e) override -#endif { Inherited::enterEvent(e); setOpacity(1.0, true);