D26398: [KCM/Activities] Use KConfigXT in ui
Kevin Ottens
noreply at phabricator.kde.org
Wed Jan 8 11:31:08 GMT 2020
ervin requested changes to this revision.
ervin added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> BlacklistedApplicationsModel.cpp:191
> + emit changed(d->pluginConfig->findItem("blockedApplications")->isSaveNeeded() && d->pluginConfig->findItem("allowedApplications")->isSaveNeeded());
> + emit defaulted(d->pluginConfig->findItem("blockedApplications")->isDefault() && d->pluginConfig->findItem("allowedApplications")->isDefault());
> }
To reduced code duplication and make sure we're not uncontrollably getting in null pointers land, I'd use intermediate variables for the item pointers and I'd throw a bunch of Q_ASSERT:
auto blockedAppsItem = d->pluginConfig->findItem("blockedApplications");
Q_ASSERT(blockedAppsItem);
auto allowedAppsItem = d->pluginConfig->findItem("allowedApplications");
Q_ASSERT(allowedAppsItem);
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D26398
To: meven, #plasma, ervin, bport
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200108/e8cc7c14/attachment-0001.html>
More information about the Plasma-devel
mailing list