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).
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.
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.
And use KPluginMetaData instead. It's what we get from the PackageLoader anyway.
Unlike KPluginInfo KPluginMetaData supports multiple authors. To keep the current behaviour of the model the code picks the first one and ignores the potential others.
Instead of using KPluginTrader's contraint system pass a filter function to KPackage::PackageLoader.
Also move the later filtering into said filter function.
This was the last occurrence that didn't get ported/detected.
Because of that the updating did not work and uninstalling
an entry using the "Widget Explorer" did not work.
BUG: 423055
BUG: 424429
FIXED-IN: 5.20
Currently the applet count is filtered by activity. But for every activity all
applets in all known screens/containments are counted. If a user switches
screens regularly they will see for example that there are 7 instances of the
clock applet even though they have less screens and only one instance in their
current panel(s). This information is not useful to the user because they cannot
interact with the not visible applets in any way.