Commit 0ecec4d4 authored by Volker Krause's avatar Volker Krause
Browse files

Patch QtSvg to be buildable without QtWidgets

Usually that is achieved by not building QtWidgets at all, like we do for
our Android packages currently. However, we do have libs/apps that need
QAction, which is in QtWidgets in Qt 5 (moved to QtGui in Qt 6). With this
patch we can still build QtWidgets but nevertheless avoid it being pulled
into APKs that don't need it.
parent f37b361f
diff --git a/configure.json b/configure.json
new file mode 100644
index 0000000..10fe83d
--- /dev/null
+++ b/configure.json
@@ -0,0 +1,5 @@
+{
+ "subconfigs": [
+ "src/svg"
+ ]
+}
diff --git a/src/svg/configure.json b/src/svg/configure.json
new file mode 100644
index 0000000..c525fad
--- /dev/null
+++ b/src/svg/configure.json
@@ -0,0 +1,31 @@
+{
+ "module": "svg",
+ "depends": [
+ "gui"
+ ],
+
+ "features": {
+ "qsvgwidget": {
+ "label": "QSvgWidget",
+ "purpose": "Widget for SVG display",
+ "section": "SVG",
+ "output": [ "privateFeature" ]
+ },
+ "qgraphicssvgitem": {
+ "label": "QGraphicsSvgItem",
+ "purpose": "QGraphicsView item for SVG display",
+ "section": "SVG",
+ "output": [ "privateFeature" ]
+ }
+ },
+
+ "summary": [
+ {
+ "section": "Qt SVG",
+ "entries": [
+ "qsvgwidget",
+ "qgraphicssvgitem"
+ ]
+ }
+ ]
+}
diff --git a/src/svg/svg.pro b/src/svg/svg.pro
index b6f17a7..8562604 100644
--- a/src/svg/svg.pro
+++ b/src/svg/svg.pro
@@ -1,6 +1,6 @@
TARGET = QtSvg
QT = core-private gui-private
-qtHaveModule(widgets): QT += widgets-private
+qtConfig(qsvgwidget)|qtConfig(qgraphicssvgitem): QT += widgets-private
DEFINES += QT_NO_USING_NAMESPACE
msvc:equals(QT_ARCH, i386): QMAKE_LFLAGS += /BASE:0x66000000
@@ -17,12 +17,9 @@ HEADERS += \
qsvgfont_p.h \
qsvgtinydocument_p.h \
qsvgrenderer.h \
- qsvgwidget.h \
- qgraphicssvgitem.h \
qsvggenerator.h \
qtsvgglobal.h
-
SOURCES += \
qsvggraphics.cpp \
qsvghandler.cpp \
@@ -32,10 +29,18 @@ SOURCES += \
qsvgfont.cpp \
qsvgtinydocument.cpp \
qsvgrenderer.cpp \
- qsvgwidget.cpp \
- qgraphicssvgitem.cpp \
qsvggenerator.cpp
+qtConfig(qsvgwidget) {
+ HEADERS += qsvgwidget.h
+ SOURCES += qsvgwidget.cpp
+}
+
+qtConfig(qgraphicssvgitem) {
+ HEADERS += qgraphicssvgitem.h
+ SOURCES += qgraphicssvgitem.cpp
+}
+
qtConfig(system-zlib): \
QMAKE_USE_PRIVATE += zlib
else: \
......@@ -5,7 +5,9 @@ import info
class subinfo(info.infoclass):
def setTargets(self):
self.versionInfo.setDefaultValues()
self.patchLevel["5.15.2"] = 1
self.patchLevel["5.15.2"] = 2
if CraftCore.compiler.isAndroid:
self.patchToApply["5.15.2"] = [ ("optional-widget-dependency.diff", 1) ]
def setDependencies(self):
self.runtimeDependencies["libs/qt5/qtbase"] = None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment