changing icon sizes no longer emits signal

David Faure faure at kde.org
Sun Apr 26 13:24:27 BST 2020


On Saturday, April 25, 2020 4:54:43 PM CEST Friedrich W. H. Kossebau wrote:
> Am Samstag, 25. April 2020, 15:10:37 CEST schrieb Martin Koller:
> > Hi,
> > 
> > in liquidshell I'm using
> > 
> >   connect(KIconLoader::global(), &KIconLoader::iconLoaderSettingsChanged,
> > 
> > this, &StartMenu::adjustIconSize);
> > 
> > to be informed whenever the icon sizes get changed in systemsettings.
> > I don't know since when but at least in version
> > 
> > Operating System: openSUSE Tumbleweed 20200419
> > KDE Plasma Version: 5.18.4
> > KDE Frameworks Version: 5.69.0
> > Qt Version: 5.14.1
> > 
> > I no longer receive this signal.
> 
> I can confirm that changing icon sizes in Plasma Systemsettings and clicking
> apply seems to have no effect also for all other places which would adapt
> to those values, like KXmlGui-driven toolbars (which also by a quick check
> seems to connect to that signal). The changed sizes are only picked up by
> newly started instances of programs.
> I am also on openSUSE TW with same versions. Also not sure when I saw this
> working the last time.
> 
> Given the API dox of KIconLoader does not note that signal is deprecated, I
> would assume this signal is still to be used (and main.cpp of the icon kcm
> seems to call KIconLoader::emitChange(...), which should trigger the signal
> via D-Bus in all client side, from a peek view at code path.

The call to KIconLoader::emitChange is deeply nested in KDE4 compat stuff, 
with possible exit paths before.

A patch like the one attached seems to help, but someone who knows the KCM 
better (or has time to dig) should make this conditional on the user actually 
changing icon sizes, and only emit for the groups that have changed.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kcm_icons.diff
Type: text/x-patch
Size: 1038 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200426/812212b1/attachment-0001.bin>


More information about the Kde-frameworks-devel mailing list