From 5d343cbe7f45d176aef3b803e8f4faac4753b466 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Jun 2015 23:13:06 +0200 Subject: [PATCH] remove useless qt_version defines --- src/CMakeLists.txt | 8 +------- src/core/utilities.cpp | 4 ---- src/internet/lastfm/lastfmservice.cpp | 7 ------- src/ui/behavioursettingspage.cpp | 2 -- src/ui/iconloader.cpp | 2 -- 5 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5a3151bd5..54faff4f5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,13 +17,7 @@ if(WIN32) endif(WIN32) # Activate fast QString concatenation -if (QT_VERSION_MINOR GREATER 5) - if (QT_VERSION_MINOR GREATER 7) - add_definitions(-DQT_USE_QSTRINGBUILDER) - else(QT_VERSION_MINOR GREATER 7) - add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) - endif(QT_VERSION_MINOR GREATER 7) -endif(QT_VERSION_MINOR GREATER 5) +add_definitions(-DQT_USE_QSTRINGBUILDER) add_definitions(-DQT_NO_URL_CAST_FROM_STRING) add_definitions(-DBOOST_BIND_NO_PLACEHOLDERS) diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp index f1d3cbefa..1ee8a6f30 100644 --- a/src/core/utilities.cpp +++ b/src/core/utilities.cpp @@ -693,16 +693,12 @@ bool IsLaptop() { } QString SystemLanguageName() { -#if QT_VERSION >= 0x040800 QString system_language = QLocale::system().uiLanguages().empty() ? QLocale::system().name() : QLocale::system().uiLanguages().first(); // uiLanguages returns strings with "-" as separators for language/region; // however QTranslator needs "_" separators system_language.replace("-", "_"); -#else - QString system_language = QLocale::system().name(); -#endif return system_language; } diff --git a/src/internet/lastfm/lastfmservice.cpp b/src/internet/lastfm/lastfmservice.cpp index 11d20c905..ba7430b47 100644 --- a/src/internet/lastfm/lastfmservice.cpp +++ b/src/internet/lastfm/lastfmservice.cpp @@ -28,14 +28,7 @@ // some functions in their includes files, which aren't compatible with // QStringBuilder, we undef it here #include -#if QT_VERSION >= 0x040600 -#if QT_VERSION >= 0x040800 #undef QT_USE_QSTRINGBUILDER -#else -#undef QT_USE_FAST_CONCATENATION -#undef QT_USE_FAST_OPERATOR_PLUS -#endif // QT_VERSION >= 0x040800 -#endif // QT_VERSION >= 0x040600 #include "lastfmservice.h" diff --git a/src/ui/behavioursettingspage.cpp b/src/ui/behavioursettingspage.cpp index 4def22470..b8df4f8ff 100644 --- a/src/ui/behavioursettingspage.cpp +++ b/src/ui/behavioursettingspage.cpp @@ -70,12 +70,10 @@ BehaviourSettingsPage::BehaviourSettingsPage(SettingsDialog* dialog) .replace("_TW", "_Hant_TW"); QString language_name = QLocale::languageToString(QLocale(lookup_code).language()); -#if QT_VERSION >= 0x040800 QString native_name = QLocale(lookup_code).nativeLanguageName(); if (!native_name.isEmpty()) { language_name = native_name; } -#endif QString name = QString("%1 (%2)").arg(language_name, code); language_map_[name] = code; diff --git a/src/ui/iconloader.cpp b/src/ui/iconloader.cpp index 7f0422a88..c5cce40a6 100644 --- a/src/ui/iconloader.cpp +++ b/src/ui/iconloader.cpp @@ -33,11 +33,9 @@ QIcon IconLoader::Load(const QString& name) { if (name.isEmpty()) return ret; -#if QT_VERSION >= 0x040600 // Try to load it from the theme initially ret = QIcon::fromTheme(name); if (!ret.isNull()) return ret; -#endif // Otherwise use our fallback theme const QString path(":/icons/%1x%2/%3.png");