From 5da9bf34fd076ab560d7e8fce19d5819c64ed624 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Fri, 19 Apr 2019 16:17:21 +0200 Subject: [PATCH] lximage-qt: work around wrong qconfig.h included qconfig.h from the native sysroot is included which results in the following errors: | .../0.14.1-r0/git/src/mainwindow.cpp:727:36: error: 'QGraphicsSvgItem' does not name a type; did you mean 'QGraphicsItem'? | .../0.14.1-r0/git/src/imageview.cpp:329:5: error: 'QGraphicsSvgItem' was not declared in this scope Signed-off-by: Max Krummenacher --- ...gly-included-native-QtCore-qconfig.h.patch | 49 +++++++++++++++++++ recipes-lxqt/lximage-qt/lximage-qt_git.bb | 1 + 2 files changed, 50 insertions(+) create mode 100644 recipes-lxqt/lximage-qt/files/0001-HACK-fix-wrongly-included-native-QtCore-qconfig.h.patch diff --git a/recipes-lxqt/lximage-qt/files/0001-HACK-fix-wrongly-included-native-QtCore-qconfig.h.patch b/recipes-lxqt/lximage-qt/files/0001-HACK-fix-wrongly-included-native-QtCore-qconfig.h.patch new file mode 100644 index 00000000..d06b9d5e --- /dev/null +++ b/recipes-lxqt/lximage-qt/files/0001-HACK-fix-wrongly-included-native-QtCore-qconfig.h.patch @@ -0,0 +1,49 @@ +From 7ac6c099cef0c106136437da76bb31d16f7d56f4 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher +Date: Fri, 26 Apr 2019 13:23:34 +0000 +Subject: [PATCH] HACK: fix wrongly included native QtCore/qconfig.h + +For whatever reason the CPP includes qconfig.h from the native sysroot. +This causes QT_NO_WIDGETS to be true and as a result the following error +is thrown: + +| .../0.14.1-r0/git/src/imageview.cpp: In member function 'void LxImage::ImageView::setSVG(const QString&)': +| .../0.14.1-r0/git/src/imageview.cpp:329:5: error: 'QGraphicsSvgItem' was not declared in this scope +| QGraphicsSvgItem *svgItem = new QGraphicsSvgItem(fileName); +| ^~~~~~~~~~~~~~~~ + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Max Krummenacher +--- + src/graphicsscene.h | 1 + + src/mainwindow.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/graphicsscene.h b/src/graphicsscene.h +index 79049f6..b2195f0 100644 +--- a/src/graphicsscene.h ++++ b/src/graphicsscene.h +@@ -22,6 +22,7 @@ + #define LXIMAGE_GRAPHICSSCENE_H + + #include ++#undef QT_NO_WIDGETS + #include + + namespace LxImage { +diff --git a/src/mainwindow.h b/src/mainwindow.h +index 3b13fc3..c72ed2b 100644 +--- a/src/mainwindow.h ++++ b/src/mainwindow.h +@@ -22,6 +22,7 @@ + #define LXIMAGE_MAINWINDOW_H + + #include ++#undef QT_NO_WIDGETS + #include "ui_mainwindow.h" + + #include "imageview.h" +-- +2.13.6 + diff --git a/recipes-lxqt/lximage-qt/lximage-qt_git.bb b/recipes-lxqt/lximage-qt/lximage-qt_git.bb index 7591eff3..67bad241 100644 --- a/recipes-lxqt/lximage-qt/lximage-qt_git.bb +++ b/recipes-lxqt/lximage-qt/lximage-qt_git.bb @@ -8,6 +8,7 @@ inherit lxqt pkgconfig distro_features_check gtk-icon-cache mime DEPENDS += "qtx11extras qtsvg libfm-qt libexif libxfixes" +SRC_URI += " file://0001-HACK-fix-wrongly-included-native-QtCore-qconfig.h.patch" SRCREV = "6c2efe769d0514846c78e4a9147f3425440643ec" PV = "0.14.1"