Bug 408787 - "ReferenceError: workspace is not defined" in qdbus interactive shell
Summary: "ReferenceError: workspace is not defined" in qdbus interactive shell
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.16.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-16 15:29 UTC by Konstantin Kharlamov
Modified: 2019-06-18 22:24 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kharlamov 2019-06-16 15:29:09 UTC
STEPS TO REPRODUCE
1. Run `qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.showInteractiveKWinConsole`
2. Insert text `workspace.clientMaximizeSet.connect(function(client, h, v) { });`
3. Press "Run"

OBSERVED RESULT

Output with the error:

    Error: ReferenceError: workspace is not defined at line 1

EXPECTED RESULT

No error in the output.

SOFTWARE/OS VERSIONS
Window API: X11
KDE Plasma Version: 5.16
KDE Frameworks Version: 5.59
Qt Version: 5.12.3

ADDITIONAL INFORMATION

Workaround: switch to "Plasma" tab, then back to "kwin" tab, and only then click "Run". Then it works.

This may be related to this bug: https://github.com/kwin-scripts/kwin-tiling/issues/162
Comment 1 David Edmundson 2019-06-18 14:12:48 UTC
Git commit cc74edf103397c721dc48a8e07a7ae2492b7678b by David Edmundson.
Committed on 16/06/2019 at 16:05.
Pushed by davidedmundson into branch 'davidedmundson/ksession'.

[interactiveconsole] Fix initial load selection

Summary:
QActionGroup has no signal for when an action within the group changes
checked state. Only when an action within is triggered.

Without calling trigger InteractiveConsole::modeSelectionChanged is not
triggered and m_mode is not updated.

Test Plan:
qdbus to launch the console
Execute button went to the right place

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21852

M  +2    -2    components/shellprivate/interactiveconsole/interactiveconsole.cpp

https://commits.kde.org/plasma-workspace/cc74edf103397c721dc48a8e07a7ae2492b7678b
Comment 2 David Edmundson 2019-06-18 22:24:04 UTC
Git commit 15de7ceb3875f6b7be7bc55ec43941874fc43e44 by David Edmundson.
Committed on 18/06/2019 at 22:22.
Pushed by davidedmundson into branch 'Plasma/5.16'.

[interactiveconsole] Fix initial load selection

Summary:
QActionGroup has no signal for when an action within the group changes
checked state. Only when an action within is triggered.

Without calling trigger InteractiveConsole::modeSelectionChanged is not
triggered and m_mode is not updated.

Test Plan:
qdbus to launch the console
Execute button went to the right place

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21852

M  +2    -2    components/shellprivate/interactiveconsole/interactiveconsole.cpp

https://commits.kde.org/plasma-workspace/15de7ceb3875f6b7be7bc55ec43941874fc43e44