┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinpart.cpp
AgeCommit message (Collapse)Author
2026-01-22clang-tidy: use default for trivial constructorMéven Car
2025-09-23GIT_SILENT: Don't duplicate headers between .h/.cppLaurent Montel
2025-02-03implement shortcut action for file creationChristian Schwarz
BUG: 462899
2025-01-07dolphinpart: fix a warning around = in lambdas for thisMéven Car
being deprecated in C++20.
2023-11-08Port away from KMoreToolsNicolas Fella
The idea behind KMoreTools was to point the user at external tools for a given job. It provides a rather complex framework for that, including suggesting not-yet-installed tools. The UX behind that isn't great though, which somewhat deep menu hierarchies and a somewhat arbitrary list of tools. Most KDE apps have moved away from it, with only Dolphin remaining. Instead provide direct integration with relevant KDE tools (Filelight, KDiskFree, KFind)
2023-11-08Adapt to KConfigGroup name officially being a QString typeFriedrich W. H. Kossebau
GIT_SILENT
2023-11-05Adapt to NavigationExtension API changeNicolas Fella
2023-11-05Remove obsolete Konqueror workaroundNicolas Fella
This isn't needed any more with recent Konqueror
2023-07-05Merge branch 'master' into kf6Nicolas Fella
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-06-29Use ellipsis everywhere instead of three dotsTem PQD
Better for screen readers etc.
2023-05-16Bring back the "Create New" menu in the menu barJakob Petsovits
This commit is the result of a three-way diff that combines my own initial patch with related changes from Felix Ernst's MR !545 and further suggestions by Méven Car. Fixes DolphinMainWindowTest::testNewFileMenuEnabled(). Tests are now passing again for my build. "Create New" was broken by commit c64059bd which switched to the new, non-deprecated KNewFileMenu constructor (kio commit 89bc6bad) that doesn't add itself to the passed KActionCollection parameter. After the switch, hamburger menu and context menu was still working as intended but the menu bar was missing the "Create New" menu. This commit adds the addAction("new_menu") call to the File menu setup that would have previously been called by the deprecated KNewFileMenu constructor. The corresponding test can now find the QObject for the menu's named action again, verifying its existence and enabled-ness like it did before. The DolphinNewFileMenu constructor's unused actionCollection parameter serves no use anymore except to confuse people. We replace it with a single QAction* parameter, createDirAction, which gets passed to setNewFolderShortcutAction(). 2 out of 3 constructor call sites have access to this action, while the remaining call site in dolphinmainwindow.cpp must wait until after it has been initialized by DolphinViewActionHandler. In this case, setNewFolderShortcutAction() is still called manually at a later time.
2023-05-12Remove deprecated, ifdef'd code for old KIO versionsJakob Petsovits
2023-05-07Port to Qt6Méven Car
2023-03-04Port away from deprecated KNewFileMenu ctorNicolas Fella
2023-03-04Port to KF6 KPartsDāvis Mosāns
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-08-14Better separation of classesFelix Ernst
Make obvious when actions trigger selection mode.
2022-07-14Port from KNewFileMenu::setPopupFiles to KNewFileMenu::setWorkingDirectoryNicolas Fella
The former is deprecated
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