┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinremoveaction.cpp
AgeCommit message (Collapse)Author
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* speeds up incremental builds as changes to a header will not always need the full mocs_compilation.cpp for all the target's headers rebuild, while having a moc file sourced into a source file only adds minor extra costs, due to small own code and the used headers usually already covered by the source file, being for the same class/struct * seems to not slow down clean builds, due to empty mocs_compilation.cpp resulting in those quickly processed, while the minor extra cost of the sourced moc files does not outweigh that in summary. Measured times actually improved by some percent points. (ideally CMake would just skip empty mocs_compilation.cpp & its object file one day) * enables compiler to see all methods of a class in same compilation unit to do some sanity checks * potentially more inlining in general, due to more in the compilation unit * allows to keep using more forward declarations in the header, as with the moc code being sourced into the cpp file there definitions can be ensured and often are already for the needs of the normal class methods
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-10-16Make sure we always have the Del shortcutElvis Angelaccio
Same fix as in D7655, but this time for the MoveToTrash standard action. Differential Revision: https://phabricator.kde.org/D7860
2017-09-17Merge branch 'Applications/17.08'Elvis Angelaccio
2017-09-17Make sure we always have Shift+Del as shortcutElvis Angelaccio
After commit 68bb0ec22a the shortcut for the Delete action is not necessarily Shift+Del, but whatever the user set in System Setting. However DolphinRemoveAction assumes/hardcodes Shift+Del, so we should always make sure we have this shortcut around, for consistency. We just need to add it (if necessary) to the list of shortcuts of the action. However: * for the actual Delete action, we need to append it (if we'd prepend it, it would override a custom primary shortcut in the 'Configure Shortcuts' dialog). * for DolphinRemoveAction, we need to prepend it in order to have Shift+Del (rather than the custom primary shortcut) in the context menu. Differential Revision: https://phabricator.kde.org/D7655
2017-09-07Fix DolphinRemoveAction Shift toggling on WaylandElvis Angelaccio
QGuiApplication::queryKeyboardModifiers() does not work on Wayland [1]. We don't need it in the first place, since we already know (thanks to the key events) whether Shift has been pressed or released. So we can just pass this information to DolphinRemoveAction::update(). BUG: 354301 [1]: https://bugreports.qt.io/browse/QTBUG-62786 Differential Revision: https://phabricator.kde.org/D7519
2017-08-09Drop duplicate i18n stringsElvis Angelaccio
This comment (introduced in commit 39f89141b06c) no longer seems to apply, so drop the duplicate translations and just use the default strings from kconfigwidgets. Differential Revision: https://phabricator.kde.org/D6779
2017-07-27Port to KStandardAction::MoveToTrashElvis Angelaccio
It was introduced in kconfig(widgets) 5.25. Using the standard action results in less code and no need to hardcode the Del shortcut. Test Plan: - Change shortcut in System Settings -> Shortcuts -> Standard Shortcuts - Make sure the new shortcut is used by dolphin. Differential Revision: https://phabricator.kde.org/D6778
2017-03-13Port to KStandardAction::DeleteFileElvis Angelaccio
Summary: It was introduced in kconfig 5.25 and it properly handles the shift+del shortcut (together with kxmlgui >= 5.30). This allows us to drop the custom delete shortcut as well as the shift+del workaround in DolphinMainWindow. Test Plan: Shift+Del still deletes files, without the 'ambiguous shortcut' warning dialog. Reviewers: emmanuelp Differential Revision: https://phabricator.kde.org/D5010
2016-09-21Properly check Shift toggling in DolphinRemoveActionElvis Angelaccio
Documentation of QGuiApplication::keyboardModifiers() says that "It should be noted this may not reflect the actual keys held on the input device at the time of calling but rather the modifiers as last reported in one of the above events". Since this method is called in DolphinContextMenu's keyPressEvent() and keyReleaseEvent(), the first time that keyboardModifiers() is called it doesn't report that shift has been pressed. Replacing this method with queryKeyboardModifiers() does the job because the latter doesn't care about the event queue. BUG: 354301 FIXED-IN: 16.08.2 REVIEW: 128972
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2014-09-14simple setShortcuts => setDefaultShortcuts portingChristoph Cullmann
2014-05-05dolphin: convert the remaining code to Qt5 signal/slot syntaxAlex Richardson
Middle clicking on Forward/Backward/Home/etc. will no longer open a new tab since the QAction triggered signal no longer tell us which mouse button was pressed
2013-06-22Update the "Move to Trash" action's and the "Delete" action'sEmmanuel Pescosta
enabled state in the context menu for read only files/folders (also archives). BUG: 294013 FIXED-IN: 4.11 REVIEW: 111160
2013-05-14- Factored out the Delete/Move To Trash action into own class.Dawit Alemayehu
- Updated both the Dolphin KPart and context menu to use the new DolphinRemoveAction class to manage "Delete/Move to Trash" actions. See also https://git.reviewboard.kde.org/r/107509/. REVIEW: 108802