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.wilder-5.24
parent
7fb7e4bb42
commit
afa8159f34
10 changed files with 60 additions and 186 deletions
@ -0,0 +1,8 @@ |
||||
set(interactiveconsole_SRCS |
||||
interactiveconsole.cpp |
||||
main.cpp |
||||
) |
||||
|
||||
add_executable(plasma-interactiveconsole ${interactiveconsole_SRCS}) |
||||
target_link_libraries(plasma-interactiveconsole Qt::Widgets Qt::DBus KF5::KIOCore KF5::WidgetsAddons KF5::ConfigWidgets KF5::TextEditor KF5::Package) |
||||
install(TARGETS plasma-interactiveconsole ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) |
||||
@ -0,0 +1,16 @@ |
||||
/*
|
||||
SPDX-FileCopyrightText: 2021 David Edmundson <davidedmundson@kde.org> |
||||
SPDX-License-Identifier: LGPL-2.0-or-later |
||||
*/ |
||||
|
||||
#include "interactiveconsole.h" |
||||
#include <QApplication> |
||||
|
||||
int main(int argc, char **argv) |
||||
{ |
||||
QApplication app(argc, argv); |
||||
// set to delete on close
|
||||
auto console = new InteractiveConsole; |
||||
console->show(); |
||||
app.exec(); |
||||
} |
||||
Loading…
Reference in new issue