remove useless qt_version defines
This commit is contained in:
parent
5aec1c0e24
commit
5d343cbe7f
@ -17,13 +17,7 @@ if(WIN32)
|
|||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
# Activate fast QString concatenation
|
# Activate fast QString concatenation
|
||||||
if (QT_VERSION_MINOR GREATER 5)
|
add_definitions(-DQT_USE_QSTRINGBUILDER)
|
||||||
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_NO_URL_CAST_FROM_STRING)
|
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
|
||||||
add_definitions(-DBOOST_BIND_NO_PLACEHOLDERS)
|
add_definitions(-DBOOST_BIND_NO_PLACEHOLDERS)
|
||||||
|
|
||||||
|
@ -693,16 +693,12 @@ bool IsLaptop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString SystemLanguageName() {
|
QString SystemLanguageName() {
|
||||||
#if QT_VERSION >= 0x040800
|
|
||||||
QString system_language = QLocale::system().uiLanguages().empty()
|
QString system_language = QLocale::system().uiLanguages().empty()
|
||||||
? QLocale::system().name()
|
? QLocale::system().name()
|
||||||
: QLocale::system().uiLanguages().first();
|
: QLocale::system().uiLanguages().first();
|
||||||
// uiLanguages returns strings with "-" as separators for language/region;
|
// uiLanguages returns strings with "-" as separators for language/region;
|
||||||
// however QTranslator needs "_" separators
|
// however QTranslator needs "_" separators
|
||||||
system_language.replace("-", "_");
|
system_language.replace("-", "_");
|
||||||
#else
|
|
||||||
QString system_language = QLocale::system().name();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return system_language;
|
return system_language;
|
||||||
}
|
}
|
||||||
|
@ -28,14 +28,7 @@
|
|||||||
// some functions in their includes files, which aren't compatible with
|
// some functions in their includes files, which aren't compatible with
|
||||||
// QStringBuilder, we undef it here
|
// QStringBuilder, we undef it here
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#if QT_VERSION >= 0x040600
|
|
||||||
#if QT_VERSION >= 0x040800
|
|
||||||
#undef QT_USE_QSTRINGBUILDER
|
#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"
|
#include "lastfmservice.h"
|
||||||
|
|
||||||
|
@ -70,12 +70,10 @@ BehaviourSettingsPage::BehaviourSettingsPage(SettingsDialog* dialog)
|
|||||||
.replace("_TW", "_Hant_TW");
|
.replace("_TW", "_Hant_TW");
|
||||||
QString language_name =
|
QString language_name =
|
||||||
QLocale::languageToString(QLocale(lookup_code).language());
|
QLocale::languageToString(QLocale(lookup_code).language());
|
||||||
#if QT_VERSION >= 0x040800
|
|
||||||
QString native_name = QLocale(lookup_code).nativeLanguageName();
|
QString native_name = QLocale(lookup_code).nativeLanguageName();
|
||||||
if (!native_name.isEmpty()) {
|
if (!native_name.isEmpty()) {
|
||||||
language_name = native_name;
|
language_name = native_name;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
QString name = QString("%1 (%2)").arg(language_name, code);
|
QString name = QString("%1 (%2)").arg(language_name, code);
|
||||||
|
|
||||||
language_map_[name] = code;
|
language_map_[name] = code;
|
||||||
|
@ -33,11 +33,9 @@ QIcon IconLoader::Load(const QString& name) {
|
|||||||
|
|
||||||
if (name.isEmpty()) return ret;
|
if (name.isEmpty()) return ret;
|
||||||
|
|
||||||
#if QT_VERSION >= 0x040600
|
|
||||||
// Try to load it from the theme initially
|
// Try to load it from the theme initially
|
||||||
ret = QIcon::fromTheme(name);
|
ret = QIcon::fromTheme(name);
|
||||||
if (!ret.isNull()) return ret;
|
if (!ret.isNull()) return ret;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Otherwise use our fallback theme
|
// Otherwise use our fallback theme
|
||||||
const QString path(":/icons/%1x%2/%3.png");
|
const QString path(":/icons/%1x%2/%3.png");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user