Bug 414492 - Dolphin doesn't build against Qt 5.14
Summary: Dolphin doesn't build against Qt 5.14
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-25 12:22 UTC by bluescreenavenger
Modified: 2019-12-09 22:22 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
this patch gets Dolphin to compile against qt5.14 (1.73 KB, patch)
2019-11-28 16:34 UTC, bluescreenavenger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bluescreenavenger 2019-11-25 12:22:55 UTC
It seems that I get this error below when building Dolphin with Qt 5.14:


[ 13%] Building CXX object src/CMakeFiles/dolphinprivate.dir/kitemviews/kstandarditem.cpp.o
[ 13%] Building CXX object src/CMakeFiles/dolphinprivate.dir/kitemviews/kstandarditemlistgroupheader.cpp.o
/srcbuild/dolphin/src/kitemviews/kstandarditem.cpp: In member function ‘void KStandardItem::setDataValue(const QByteArray&, const QVariant&)’:
/srcbuild/dolphin/src/kitemviews/kstandarditem.cpp:103:26: error: aggregate ‘QSet<QByteArray> changedRoles’ has incomplete type and cannot be defined
         QSet<QByteArray> changedRoles;
                          ^~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/dolphinprivate.dir/build.make:343: src/CMakeFiles/dolphinprivate.dir/kitemviews/kstandarditem.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:488: src/CMakeFiles/dolphinprivate.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Comment 1 Elvis Angelaccio 2019-11-25 21:09:09 UTC
Builds fine here with Qt 5.14 beta3.
Comment 2 Christoph Feck 2019-11-25 21:12:05 UTC
Is this related to git vs. non-git builds? See bug 414493.
Comment 3 bluescreenavenger 2019-11-26 00:41:14 UTC
Yeah, I'm building from Git
Comment 4 bluescreenavenger 2019-11-28 04:00:50 UTC
But this one does NOT seem to be based on if the .git folder exist. There are no
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
lines
Comment 5 bluescreenavenger 2019-11-28 16:34:17 UTC
Created attachment 124163 [details]
this patch gets Dolphin to compile against qt5.14

Not sure if I placed the headers in the best places...
Comment 6 Elvis Angelaccio 2019-12-01 11:25:01 UTC
What is your Qt version exactly? Did you build Qt by yourself or it's from your distro?
Comment 7 David Faure 2019-12-01 18:17:00 UTC
This is..... interesting.

I'm using Qt 5.4 from git (54f5b89750, 2 weeks ago) and dolphin builds fine.
So I looked at how qevent.h gets included by views/draganddrophelper.cpp (easy technique: put #error in qevent.h), and it turns out that the generated header include/QtGui/QList says:
    #include <qevent.h>
!!!

I have no idea why this forwarding header even exists, there's include/QtCore/QList which includes qlist.h as it should.

Ah, that's a bug that got fixed in Qt recently.
Commit 5771b5325b85 in qtbase says

commit 5771b5325b85f71a8f8ff78ed13eaee3df2e3ba8
Author: Andy Shaw <andy.shaw@qt.io>
Date:   Tue Nov 5 22:10:24 2019 +0100

    syncqt: Add a means to suspend/resume the processing of a file
    
    Rather than tweaking the parser to cover every eventuality with corner
    case lines that could cause incorrect header files to be created then
    the means to suspend/resume the processing of a file is added.
    
    This enables us to have it skip over the template line that is causing
    a QList header to be created as part of the QtGui headers. This patch
    includes the fix to solve this in addition.
    
    Fixes: QTBUG-68129
    Change-Id: I751646c4b20a4434347c149ae5e6dcb6e7618853
    Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>

So your fixes seem correct to me.
Suddenly <QList> includes qlist.h and not qevent.h anymore...

Man, I'm not looking forward to updating my qt git and fixing compilation in the 399 modules I build..
Comment 8 Laurent Montel 2019-12-01 20:34:01 UTC
I confirm with last qt5.14 that there is a compile error.
So patch seems ok
Comment 9 Antonio Rojas 2019-12-06 14:29:21 UTC
Are you going to submit the patch for merging? This should be included in the 19.12 tarball.
Comment 10 Antonio Rojas 2019-12-09 22:22:59 UTC
Git commit faa37a6138fc0a7458f61d2799370994b936396e by Antonio Rojas.
Committed on 09/12/2019 at 22:21.
Pushed by arojas into branch 'release/19.12'.

Fix build with Qt 5.14 RC

Add needed Qt includes that are no longer pulled transitively.

Differential Revision: https://phabricator.kde.org/D25783

M  +1    -0    src/global.h
M  +1    -0    src/kitemviews/kstandarditem.h
M  +2    -0    src/search/dolphinsearchbox.cpp
M  +1    -0    src/settings/dolphinsettingsdialog.cpp
M  +1    -0    src/settings/general/previewssettingspage.cpp
M  +1    -0    src/settings/services/servicessettingspage.cpp
M  +1    -0    src/views/draganddrophelper.cpp

https://commits.kde.org/dolphin/faa37a6138fc0a7458f61d2799370994b936396e