D20198: Don't lose list position after installing KNS cursor themes
Aleix Pol Gonzalez
noreply at phabricator.kde.org
Tue Apr 2 23:21:15 BST 2019
apol added inline comments.
INLINE COMMENTS
> kcmcursortheme.cpp:466
> + const CursorTheme *theme = selectedIndex().isValid() ? m_proxyModel->theme(selectedIndex()) : nullptr;
> + if(theme) {
> + QString currentTheme = theme->name();
This reads weird: how about:
if (selectedIndex().isValid()) {
const CursorTheme* theme = m_proxyModel->theme(selectedIndex());
...
}
> kcmcursortheme.cpp:472
> + }, this);
> + connect(m_model, &QAbstractItemModel::modelReset, action, &OneTimeAction::trigger);
> + }
Maybe another solution would be having the model insert/remove instead of resetting, although that works too I guess.
> kcmcursortheme.h:150
>
> +class OneTimeAction : public QObject
> +{
:) this sounds familiar.
Maybe we should keep this in the cpp file? it's only used there.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D20198
To: leinir, #plasma, ngraham, broulik
Cc: apol, plasma-devel, #plasma, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190402/8a33b0b2/attachment.html>
More information about the Plasma-devel
mailing list