Plasma had an entire text editor for the script engine in process.
The method for loading this was very convoluted, it loaded a QML file
(in plasma-desktop!) which contained an Item(!) which then loaded a QML
component that showed a widget dialog.
It also means loading a very heavy lib KTextEditor in ShellComponents
which is very heavy. This will get loaded in things like the logout
greeter, which is super slow on the pinephone.
We already had the concept of evalating a script remotely, we can just
hook up the print statement and move the whole executable out.
Technically this is an API break on the plasmashell DBus API, but
pragmatically going from void -> something on the return type isn't
going to break anything.
The current code tries to load any KTextEditor/Document part using KServiceTypeTrader.
At least on my machine katepart is the only available one.
By loading that one directly and falling back to the existing KTextEdit fallback we can avoid using the deprecated KServiceTypeTrader
The existing method was overly complicated given that KPackage can load packages
relative to the default package root. Also it didn't work because QStandardPaths
defaults to LocateFile, not finding any packages.
Summary: It was previously using the old style due to getting downcast too early
Test Plan: Compiles
Reviewers: #plasma, sitter
Reviewed By: sitter
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22840
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.
BUG: 408787
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