Bug#972677: deepin-image-viewer: FTBFS with Qt 5.15: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined

2020-10-25 Thread Dmitry Shachnev
Control: tags -1 + pending

On Thu, Oct 22, 2020 at 02:05:20PM +0300, Dmitry Shachnev wrote:
> Dear Maintainer,
>
> deepin-image-viewer fails to build with Qt 5.15, currently available in
> experimental.
>
> After rebuilding dde-qt-dbus-factory and libqtxdg, and building a fixed
> version of dtkwidget (see #972155), I get this error:
>
>   widgets/popupmenustyle.cpp: In member function ‘virtual void 
> PopupMenuStyle::drawPrimitive(QStyle::PrimitiveElement, const QStyleOption*, 
> QPainter*, const QWidget*) const’:
>   widgets/popupmenustyle.cpp:117:22: error: aggregate ‘QPainterPath path’ has 
> incomplete type and cannot be defined
> 117 | QPainterPath path;
> |  ^~~~
>   widgets/popupmenustyle.cpp:133:13: error: ‘QPainterPathStroker’ was not 
> declared in this scope; did you mean ‘QPainterPath’?
> 133 | QPainterPathStroker stroker;
> | ^~~
> | QPainterPath
>   widgets/popupmenustyle.cpp:134:13: error: ‘stroker’ was not declared in 
> this scope; did you mean ‘strtok_r’?
> 134 | stroker.setWidth(FRAME_BORDER_WIDTH);
> | ^~~
> | strtok_r
>   widgets/popupmenustyle.cpp:136:26: error: variable ‘QPainterPath 
> borderPath’ has initializer but incomplete type
> 136 | QPainterPath borderPath = stroker.createStroke(path);
> |  ^~
>
>   widgets/thumbnaillistview.cpp: In member function ‘virtual void 
> ThumbnailListView::paintEvent(QPaintEvent*)’:
>   widgets/thumbnaillistview.cpp:301:18: error: aggregate ‘QPainterPath bp’ 
> has incomplete type and cannot be defined
> 301 | QPainterPath bp;
> |  ^~
>
> This is fixed upstream, see the linked commit.

I have just uploaded the NMU fixing this to DELAYED/5.

The debdiff is attached.

--
Dmitry Shachnev
diff -Nru deepin-image-viewer-5.0.0/debian/changelog deepin-image-viewer-5.0.0/debian/changelog
--- deepin-image-viewer-5.0.0/debian/changelog	2019-10-04 18:08:11.0 +0300
+++ deepin-image-viewer-5.0.0/debian/changelog	2020-10-25 20:33:15.0 +0300
@@ -1,3 +1,10 @@
+deepin-image-viewer (5.0.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream patch to fix build with Qt 5.15 (closes: #972677).
+
+ -- Dmitry Shachnev   Sun, 25 Oct 2020 20:33:15 +0300
+
 deepin-image-viewer (5.0.0-1) unstable; urgency=medium
 
   * New upstream release 5.0.0.
diff -Nru deepin-image-viewer-5.0.0/debian/patches/fix-build-failed-under-Qt-5.15.0.patch deepin-image-viewer-5.0.0/debian/patches/fix-build-failed-under-Qt-5.15.0.patch
--- deepin-image-viewer-5.0.0/debian/patches/fix-build-failed-under-Qt-5.15.0.patch	1970-01-01 03:00:00.0 +0300
+++ deepin-image-viewer-5.0.0/debian/patches/fix-build-failed-under-Qt-5.15.0.patch	2020-10-25 20:33:15.0 +0300
@@ -0,0 +1,60 @@
+From: zhangjinqiang 
+Date: Mon, 14 Sep 2020 02:54:58 +
+Subject: fix: build failed under Qt 5.15.0
+
+(cherry picked from commit b11d7cbdcdd99c82e3feff2aac21e28c6a81f7e7)
+---
+ viewer/widgets/dspinner.cpp  | 1 +
+ viewer/widgets/popupmenustyle.cpp| 1 +
+ viewer/widgets/thumbnaildelegate.cpp | 1 +
+ viewer/widgets/thumbnaillistview.cpp | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/viewer/widgets/dspinner.cpp b/viewer/widgets/dspinner.cpp
+index 2931f3e..ccfae88 100644
+--- a/viewer/widgets/dspinner.cpp
 b/viewer/widgets/dspinner.cpp
+@@ -2,6 +2,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ 
+ #include 
+diff --git a/viewer/widgets/popupmenustyle.cpp b/viewer/widgets/popupmenustyle.cpp
+index ddb509c..0fd91f7 100644
+--- a/viewer/widgets/popupmenustyle.cpp
 b/viewer/widgets/popupmenustyle.cpp
+@@ -19,6 +19,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ 
+diff --git a/viewer/widgets/thumbnaildelegate.cpp b/viewer/widgets/thumbnaildelegate.cpp
+index 64bd65e..1a09702 100644
+--- a/viewer/widgets/thumbnaildelegate.cpp
 b/viewer/widgets/thumbnaildelegate.cpp
+@@ -23,6 +23,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+diff --git a/viewer/widgets/thumbnaillistview.cpp b/viewer/widgets/thumbnaillistview.cpp
+index f27fa22..cb7e015 100644
+--- a/viewer/widgets/thumbnaillistview.cpp
 b/viewer/widgets/thumbnaillistview.cpp
+@@ -30,6 +30,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
diff -Nru deepin-image-viewer-5.0.0/debian/patches/series deepin-image-viewer-5.0.0/debian/patches/series
--- deepin-image-viewer-5.0.0/debian/patches/series	1970-01-01 03:00:00.0 +0300
+++ deepin-image-viewer-5.0.0/debian/patches/series	2020-10-25 20:33:15.0 +0300
@@ -0,0 +1 @@
+fix-build-failed-under-Qt-5.15.0.patch


signature.asc
Description: PGP signature


Bug#972677: deepin-image-viewer: FTBFS with Qt 5.15: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined

2020-10-22 Thread Dmitry Shachnev
Source: deepin-image-viewer
Version: 5.0.0-1
Severity: important
Tags: ftbfs fixed-upstream
User: debian-qt-...@lists.debian.org
Usertags: qt5.15
Forwarded: 
https://github.com/linuxdeepin/deepin-image-viewer/commit/b11d7cbdcdd99c82
Control: block 972278 by -1

Dear Maintainer,

deepin-image-viewer fails to build with Qt 5.15, currently available in
experimental.

After rebuilding dde-qt-dbus-factory and libqtxdg, and building a fixed
version of dtkwidget (see #972155), I get this error:

  widgets/popupmenustyle.cpp: In member function ‘virtual void 
PopupMenuStyle::drawPrimitive(QStyle::PrimitiveElement, const QStyleOption*, 
QPainter*, const QWidget*) const’:
  widgets/popupmenustyle.cpp:117:22: error: aggregate ‘QPainterPath path’ has 
incomplete type and cannot be defined
117 | QPainterPath path;
|  ^~~~
  widgets/popupmenustyle.cpp:133:13: error: ‘QPainterPathStroker’ was not 
declared in this scope; did you mean ‘QPainterPath’?
133 | QPainterPathStroker stroker;
| ^~~
| QPainterPath
  widgets/popupmenustyle.cpp:134:13: error: ‘stroker’ was not declared in this 
scope; did you mean ‘strtok_r’?
134 | stroker.setWidth(FRAME_BORDER_WIDTH);
| ^~~
| strtok_r
  widgets/popupmenustyle.cpp:136:26: error: variable ‘QPainterPath borderPath’ 
has initializer but incomplete type
136 | QPainterPath borderPath = stroker.createStroke(path);
|  ^~

  widgets/thumbnaillistview.cpp: In member function ‘virtual void 
ThumbnailListView::paintEvent(QPaintEvent*)’:
  widgets/thumbnaillistview.cpp:301:18: error: aggregate ‘QPainterPath bp’ has 
incomplete type and cannot be defined
301 | QPainterPath bp;
|  ^~

This is fixed upstream, see the linked commit.

--
Dmitry Shachnev


signature.asc
Description: PGP signature