workspace.clientList() doesn't work in declarativescript
ClosedPublic

Authored by jpike on Oct 28 2016, 1:08 AM.

Details

Reviewers
graesslin
Group Reviewers
KWin
Summary
Test Plan

Diff Detail

Repository
R108 KWin
Lint
Lint Skipped
Unit
Unit Tests Skipped
jpike updated this revision to Diff 7713.Oct 28 2016, 1:08 AM
jpike retitled this revision from to workspace.clientList() doesn't work in declarativescript.
jpike updated this object.
jpike edited the test plan for this revision. (Show Details)
jpike added a reviewer: graesslin.
jpike set the repository for this revision to R108 KWin.
jpike added a project: KWin.
Restricted Application added a subscriber: kwin. · View Herald TranscriptOct 28 2016, 1:08 AM
jpike added a reviewer: KWin.Oct 28 2016, 11:13 AM
jpike updated this revision to Diff 7722.Oct 28 2016, 12:23 PM

QQmlExpression created on stack instead of heap.

graesslin edited edge metadata.Oct 28 2016, 1:29 PM

Concerning the test script: we can also turn that into an autotest. So far we don't have any autotests for declarative scripts yet - only for Qtscript.

scripting/workspace_wrapper.h
38

I'm wondering whether it makes that much sense to rename the class. As we have two dedicated subclasses, it looks like a lot of name changes all over the place for not much gain.

Also the name is actually wrong. The class is not abstract.

202

I would make the ctor protected.

365

just wondering: why doesn't it need to be:

QQmlListProperty<KWin::Client*>
jpike added inline comments.Oct 28 2016, 1:58 PM
scripting/workspace_wrapper.h
38

Cool, I'll change my patch to stick with WorkspaceWrapper even though it will be made abstract?

202

Good catch.

365

Yeah it's weird isn't it, but that's just how they designed QQmlListProperty. WIth the pointer template argument it doesn't work.

jpike updated this revision to Diff 7742.Oct 29 2016, 12:32 AM
jpike edited edge metadata.

Responded to comments in review: Revert rename of WorkspaceWrapper from AbstractWorkspaceWrapper and make its constructor protected.

jpike marked 4 inline comments as done.Oct 29 2016, 12:33 AM
jpike added a comment.Oct 30 2016, 4:14 PM

I think I've covered all of the points in the code review, I've been testing it for a few days now and it's working well, let me know if there's anything else you need or if I can push?

graesslin accepted this revision.Nov 2 2016, 7:55 AM
graesslin edited edge metadata.
This revision is now accepted and ready to land.Nov 2 2016, 7:55 AM
aacid closed this revision.Feb 27 2017, 12:14 AM