m_themeModel->removeTheme(idx) will adjust the model.
Therefore any model indexes we had stored will be invalidated.
If we try and remove 2 cursor themes this can end up either crashing or
even worse potentially removing the wrong theme.
BUG: 439030
Use image sizeInBytes
Use Qt:endl
register qml with qml register anonymous type
Remplace QDrag start by QDarg exec
QModel acces, remove use of child
Use QFileinfo, use birthTime()
Use QRandomGenerator
Since these KCMs can display user and distro provided content, we can't
ensure that everything will begin with a capital letter. Accordingly, we
should sort the grid case-insensitively to prevent the entries starting
with lowercase letters from being shunted to the end.
CCBUG: 404608
Add explicit find_package() and #include's that are required and were
pulled in by KDELibs4Support.
krdb: remove one redundant #include, KColorUtils
kcm_fonts: send dbus message directly to org.kde.KDEPlatformTheme to
'refreshFonts'
kcm_style:
- use KToolBar::emitToolbarStyleChanged() to notify of toolbar style changes
For the rest use the notifyKcmChange() private method to send the dbus
signal.
[1] https://invent.kde.org/frameworks/kdelibs4support/-/blob/master/src/kdeui/kglobalsettings.cpp#L860
Making it a library instead of including the source from multiple places
has several advantages. We get proper dependency and include path
propagation. We can specify the krdb dependencies once instead of
repeating them for each kcm. This allows for a better separation between
the KCM's actual dependencies and krdb's dependencies.
This adds a small cli helper tool which allows you to list what Plasma
themes are available on the system (and which is the current one), as
well as letting you set a theme as the current. It handles being passed
a full path to the theme, though when that happens it just uses the last
bit of the path as the name of the theme.
The latter part allows it to be used by KNewStuff as an adoption
command, and the changes to the knsrc file makes that happen. There is
also a small change which fixes a discrepancy in the naming of the
Plasma Themes dialog, making it consistent with everywhere else that
references Plasma Themes (not sure why they were called styles here,
guessing a really old copy/paste thing).
Additionally, a similar tool for the color and cursor KCMs are also added by
this patch, and the lookandfeeltool binary built by the global themes kcm is
also modified slightly to accept a full path to a package, and added as
an adoption command for those.
The patch also adds a tool which sets wallpapers, which replaces the
failure-prone dbus command previously used as the kns adoption command.
We currently need the lookandfeel and style kcm in plasma-workspace, but
appearantly they depend on the krdb so best solution is to move all kcms
together
They are taken from plasma-desktop at the commit :
8447c08e878ccbde9c5516ba8a912993ea199cb9