diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-06-09 16:35:40 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-08 10:01:42 +0200 |
commit | c425d4627ea7a0df3db12600d832de276c691e8b (patch) | |
tree | 4037387cbc5566cd45afe01d25bde5ab7ad65ae8 | |
parent | d7b9eb6b63e073238480cb2a95b0cf529e17541a (diff) | |
download | rockbox-c425d4627ea7a0df3db12600d832de276c691e8b.tar.gz rockbox-c425d4627ea7a0df3db12600d832de276c691e8b.zip |
rbutil: Drop Qt4 support.
The last version of Qt4 was released in 2011, time to officially move to
Qt5.
Change-Id: I57d2261bfa44ec824ef4a406f60ce1bd9bc52589
-rw-r--r-- | rbutil/rbutilqt/main.cpp | 8 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pro | 48 |
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 @@ | |||
26 | #include "FileAppender.h" | 26 | #include "FileAppender.h" |
27 | 27 | ||
28 | #ifdef STATIC | 28 | #ifdef STATIC |
29 | #include <QtPlugin> | 29 | #if QT_VERSION < 0x050400 |
30 | #if QT_VERSION < 0x050000 | ||
31 | Q_IMPORT_PLUGIN(qtaccessiblewidgets) | ||
32 | #elif QT_VERSION < 0x050400 | ||
33 | /* | 30 | /* |
34 | * accessibility is no longer a plugin after 5.4.0: | 31 | * accessibility is no longer a plugin after 5.4.0: |
35 | * <https://bugreports.qt.io/browse/QTBUG-37957?focusedCommentId=239189&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-239189> | 32 | * <https://bugreports.qt.io/browse/QTBUG-37957#comment-239189> |
36 | */ | 33 | */ |
34 | #include <QtPlugin> | ||
37 | Q_IMPORT_PLUGIN(AccessibleFactory) | 35 | Q_IMPORT_PLUGIN(AccessibleFactory) |
38 | #endif | 36 | #endif |
39 | #endif | 37 | #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 | |||
50 | } | 50 | } |
51 | 51 | ||
52 | # check version of Qt installation | 52 | # check version of Qt installation |
53 | !contains(QT_MAJOR_VERSION, 5) { | 53 | contains(QT_MAJOR_VERSION, 4) { |
54 | VER = $$find(QT_VERSION, ^4\\.[5-9]+.*) | 54 | error("Qt 4 is not supported anymore.") |
55 | isEmpty(VER) { | ||
56 | message("Qt >= 4.5 required!") | ||
57 | !isEmpty(QT_VERSION) error("Qt found:" $$[QT_VERSION]) | ||
58 | } | ||
59 | message("using Qt version $$VER at $$[QT_INSTALL_PREFIX]") | ||
60 | } | 55 | } |
61 | 56 | ||
62 | RBBASE_DIR = $$_PRO_FILE_PWD_ | 57 | RBBASE_DIR = $$_PRO_FILE_PWD_ |
@@ -161,10 +156,8 @@ TEMPLATE = app | |||
161 | TARGET = RockboxUtility | 156 | TARGET = RockboxUtility |
162 | QT += network | 157 | QT += network |
163 | 158 | ||
164 | contains(QT_MAJOR_VERSION, 5) { | 159 | message("Qt$$QT_MAJOR_VERSION found") |
165 | message("Qt5 found") | 160 | QT += widgets multimedia |
166 | QT += widgets multimedia | ||
167 | } | ||
168 | 161 | ||
169 | CONFIG += c++11 | 162 | CONFIG += c++11 |
170 | 163 | ||
@@ -180,12 +173,8 @@ dbg { | |||
180 | } | 173 | } |
181 | 174 | ||
182 | DEFINES += RBUTIL _LARGEFILE64_SOURCE | 175 | DEFINES += RBUTIL _LARGEFILE64_SOURCE |
176 | DEFINES += QT_DEPRECATED_WARNINGS | ||
183 | 177 | ||
184 | # check version of Qt installation | ||
185 | !contains(QT_MAJOR_VERSION, 5):!macx:linux-g++* { | ||
186 | # suppress warnings in Qt 4.8 shown by gcc 4.8 | ||
187 | QMAKE_CXXFLAGS += -Wno-unused-local-typedefs | ||
188 | } | ||
189 | # platform specific | 178 | # platform specific |
190 | win32 { | 179 | win32 { |
191 | # use MinGW's implementation of stdio functions for extended format string | 180 | # use MinGW's implementation of stdio functions for extended format string |
@@ -208,22 +197,9 @@ unix:!macx:static { | |||
208 | LIBS += -Wl,-Bstatic -lusb-1.0 -Wl,-Bdynamic | 197 | LIBS += -Wl,-Bstatic -lusb-1.0 -Wl,-Bdynamic |
209 | } | 198 | } |
210 | 199 | ||
211 | # if -config intel is specified use 10.5 SDK and don't build for PPC | 200 | macx { |
212 | contains(QT_MAJOR_VERSION, 5) { | 201 | QMAKE_MAC_SDK=macosx |
213 | macx { | ||
214 | CONFIG += intel | ||
215 | message("Qt5 doesn't support PPC anymore, building x86 only") | ||
216 | } | ||
217 | } | ||
218 | macx:!intel { | ||
219 | CONFIG += ppc | ||
220 | QMAKE_LFLAGS_PPC=-mmacosx-version-min=10.4 -arch ppc | ||
221 | QMAKE_LFLAGS_X86=-mmacosx-version-min=10.4 -arch i386 | ||
222 | QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk | ||
223 | } | ||
224 | macx:intel { | ||
225 | contains(QT_MAJOR_VERSION, 5) { | 202 | contains(QT_MAJOR_VERSION, 5) { |
226 | QMAKE_MAC_SDK=macosx | ||
227 | greaterThan(QT_MINOR_VERSION, 5) { | 203 | greaterThan(QT_MINOR_VERSION, 5) { |
228 | QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 | 204 | QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 |
229 | message("Qt 5.6+ detected: setting deploy target to 10.7") | 205 | message("Qt 5.6+ detected: setting deploy target to 10.7") |
@@ -233,13 +209,7 @@ macx:intel { | |||
233 | message("Qt up to 5.5 detected: setting deploy target to 10.6") | 209 | message("Qt up to 5.5 detected: setting deploy target to 10.6") |
234 | } | 210 | } |
235 | } | 211 | } |
236 | !contains(QT_MAJOR_VERSION, 5) { | 212 | |
237 | QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.5.sdk | ||
238 | QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5 | ||
239 | QMAKE_LFLAGS_X86=-mmacosx-version-min=10.5 -arch i386 | ||
240 | } | ||
241 | } | ||
242 | macx { | ||
243 | CONFIG += x86 | 213 | CONFIG += x86 |
244 | LIBS += -L/usr/local/lib \ | 214 | LIBS += -L/usr/local/lib \ |
245 | -framework IOKit -framework CoreFoundation -framework Carbon \ | 215 | -framework IOKit -framework CoreFoundation -framework Carbon \ |
@@ -252,7 +222,7 @@ macx { | |||
252 | } | 222 | } |
253 | 223 | ||
254 | static { | 224 | static { |
255 | if(equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 4)) | lessThan(QT_MAJOR_VERSION, 5) { | 225 | if(equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 4)) { |
256 | QTPLUGIN += qtaccessiblewidgets | 226 | QTPLUGIN += qtaccessiblewidgets |
257 | LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets | 227 | LIBS += -L$$(QT_BUILD_TREE)/plugins/accessible -lqtaccessiblewidgets |
258 | } | 228 | } |