Bug 468779 - Fails to build without KActivities (wrong #if check)
Summary: Fails to build without KActivities (wrong #if check)
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2023-04-21 22:23 UTC by Christoph Feck
Modified: 2023-05-11 02:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
#ifdef HAVE_KACTIVITIES -> #if HAVE_KACTIVITIES patch (1.30 KB, text/plain)
2023-04-30 19:50 UTC, Duncan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2023-04-21 22:23:05 UTC
SUMMARY
Commit b99f6f50eef395a3ceb88fb3d4b7357cbbc13c85 fails to build without KActivties, because of wrong #if checks: cmakedefine01 HAVE_KACTIVITIES will always define the variable, either to 0 or to 1.

To check for HAVE_KACTIVITIES, use #if instead of #ifdef (see also usage in dolphinviewcontainer.cpp)
Comment 1 Duncan 2023-04-30 19:50:43 UTC
Created attachment 158576 [details]
#ifdef HAVE_KACTIVITIES -> #if HAVE_KACTIVITIES patch

Confirmed bisect to b99f6f50e.  Confirmed it builds with (gentoo) USE=kactivites.  Here's the error without:

src/global.cpp:20:10: fatal error: KActivities/Consumer: No such file or directory
20 | #include <KActivities/Consumer>

And a patch confirmed to fix it since I have it.  I'm not a dev and don't know how to do PRs, but given cfeck's #IFDEF -> #IF hint and the commit, on gentoo a patch was trivial to do and test, so I might as well post it.
Comment 2 Duncan 2023-05-11 02:52:03 UTC
Fixed with c3fb0dc15