Bug 314402

Summary: String representation of KWin::Client should include caption, not name.
Product: [Plasma] kwin Reporter: reactormonk
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist Flags: mgraesslin: ReviewRequest+
Priority: NOR    
Version: 4.9.5   
Target Milestone: 4.11   
Platform: Other   
OS: Linux   
URL: https://git.reviewboard.kde.org/r/108959/
Latest Commit: Version Fixed In: 4.11
Sentry Crash Report:

Description reactormonk 2013-02-04 06:35:07 UTC
Currently, when printed, a client is showed as 'KWin::Client(name="")', which is rather useless. Use the caption instead.

Reproducible: Always

Steps to Reproduce:
1. print(workspace.activeClient)
Actual Results:  
prints: 'KWin::Client(name="")'

Expected Results:  
'KWin::Client(caption="Konsole ...")'
Comment 1 Martin Flöser 2013-02-04 07:25:09 UTC
I'm not sure where the output comes from, but I think it's standard QObject functionality. It might make sense to have the same output as if we pass a KWin::Client to kdebug.
Comment 2 Martin Flöser 2013-02-18 08:16:40 UTC
Git commit b2f56c473067f4012aa1f94334543fb775ea9602 by Martin Gräßlin.
Committed on 14/02/2013 at 15:19.
Pushed by graesslin into branch 'master'.

Print useful information for a Client in scripting

Reusing the debug information already specified for QDebug.
FIXED-IN: 4.11
REVIEW: 108959

M  +1    -2    kwin/client.cpp
M  +10   -0    kwin/client.h
M  +8    -2    kwin/scripting/scripting.cpp

http://commits.kde.org/kde-workspace/b2f56c473067f4012aa1f94334543fb775ea9602