This is a bit more elaborate than a straightforward port, as the old code
already was prone to using dangling string references due to values from
the English language block being out of scope when the reference were used
in the final loop.
Give context though i18nc for the use of "uninstallable" so that it won't be misinterpreted as "not installable" by translators, as has happened in some cases (e.g. sv & zh_TW).
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
consider an applet acceptable for the formfactor if at least one
of its formfactors are contained in KDeclarative::runtimePlatform
or if either KDeclarative::runtimePlatform or applet formfactors
are empty.
(before informFactor failed if even one of the applet supported
formfactors was not in runtimePlatform
BUG:433983
A new instance WidgetExplorer is created everytime we open get new
applets window. Each and every instance of WidgetExplorer has its own
newStuffDialog. This means that downloadWidgets method will always
create new instance of QtQuickDialogWrapper due to the default value of
newStuffDialog is null.
Change newStuffDialog to static so that it will be shared to every
instances of WidgetExplorer. This prevents another get new applets
window to be opened.
BUG: 412765
The QWidgets components are about to be deprecated
and the QtQuick dialog has a bunch of visual improvements.
Considering that most KCMs already use the QtQuick components
this MR improves the consistency.
See https://invent.kde.org/frameworks/knewstuff/-/merge_requests/80
for the MR which introduced the non-deprecated dialog class.
It was used to show the KNS dialog to download
wallpaper plugins. But nowadays we can and should
just use the QML components provided by KNewStuff directly.
All occurency in plasma-desktop, plasma-bigscreen and
plasma-nano have open MRs to port away from it (or just remove the import).
We do this sometimes, but not consistenly.
The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.