Bug 442866

Summary: discover commit 3bc879cf9 breaks build: can't find QAction or QApplication
Product: [Applications] Discover Reporter: Duncan <1i5t5.duncan>
Component: discoverAssignee: Dan Leinir Turthra Jensen <leinir>
Status: VERIFIED FIXED    
Severity: normal CC: aleixpol
Priority: NOR    
Version First Reported In: git-master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Duncan 2021-09-23 22:37:25 UTC
With frameworks/plasma/apps all from live-git (using the gentoo/kde overlay live-git -9999 ebuilds), commit 3bc879cf9 breaks the build, which remains broken at d199868c0 (current HEAD).  qt is 5.15.2, with some qt component updates earlier in my update today.  (Gentoo uses qt5 snapshots from kde's qt repo.)  The immediately previous 889b28038 builds fine.

The first failure is:
discover/DiscoverDeclarativePlugin.cpp:12:10: fatal error: QAction: No such file or directory
12 | #include <QAction>
|          ^~~~~~~~~

Two additional failures are:
discover/main.cpp:19:10: fatal error: QApplication: No such file or directory
19 | #include <QApplication>
|          ^~~~~~~~~~~~~~

discover/DiscoverObject.cpp:17:10: fatal error: QAction: No such file or directory
17 | #include <QAction>
|          ^~~~~~~~~
Comment 1 Nicolas Fella 2021-09-24 10:56:16 UTC
Git commit a815b7c0ab9605c65b78a41d5aef90bfc6fbb12c by Nicolas Fella.
Committed on 24/09/2021 at 10:55.
Pushed by nicolasfella into branch 'master'.

Link against Qt::Widgets

3bc879cf9 removed an indirect dependency on widgets, but we use QApplication and QAction so we need to link against widgets

M  +1    -0    discover/CMakeLists.txt

https://invent.kde.org/plasma/discover/commit/a815b7c0ab9605c65b78a41d5aef90bfc6fbb12c
Comment 2 Nicolas Fella 2021-09-24 10:57:05 UTC
Git commit acfce3be02e7f5ed258bae323187b0b4a8bff74c by Nicolas Fella.
Committed on 24/09/2021 at 10:56.
Pushed by nicolasfella into branch 'Plasma/5.23'.

Link against Qt::Widgets

3bc879cf9 removed an indirect dependency on widgets, but we use QApplication and QAction so we need to link against widgets
(cherry picked from commit a815b7c0ab9605c65b78a41d5aef90bfc6fbb12c)

M  +1    -0    discover/CMakeLists.txt

https://invent.kde.org/plasma/discover/commit/acfce3be02e7f5ed258bae323187b0b4a8bff74c
Comment 3 Duncan 2021-09-24 14:45:24 UTC
Verified fixed.  Thanks.