D26324: [KCM/Component] filemanager: make dolphin the default filemananger

Kevin Ottens noreply at phabricator.kde.org
Tue Dec 31 14:32:53 GMT 2019


ervin requested changes to this revision.
ervin added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> componentchooserfilemanager.cpp:57
> +
> +QRadioButton* CfgFileManager::findDolphinRadio() const {
> +    auto it = std::find_if(mDynamicRadioButtons.begin(), mDynamicRadioButtons.end(), [=](QRadioButton *radio) {

Turn it into a free function (taking the list as parameter), move it toward the top of the file and in the anonymous namespace (this is typically before the first definition of a method in CfgFileManager).

Also: space before * or & not after.

> componentchooserfilemanager.cpp:69
>  {
>      if (!mDynamicRadioButtons.isEmpty()) {
> +        // When dolphin is not present, we can't assume any default value

This if is not necessary anymore (if it's empty dolphinRadio will be a nullptr

> componentchooserfilemanager.h:46
>  private:
> +    QRadioButton* findDolphinRadio() const;
> +    

No need to expose it in the .h at all, could take the list as a const& parameter. Besides the space should be before the star not after.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D26324

To: meven, ervin, #plasma
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/20191231/0b81ccdf/attachment.html>


More information about the Plasma-devel mailing list