Bug 399917 - Fails to build with QT5.7.1
Summary: Fails to build with QT5.7.1
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (other bugs)
Version First Reported In: 6.0.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-17 09:03 UTC by Simon
Modified: 2022-01-23 04:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon 2018-10-17 09:03:52 UTC
I just tried to compile digikam master and while it works fine on QT5.11.1, it fails on QT5.7.1 (that's just what is provided on debian testing/stable respectively).

digikam/core/utilities/searchwindow/searchtabheader.cpp: In member function ‘virtual void Digikam::KeywordLineEdit::contextMenuEvent(QContextMenuEvent*)’:
digikam/core/utilities/searchwindow/searchtabheader.cpp:119:21: error: invalid use of incomplete type ‘class QContextMenuEvent’
         menu->exec(e->globalPos());
                     ^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QWidget:1:0,
                 from digikam/core/utilities/searchwindow/searchtabheader.h:29,
                 from digikam/core/utilities/searchwindow/searchtabheader.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:80:7: note: forward declaration of ‘class QContextMenuEvent’
 class QContextMenuEvent;
       ^~~~~~~~~~~~~~~~~

Digikam depends on >=5.6.0 (https://www.digikam.org/api/index.html#externaldeps). I understand that's really old, but the fix is trivial, so why not have it:

--- a/core/utilities/searchwindow/searchtabheader.cpp
+++ b/core/utilities/searchwindow/searchtabheader.cpp
@@ -39,6 +39,7 @@
 #include <QInputDialog>
 #include <QIcon>
 #include <QMenu>
+#include <QContextMenuEvent>
 
 // KDE includes

Any objections?
Comment 1 caulier.gilles 2018-10-17 09:58:11 UTC
yes fine Simon, no problem

Gilles Caulier
Comment 2 Simon 2018-10-17 12:31:11 UTC
Git commit 1ee755a2f03aae73ed52cb3e43450989871d54f8 by Simon Frei.
Committed on 17/10/2018 at 12:30.
Pushed by sfrei into branch 'master'.

update
FIXED-IN: 6.0.0

M  +2    -1    NEWS

https://commits.kde.org/digikam/1ee755a2f03aae73ed52cb3e43450989871d54f8