Bug 372821 - forward declaration of 'class KWin::KeyboardInputRedirection'
Summary: forward declaration of 'class KWin::KeyboardInputRedirection'
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-23 07:29 UTC by Hrvoje Senjan
Modified: 2016-11-23 08:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch (403 bytes, patch)
2016-11-23 07:29 UTC, Hrvoje Senjan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hrvoje Senjan 2016-11-23 07:29:10 UTC
Created attachment 102403 [details]
Patch

Since 'Add tabbing to debug console...' or similar commit, compilation of KWin is failing for openSUSE Leap (gcc 4.8.something).

[  297s] /home/abuild/rpmbuild/BUILD/kwin-5.8.90git~20161122T144901~ad06476/debug_console.cpp: In member function 'void KWin::DebugConsole::updateKeyboardTab()':
[  297s] /home/abuild/rpmbuild/BUILD/kwin-5.8.90git~20161122T144901~ad06476/debug_console.cpp:585:35: error: invalid use of incomplete type 'class KWin::KeyboardInputRedirection'
[  297s]      auto xkb = input()->keyboard()->xkb();
[  297s]                                    ^
[  297s] In file included from /home/abuild/rpmbuild/BUILD/kwin-5.8.90git~20161122T144901~ad06476/debug_console.h:25:0,
[  297s]                  from /home/abuild/rpmbuild/BUILD/kwin-5.8.90git~20161122T144901~ad06476/debug_console.cpp:20:
[  297s] /home/abuild/rpmbuild/BUILD/kwin-5.8.90git~20161122T144901~ad06476/input.h:44:7: error: forward declaration of 'class KWin::KeyboardInputRedirection'
[  297s]  class KeyboardInputRedirection;
[  297s]        ^
[  298s] CMakeFiles/kwin.dir/build.make:272: recipe for target 'CMakeFiles/kwin.dir/debug_console.cpp.o' failed
[  298s] make[2]: *** [CMakeFiles/kwin.dir/debug_console.cpp.o] Error 1
[  298s] make[2]: *** Waiting for unfinished jobs....


Attached patch resolves the problem.
Comment 1 Martin Flöser 2016-11-23 07:38:57 UTC
ShipIt.

I'm wondering how that could compile on my system
Comment 2 Hrvoje Senjan 2016-11-23 08:39:45 UTC
Git commit 6195ab26085fecb263e1f4f6a0f0658c21748747 by Hrvoje Senjan.
Committed on 23/11/2016 at 08:35.
Pushed by hrvojes into branch 'master'.

Compile++

With older gcc at least there is a forward declaration error w/o explicit include.
Revewed-by: Martin Gräßlin

M  +1    -0    debug_console.cpp

https://commits.kde.org/kwin/6195ab26085fecb263e1f4f6a0f0658c21748747