D27395: KCM/ComponentChooser Treat cases when there is no app for a usage
Kevin Ottens
noreply at phabricator.kde.org
Mon Feb 17 11:24:55 GMT 2020
ervin added inline comments.
INLINE COMMENTS
> componentchooseremail.cpp:155
> KSharedConfig::Ptr profile = KSharedConfig::openConfig(QStringLiteral("mimeapps.list"), KConfig::NoGlobals, QStandardPaths::GenericConfigLocation);
> - if (profile->isConfigWritable(true) && emailClientService) {
>
This actually feels less safe now. What if KService returned a nullptr for some reason?
I understand from the logic of early returns you introduced everywhere that you *expect* something. Still I wonder if that's really guaranteed by KService, we could expect bad config somewhere maybe?
> componentchooserterminal.cpp:121
> if (dlg.exec() != QDialog::Accepted) {
> - setCurrentIndex(m_currentIndex);
> + setCurrentIndex(m_currentIndex == -1 ? 0 : m_currentIndex);
> return;
This comes back often in this patch and feels a bit cryptic, probably worth having a properly named method for it.
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D27395
To: meven, bport, ervin, crossi, davidedmundson, #plasma
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 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/20200217/a62fb99c/attachment.html>
More information about the Plasma-devel
mailing list