View Issue Details

IDProjectCategoryView StatusLast Update
0016799ScribusQt5 Portpublic2022-05-25 06:54
Reportergoto_coder Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Platformx86_64OSUbuntuOS Version20.04
Product Version1.5.8.svn 
Summary0016799: Qt6 build fails because wrong override function signatures
DescriptionWhen compiling Scribus 1.5.x with "-DWANT_QT6=1", I'm getting errors at this stage:
[ 9%] Building CXX object scribus/CMakeFiles/scribus.dir/scribus_autogen/mocs_compilation.cpp.o

The errors are caused by functions intented to override, but actually not doing so:

1) …/scribus15x/scribus/scmimedata.h:78:11: error: ‘QVariant ScElemMimeData::retrieveData(const QString&, QVariant::Type) const’ marked ‘override’, but does not override
2) …/scribus15x/scribus/scribusview.h:339:7: error: ‘void ScribusView::enterEvent(QEvent*)’ marked ‘override’, but does not override
3) …/scribus15x/scribus/ui/dasheditor.h:56:7: error: ‘void DashPreview::enterEvent(QEvent*)’ marked ‘override’, but does not override

Apparently, the signatures of the corresponding virtual functions were changed in Qt6, so the signatures don't match anymore.

Number 1) seems to be caused by this change:
Qt/5.15.2/gcc_64/include/QtCore/qmimedata.h: virtual QVariant retrieveData(const QString &mimetype, QVariant::Type preferredType) const;
Qt/6.2.4/gcc_64/include/QtCore/qmimedata.h: virtual QVariant retrieveData(const QString &mimetype, QMetaType preferredType) const;

Number 2) and 3) seem to be caused from this change:
Qt/5.15.2/gcc_64/include/QtWidgets/qwidget.h: virtual void enterEvent(QEvent *event);
Qt/6.2.4/gcc_64/include/QtWidgets/qwidget.h: virtual void enterEvent(QEnterEvent *event);

I would like to try writing a patch for this, but I can't really estimate the level of complexity involved, so not sure if it's a good idea for a newbie like me.
Steps To ReproduceCheckout 1.5.x repository
Run cmake with "-DWANT_QT6=1" -> make fails with above mentioned errors.
Run cmake with "-DWANT_QT6=0" -> no problem.
Tagsbuild, fail, Qt5, Qt6
PatchNo

Activities

jghali

2022-05-25 00:19

administrator   ~0049659

Building 1.5.x with Qt6 is not supported and will never be, use trunk if you want Qt6 support.

jghali

2022-05-25 06:54

administrator   ~0049662

I removed that WANT_QT6 option in 1.5.x branch. It's just a leftover of beginning of Qt6 port, before we split 1.5.x and 1.7.x code.

Issue History

Date Modified Username Field Change
2022-05-25 00:07 goto_coder New Issue
2022-05-25 00:07 goto_coder Tag Attached: build
2022-05-25 00:07 goto_coder Tag Attached: fail
2022-05-25 00:07 goto_coder Tag Attached: Qt5
2022-05-25 00:07 goto_coder Tag Attached: Qt6
2022-05-25 00:19 jghali Note Added: 0049659
2022-05-25 06:54 jghali Assigned To => jghali
2022-05-25 06:54 jghali Status new => resolved
2022-05-25 06:54 jghali Resolution open => no change required
2022-05-25 06:54 jghali Note Added: 0049662
2022-05-25 06:54 jghali Status resolved => closed