┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinpart.cpp
AgeCommit message (Collapse)Author
2022-05-13Drop KNS3 prefix for KMoreTools includesAlexander Lohnau
In KF6 KMoreTools should become it's own library and thus the KNS3 prefix should get removed. Considering that the classes are not in any namespace, having a namespaced include is not needed and only causes noise.
2022-04-02Refactor DolphinContextMenu so its actions are retrievableFelix Ernst
This mostly red MR should have no visible effect. It is part of my work towards !273. There are two calls necessary to open the DolphinContextMenu: One to construct it and one to execute/show it. Before this commit, the actual populating of the ContextMenu was done on execute. This meant that the actions of the ContextMenu couldn't be looked at or changed without first showing the Menu to the user. It also meant that the construction itself didn't actually do much constructing/populating at all which might seem a bit unintuitive. This commit changes this behaviour so the DolphinContextMenu is actually populated fully on construction. The executing/showing of the ContextMenu now does just that and nothing more. Previously, some actions in the context menu were actually not wired up to anything and instead the DolphinContextMenu or the DolphinMainWindow executed some code after the user had clicked such a dummy action from the ContextMenu. Now all the actions are properly constructed beforehand and no special handling is necessary when the ContextMenu hides itself. This commit removes the pos parameter from the DolphinContextMenu constructor. This parameter contained the position where the Menu would be shown later. This information isn't necessary to have on construction and was already part of the exec(pos) call in the first place. The variable m_pos that stored the value is removed. This commit also removes a "customActions" functionality that can supposedly be used to add further custom actions to the DolphinContextMenu but this functionality isn't ever used anywhere so its usefulness is questionable. It also wouldn't be difficult to re-add this functionality if it was ever required for something. This commit also addresses an old TODO in dolphinpart.cpp that asked for the calls for opening the DolphinContextMenu to actually contain the information for which items the DolphinContextMenu is supposed to be constructed. Before this, only the item that was directly clicked was transmitted and then DolphinContextMenu retrieved the currently selected set of items by itself. It makes more sense that DolphinContextMenu would be informed on construction which items it is supposed to show context actions for. Most of this is necessary so we are able to show the contextual actions anywhere else than in the ContextMenu in the future. I am targeting 22.08 with this MR because it makes no sense to merge a refactor for the upcoming release already.
2021-12-16Remove calls to no-op KNewFileMenu::setViewShowsHiddenFilesNicolas Fella
The implementation doesn't do anything
2021-12-16Remove deprecated call to KParts::PartBase::loadPlugins.Alexander Lohnau
With https://invent.kde.org/frameworks/kparts/-/merge_requests/32 this method got deprecated, and with https://invent.kde.org/network/konqueror/-/merge_requests/99 only the kget plugin is actually loaded. https://invent.kde.org/network/konqueror/-/merge_requests/100 Takes care of importing the kget plugin to konqueror.
2021-12-13Drop now unneeded QOverload statementsAlexander Lohnau
By defining the KF_DISABLE_DEPRECATED_BEFORE_AND_AT and QT_DISABLE_DEPRECATED_BEFOREvalues, the deprecated overloads are hidden. This way we only have the un-deprecated one visible.
2021-08-31Port to KTerminalLauncherJobNate Graham
Dolphin still uses KToolInvocation::invokeTerminal() which is deprecated and requires KInit. However Dolphin was ported away from requiring it in other ways, so it is now possible to have Dolphin running but not KInit, which breaks the "Open in Terminal" functionality. Using KTerminalLauncherJob fixes this. It was introduced in Frameworks 5.83, so the CMake dependency version is accordingly increased. BUG: 441072 FIXED-IN: 21.12
2021-07-19Use KDirLister directly now that it emits a jobError() signalAhmad Samir
Since KIO 5.82, KCoreDirLister (the base class of KDirLister) emits a jobError() signal when the ListJob used internally emits an error. Drop KFileItemModelDirLister class, now redundant. This also bump the KF version to 5.82.
2021-06-30Remove go action for settings kio slaveAlexander Lohnau
The settings kio slave is about to be removed, see https://invent.kde.org/network/kio-extras/-/merge_requests/107.
2021-02-10Port away from deprecated KToolInvocation::invokeTerminalNicolas Fella
2021-02-08Avoid KJob::exec() in DolphinViewFelix Ernst
This commit replaces an error-prone usage of KIO::StatJob::exec() in DolphinView with the recommended KIO::StatJob::start(). The containing method DolphinView::statusBarText() is changed to be a method without return value: requestStatusBarText() The new status bar text is instead returned through a new setStatusBarText() signal that will be emitted asynchronously if necessary. The calling code that deals with status bar text is refactored to correctly work despite the new asynchronicity. The helper method calculateItemCount() is moved into requestStatusBarText() and some other code from requestStatusBarText() is moved into a new helper method emitStatusBarText(). The documentation of KIO::KJob::exec() explains why it should be avoided. A reproducible crash is the reason for this commit.
2020-12-29update KParts' ReadOnlyPart::localFilePath in DolphinPart::openUrl()Piotr Henryk Dabrowski
2020-12-09operator+/- is disabled for QFlags in qt6Laurent Montel
2020-12-07dolphinpart: port to new KPluginMetaData-based KParts APIFriedrich W. H. Kossebau
2020-12-07dolphinpart: add JSON metadata to plugin, install into kf5/parts subdirFriedrich W. H. Kossebau
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-09-23Select/Unselect dialogue: Retain a history of entries made thereJonathan Marten
It's a very useful facilitity, and having a history of entries and being able to recall earlier ones makes it even more useful for repetitive operations.
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.
2020-05-06Port QRegExp to QRegularExpressionAhmad Samir
Summary: Port QRegExp::exactMatch() with QRegularExpression::anchoredPattern(). Port QRegExp::Wildcard with QRegularExpression::wildcardToRegularExpression(). Note that QRegularExpression::wildcardToRegularExpression() returns an anchored pattern. Test Plan: Using the filter bar in dolphin works as before. All unit tests pass, except: - kfileitemmodeltest (which is unrelated AFAICS); it fails on master too - placesitemmodeltest, which fails on master too Reviewers: #dolphin, elvisangelaccio, meven Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26215
2020-04-18DolphinPart: port dolphin's last use of KRun::run to CommandLauncherJob.David Faure
Summary: I chose CommandLauncherJob rather than ApplicationLauncherJob because that would require either looking up org.kde.kfind.desktop (with a risk of failure) or duplicating the icon name... Test Plan: commented out the if() block of the slot, to make sure we end up launching kfind with this code. Then konqueror /, and Ctrl+F. Reviewers: broulik Reviewed By: broulik Differential Revision: https://phabricator.kde.org/D28810
2019-12-21Use KParts::ReadOnlyPart::localFilePath() in DolphinPart::slotOpenTerminal()Piotr Henryk Dabrowski
Reviewers: ngraham, elvisangelaccio, #dolphin Reviewed By: ngraham, elvisangelaccio, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26140
2019-12-06Make it compile against last kf5 version without deprecated methodsLaurent Montel
2019-11-17[Dolphin] Open Preferred Search Tool actionPiotr Henryk Dabrowski
Summary: Added "Open Preferred Search Tool" action to Tools menu. It runs preferred (topmost) external search tool as configured in the "More Search Tools" menu. By default Ctrl+Shift+F shortcut is assigned to this action. FEATURE: 384798 FIXED-IN: 20.03.80 {F7134238} {F7134240} {F7134242} Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham Subscribers: pkloc, kfm-devel, kde-doc-english Tags: #dolphin, #documentation Differential Revision: https://phabricator.kde.org/D22594
2019-09-05Change terminal panel icon to dialog-scriptsNoah Davis
Summary: The old icon was a color icon, which does not match the style of other toolbar/menu buttons Test Plan: {F7321334, size=full}{F7321319} Reviewers: #dolphin, #vdg, ngraham Reviewed By: #dolphin, #vdg, ngraham Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23740
2019-05-05Get rid of ugly static_cast usages in connect() callsElvis Angelaccio
2018-10-24[DolphinViewActionHandler] Rename createDirectory signalElvis Angelaccio
Signals should be named after an event that happened.
2018-04-13Convert hard coded shortcuts to standard keysRoman Inflianskas
Test Plan: Check all changed shortcuts on all platforms. Reviewers: #dolphin, rizzitello, elvisangelaccio Reviewed By: #dolphin, rizzitello, elvisangelaccio Subscribers: anthonyfieroni, ngraham, elvisangelaccio, rizzitello, #dolphin Differential Revision: https://phabricator.kde.org/D11048
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
2018-03-03Modernize the syntax of shortcutsRoman Inflianskas
Reviewers: #dolphin, markg Reviewed By: markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10986
2018-01-21Don't show 'Open Terminal' on WindowsElvis Angelaccio
We already disable the TerminalPanel on Windows, we should do the same with the 'Open Terminal' action for consistency.
2017-11-21Modernize: Use nullptr everywhereKevin Funk
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-09Port to KStandardAction::RenameFileElvis Angelaccio
It was introduced in kconfig(widgets) 5.25. Using the standard action results in less code and no need to hardcode the F2 shortcut. Differential Revision: https://phabricator.kde.org/D6777
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-07-13Add missing emit keywordsElvis Angelaccio
GIT_SILENT
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-12-06Dolphin Part: Update the paste action at the end of the listingJonathan Marten
Fixes a problem with the paste action not being enabled, only seen in Konqueror. BUG:369523 REVIEW:129448
2016-09-28Follow changes in konqpopupmenu: no longer back/forward/up in part's ↵David Faure
contextmenu.
2016-05-26Port all instances of Kauthorized action/shell_command to shell_commandDavid Edmundson
The KAuthorized key to prevent shell access according the documentation is simply "shell_action" not "action/shellAction" so should use authorize not authorizeKAction This appears to have come about as part of a porting bug when going from KApplication::authorize to KAuthorized in kdelibs3 to kdelibs4. To currently block shell access a sysadmin currently needs to have both keys set already, so we can be confident it won't have any actual compatibility problems.
2016-05-18Don't allow opening the terminal if shell_access Kiosk mode is setDavid Edmundson
DolphinPart already did this. Dolphin itself didn't have this feature. REVIEW: 127951
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-02-27Fix build in a kdelibs4-free enviromentHrvoje Senjan
If one had kdelibs includes in /usr, they would get magically picked up, so the build would succeed.
2015-02-26Port away from KDELibs4Support (we only use KDELibs4Support when baloo isn't ↵Emmanuel Pescosta
present, because KFileMetaDataWidget is in KDELibs4Support) Reviewed-By: Vishesh Handa
2015-02-24Fix build on Jenkins (or with BUILD_TESTING=ON)Hrvoje Senjan
2015-02-24Fix the build of kde-baseapps temporarily (categorized logging in DolphinPart)Emmanuel Pescosta
2015-02-24Replace kDebug/kWarning by categorized logging (org.kde.dolphin)Emmanuel Pescosta
2014-12-25Remove unused libkonq includesDavid Faure
2014-12-14Port KInputDialog to QInputDialogEmmanuel Pescosta
2014-12-14Remove K_EXPORT_PLUGINEmmanuel Pescosta
2014-12-14port away from deprecated KFileItem(mode_t mode, mode_t permissions, const ↵Emmanuel Pescosta
QUrl &url, bool delayedMimeTypes = false);