D16368: Swap Trash/Delete when Shift is used while the menu is open
This revision was automatically updated to reflect the committed changes. Closed by commit R119:c4285ed1b407: Swap Trash/Delete when Shift is used while the menu is open (authored by hein). REPOSITORY R119 Plasma Desktop CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D16368?vs=44091&id=44141 REVISION DETAIL https://phabricator.kde.org/D16368 AFFECTED FILES containments/desktop/plugins/folder/foldermodel.cpp containments/desktop/plugins/folder/foldermodel.h To: hein, ngraham, broulik, davidedmundson Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D16368: Swap Trash/Delete when Shift is used while the menu is open
hein updated this revision to Diff 44091. hein added a comment. Simplify patch. REPOSITORY R119 Plasma Desktop CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D16368?vs=44063&id=44091 BRANCH master REVISION DETAIL https://phabricator.kde.org/D16368 AFFECTED FILES containments/desktop/plugins/folder/foldermodel.cpp containments/desktop/plugins/folder/foldermodel.h To: hein, ngraham, broulik, davidedmundson Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D16368: Swap Trash/Delete when Shift is used while the menu is open
ngraham added a comment. Thanks Eike! Any chance this can go into the 5.12 branch? REPOSITORY R119 Plasma Desktop BRANCH master REVISION DETAIL https://phabricator.kde.org/D16368 To: hein, ngraham, broulik, davidedmundson Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D16368: Swap Trash/Delete when Shift is used while the menu is open
broulik added inline comments.
INLINE COMMENTS
> foldermodel.cpp:1854
> menu->popup(m_menuPosition);
> -connect(menu, &QMenu::aboutToHide, [menu]() { menu->deleteLater(); });
> +connect(menu, &QMenu::aboutToHide, [this, menu]() {
> +menu->deleteLater();
Use four argument connect since now you access `this` but given you delete the
menu anyway, this change probably isn't neccessary to begin with
REPOSITORY
R119 Plasma Desktop
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D16368
To: hein, ngraham, broulik, davidedmundson
Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai,
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D16368: Swap Trash/Delete when Shift is used while the menu is open
davidedmundson accepted this revision.
davidedmundson added inline comments.
This revision is now accepted and ready to land.
INLINE COMMENTS
> foldermodel.cpp:653
> +// Trash and Delete actions while the Shift modifier is pressed.
> +// There's no point to doing so when the menu isn't open.
> +if (m_menuPosition.isNull()) {
you delete the menu when the menu isn't open, you won't get any events
REPOSITORY
R119 Plasma Desktop
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D16368
To: hein, ngraham, broulik, davidedmundson
Cc: davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai,
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D16368: Swap Trash/Delete when Shift is used while the menu is open
hein created this revision. hein added reviewers: ngraham, broulik. Herald added a project: Plasma. hein requested review of this revision. REVISION SUMMARY Matching Dolphin. BUG:395155 REPOSITORY R119 Plasma Desktop BRANCH master REVISION DETAIL https://phabricator.kde.org/D16368 AFFECTED FILES containments/desktop/plugins/folder/foldermodel.cpp containments/desktop/plugins/folder/foldermodel.h To: hein, ngraham, broulik Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
