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

Reply via email to