Subject: bug#31643: Scribus fails to build since Qt upgrade

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 29 May 2018 16:11:01 +0200

Scribus fails to build, probably because of the Qt upgrade.  There are a
bunch of errors; some of them are reproduced here:

--8<---------------cut here---------------start------------->8---
…
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp:58:12: error: invalid use of incomplete type ‘const class QStyleOptionGraphicsItem’
  if (option->state & QStyle::State_Selected)
            ^
In file included from /gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/QGraphicsEllipseItem:1:0,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.h:32,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp:27:
/gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/qgraphicsitem.h:80:7: note: forward declaration of ‘class QStyleOptionGraphicsItem’
 class QStyleOptionGraphicsItem;
       ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp:58:22: error: incomplete type ‘QStyle’ used in nested name specifier
  if (option->state & QStyle::State_Selected)
                      ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp:61:55: error: invalid use of incomplete type ‘const class QStyleOptionGraphicsItem’
   painter->setPen(QPen(Qt::red, qMax(0.1, 1.0 / option->levelOfDetail)));
                                                       ^
In file included from /gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/QGraphicsEllipseItem:1:0,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.h:32,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp:27:
/gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/qgraphicsitem.h:80:7: note: forward declaration of ‘class QStyleOptionGraphicsItem’
 class QStyleOptionGraphicsItem;
       ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp:66:55: error: invalid use of incomplete type ‘const class QStyleOptionGraphicsItem’
   painter->setPen(QPen(Qt::red, qMax(0.2, 2.0 / option->levelOfDetail)));
                                                       ^
In file included from /gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/QGraphicsEllipseItem:1:0,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.h:32,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp:27:
/gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/qgraphicsitem.h:80:7: note: forward declaration of ‘class QStyleOptionGraphicsItem’
 class QStyleOptionGraphicsItem;
       ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp: In member function ‘virtual void LensItem::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*)’:
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:58:46: error: invalid use of incomplete type ‘const class QStyleOptionGraphicsItem’
  painter->setPen(QPen(Qt::black, 1.0 / option->levelOfDetail));
                                              ^
In file included from /gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/QGraphicsItem:1:0,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.h:33,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:27:
/gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/qgraphicsitem.h:80:7: note: forward declaration of ‘class QStyleOptionGraphicsItem’
 class QStyleOptionGraphicsItem;
       ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:66:12: error: invalid use of incomplete type ‘const class QStyleOptionGraphicsItem’
  if (option->state & QStyle::State_Selected)
            ^
In file included from /gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/QGraphicsItem:1:0,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.h:33,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:27:
/gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/qgraphicsitem.h:80:7: note: forward declaration of ‘class QStyleOptionGraphicsItem’
 class QStyleOptionGraphicsItem;
       ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:66:22: error: incomplete type ‘QStyle’ used in nested name specifier
  if (option->state & QStyle::State_Selected)
                      ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:68:19: error: invalid use of incomplete type ‘const class QStyleOptionGraphicsItem’
   scaling = option->levelOfDetail;
                   ^
In file included from /gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/QGraphicsItem:1:0,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.h:33,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:27:
/gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/qgraphicsitem.h:80:7: note: forward declaration of ‘class QStyleOptionGraphicsItem’
 class QStyleOptionGraphicsItem;
       ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:69:28: error: invalid use of incomplete type ‘const class QStyleOptionGraphicsItem’
   double siz = 6.0 / option->levelOfDetail;
                            ^
In file included from /gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/QGraphicsItem:1:0,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.h:33,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:27:
/gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/qgraphicsitem.h:80:7: note: forward declaration of ‘class QStyleOptionGraphicsItem’
 class QStyleOptionGraphicsItem;
       ^
/tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:72:45: error: invalid use of incomplete type ‘const class QStyleOptionGraphicsItem’
   painter->setPen(QPen(Qt::red, 1.0 / option->levelOfDetail, Qt::DotLine));
                                             ^
In file included from /gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/QGraphicsItem:1:0,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.h:33,
                 from /tmp/guix-build-scribus-1.5.3.drv-0/scribus-1.5.3/scribus/plugins/tools/lenseffects/lensdialog.cpp:27:
/gnu/store/xgpwah2hppghgc7c09jp643ddm2lfjj5-qtbase-5.11.0/include/qt5/QtWidgets/qgraphicsitem.h:80:7: note: forward declaration of ‘class QStyleOptionGraphicsItem’
 class QStyleOptionGraphicsItem;
       ^
make[2]: *** [scribus/plugins/tools/2geomtools/meshdistortion/CMakeFiles/meshdistortion.dir/build.make:77: scribus/plugins/tools/2geomtools/meshdistortion/CMakeFiles/meshdistortion.dir/meshdistortiondialog.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
…
--8<---------------cut here---------------end--------------->8---

--
Ricardo