summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-06-09 16:35:40 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-08-08 10:01:42 +0200
commitc425d4627ea7a0df3db12600d832de276c691e8b (patch)
tree4037387cbc5566cd45afe01d25bde5ab7ad65ae8 /rbutil
parentd7b9eb6b63e073238480cb2a95b0cf529e17541a (diff)
rbutil: Drop Qt4 support.
The last version of Qt4 was released in 2011, time to officially move to Qt5. Change-Id: I57d2261bfa44ec824ef4a406f60ce1bd9bc52589
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/main.cpp8
-rw-r--r--rbutil/rbutilqt/rbutilqt.pro48
2 files changed, 12 insertions, 44 deletions
diff --git a/rbutil/rbutilqt/main.cpp b/rbutil/rbutilqt/main.cpp
index 203bdd1e20..cac93395fe 100644
--- a/rbutil/rbutilqt/main.cpp
+++ b/rbutil/rbutilqt/main.cpp
@@ -26,14 +26,12 @@
#include "FileAppender.h"
#ifdef STATIC
-#include <QtPlugin>
-#if QT_VERSION < 0x050000
-Q_IMPORT_PLUGIN(qtaccessiblewidgets)
-#elif QT_VERSION < 0x050400
+#if QT_VERSION < 0x050400
/*
* accessibility is no longer a plugin after 5.4.0:
- * <https://bugreports.qt.io/browse/QTBUG-37957?focusedCommentId=239189&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-239189>
+ * <https://bugreports.qt.io/browse/QTBUG-37957#comment-239189>
*/
+#include <QtPlugin>
Q_IMPORT_PLUGIN(AccessibleFactory)
#endif
#endif
diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro
index a251db1042..521728a83f 100644
--- a/rbutil/rbutilqt/rbutilqt.pro
+++ b/rbutil/rbutilqt/rbutilqt.pro
@@ -50,13 +50,8 @@ RCC_DIR = $$MYBUILDDIR/rcc
}
# check version of Qt installation
-!contains(QT_MAJOR_VERSION, 5) {
- VER = $$find(QT_VERSION, ^4\\.[5-9]+.*)
- isEmpty(VER) {
- message("Qt >= 4.5 required!")
- !isEmpty(QT_VERSION) error("Qt found:" $$[QT_VERSION])
- }
-message("using Qt version $$VER at $$[QT_INSTALL_PREFIX]")
+contains(QT_MAJOR_VERSION, 4) {
+ error("Qt 4 is not supported anymore.")
}
RBBASE_DIR = $$_PRO_FILE_PWD_
@@ -161,10 +156,8 @@ TEMPLATE = app
TARGET = RockboxUtility
QT += network
-contains(QT_MAJOR_VERSION, 5) {
- message("Qt5 found")
- QT += widgets multimedia
-}
+message("Qt$$QT_MAJOR_VERSION found")
+QT += widgets multimedia
CONFIG += c++11
@@ -180,12 +173,8 @@ dbg {
}
DEFINES += RBUTIL _LARGEFILE64_SOURCE
+DEFINES += QT_DEPRECATED_WARNINGS
-# check version of Qt installation
-!contains(QT_MAJOR_VERSION, 5):!macx:linux-g++* {
- # suppress warnings in Qt 4.8 shown by gcc 4.8
- QMAKE_CXXFLAGS += -Wno-unused-local-typedefs
-}
# platform specific
win32 {
# use MinGW's implementation of stdio functions for extended format string
@@ -208,22 +197,9 @@ unix:!macx:static {
LIBS += -Wl,-Bstatic -lusb-1.0 -Wl,-Bdynamic
}
-# if -config intel is specified use 10.5 SDK and don't build for PPC
-contains(QT_MAJOR_VERSION, 5) {
- macx {
- CONFIG += intel
- message("Qt5 doesn't support PPC anymore, building x86 only")
- }
-}
-macx:!intel {
- CONFIG += ppc
- QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc
- QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386
- QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
-}
-macx:intel {
+macx {
+ QMAKE_MAC_SDK=macosx
contains(QT_MAJOR_VERSION, 5) {
- QMAKE_MAC_SDK=macosx
greaterThan(QT_MINOR_VERSION, 5) {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
message("Qt 5.6+ detected: setting deploy target to 10.7")
@@ -233,13 +209,7 @@ macx:intel {
message("Qt up to 5.5 detected: setting deploy target to 10.6")
}
}
- !contains(QT_MAJOR_VERSION, 5) {
- QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.5.sdk
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
- QMAKE_LFLAGS_X86=-mmacosx-version-min=10.5 -arch i386
- }
-}
-macx {
+
CONFIG += x86
LIBS += -L/usr/local/lib \
-framework IOKit -framework CoreFoundation -framework Carbon \
@@ -252,7 +222,7 @@ macx {
}
static {
- if(equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 4)) | lessThan(QT_MAJOR_VERSION, 5) {
+ if(equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 4)) {
QTPLUGIN += qtaccessiblewidgets
LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets
}