D20532: Proof of Concept: Add double click actions to empty space in the folder view

Dominik Haumann noreply at phabricator.kde.org
Tue Oct 8 07:10:32 BST 2019


dhaumann added inline comments.

INLINE COMMENTS

> fbg13 wrote in kitemlistcontroller.cpp:821
> Well I asked which to use and have been told to use static_cast.

You should use static_cast only if you know 100% sure the type. But in this case the line below even checks against nullptr. So it seems you are not sure what you get. That's why using qobject_cast is the better/correct approach here.

> kitemlistcontroller.cpp:836
> +        // find the action set by the user and trigger it
> +        QList<QAction *> actions = mainWindow->actionCollection()->actions();
> +        for (QAction *action : actions) {

const missing, otherwise the range based for loop detaches.

> navigationsettingspage.cpp:64
> +    QStringList allowedActions;
> +    allowedActions << "new_tab"
> +                   << "open_terminal"

Wrap with QStringLiteral to avoid memory allocations.

REPOSITORY
  R318 Dolphin

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

To: fbg13, #dolphin, elvisangelaccio, #vdg, ngraham
Cc: dhaumann, rizzitello, anthonyfieroni, kneckermcknacksack, ngraham, kfm-devel, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191008/8728b3c3/attachment.htm>


More information about the kfm-devel mailing list