Bug 459857 - Compile error with latest main
Summary: Compile error with latest main
Status: RESOLVED FIXED
Alias: None
Product: KSystemLog
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Nicolas Ternisien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-30 12:31 UTC by Ricky Payne
Modified: 2022-09-30 13:07 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricky Payne 2022-09-30 12:31:57 UTC
SUMMARY
***
When building my system with kdesrc-build this morning it kept failing. After checking the commit history and my build error I realized that one too many #Includes were removed.
***


STEPS TO REPRODUCE
1.  ./kdesrc-build --resume-from=ksystemlog
2. ???
3.  profit

OBSERVED RESULT

[ 83%] Automatic RCC for testResources.qrc
Consolidate compiler generated dependencies of target testCore
/zeta/projects/kdesrc/src/ksystemlog/src/modes/audit/auditLogMode.cpp: In constructor ‘AuditLogMode::AuditLogMode()’:
/zeta/projects/kdesrc/src/ksystemlog/src/modes/audit/auditLogMode.cpp:23:14: error: invalid use of incomplete type ‘class QAction’
   23 |     d->action->setText(i18n("Audit Log"));
      |              ^~
In file included from /zeta/projects/kdesrc/src/ksystemlog/src/modes/audit/auditLogMode.h:14,
                 from /zeta/projects/kdesrc/src/ksystemlog/src/modes/audit/auditLogMode.cpp:1:
/zeta/projects/kdesrc/src/ksystemlog/src/lib/logMode.h:22:7: note: forward declaration of ‘class QAction’
   22 | class QAction;
      |       ^~~~~~~
/zeta/projects/kdesrc/src/ksystemlog/src/modes/audit/auditLogMode.cpp:24:14: error: invalid use of incomplete type ‘class QAction’
   24 |     d->action->setToolTip(i18n("Display the audit log."));
      |              ^~
/zeta/projects/kdesrc/src/ksystemlog/src/lib/logMode.h:22:7: note: forward declaration of ‘class QAction’
   22 | class QAction;
      |       ^~~~~~~
/zeta/projects/kdesrc/src/ksystemlog/src/modes/audit/auditLogMode.cpp:25:14: error: invalid use of incomplete type ‘class QAction’
   25 |     d->action->setWhatsThis(
      |              ^~
/zeta/projects/kdesrc/src/ksystemlog/src/lib/logMode.h:22:7: note: forward declaration of ‘class QAction’
   22 | class QAction;

EXPECTED RESULT

Successful Compile

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch
(available in About System)
KDE Plasma Version: kdesrc-build from last Sunday
KDE Frameworks Version: ...
Qt Version: 5.15.6

ADDITIONAL INFORMATION

Re-adding the removed "#include "QAction"" "src/modes/audit/auditLogMode.cpp" from this commit fixes the compile. I don't know C++ to know if that's an appropriate fix or not.

https://invent.kde.org/system/ksystemlog/-/commit/0a367817f4db5ab534129bfb896aa9db886ed635
Comment 1 Nicolas Fella 2022-09-30 13:07:23 UTC
Git commit 34119676eaa268645661c93fe1acb5788464833e by Nicolas Fella.
Committed on 30/09/2022 at 13:06.
Pushed by nicolasfella into branch 'master'.

Add missing include

CCMAIL: montel@kde.org

M  +2    -0    src/modes/audit/auditLogMode.cpp

https://invent.kde.org/system/ksystemlog/commit/34119676eaa268645661c93fe1acb5788464833e