┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
8 daysDolphinView: store new zoom level in a variable after setZoomLevel()Sebastian Englbrecht
zoomLevel() called twice returns the same value to static analysis. Found with cppcheck
8 daysbarsecondrowflowlayout: avoid virtual call in destructorSebastian Englbrecht
cppcheck warns about calling virtual functions during destruction because dynamic dispatch is no longer reliable at that point. Replace takeAt(0) with direct access to itemList.takeFirst() to drain the list without going through the virtual interface.
8 dayskitemlistviewaccessible: avoid virtual call in constructorSebastian Englbrecht
cppcheck warns about calling virtual functions during construction because dynamic dispatch is not yet fully active at that point. Replace childCount() with its concrete implementation view()->model()->count() directly.
8 dayskitemlistcontrollertest: add drag-move hover signal testsSebastian Englbrecht
Two tests via new simulateDragMove/simulateDragLeave helpers: - testDragMoveHoverIdempotency: repeated drag-move over the same item must not emit itemHovered more than once; moving to a different item must emit itemUnhovered/itemHovered exactly once each. - testDragLeaveHoverCleanup: dragLeaveEvent must emit itemUnhovered for the currently hovered item and nothing when no item is hovered.
8 daystests: create smoke test for dolphinSebastian Englbrecht
10 daysDolphinRecentTabsMenu: remove no-op null assignment after deleteSebastian Englbrecht
action is a by-value parameter; action = nullptr only affects the local copy. Remove the dead line. Found with cppcheck
10 daysKItemListWidgetCreator, KFileItemModelFilter: delete copy operationsSebastian Englbrecht
Both classes own a raw pointer freed in the destructor. The implicit shallow copy would cause a double-free. Mark copy constructor and operator= as = delete. Found with cppcheck
10 daysMediaWidget, BottomBarContentsContainer: initialize members in constructorSebastian Englbrecht
m_autoPlay is read in setUrl() before setAutoPlay() is called; m_contents is compared before resetContents() sets it. Both are undefined behavior. Add initializers to the member-initialization lists. Found with cppcheck
11 daystests: add ctest lint rule forbidding bare QTest::qWait()Sebastian Englbrecht
Bare qWait(N) calls in tests are easy to reintroduce inadvertently. Add a ctest check that greps test sources for qWait() and fails if any call is found without an // UNAVOIDABLE: comment on the same line. The error message explains why the pattern is forbidden, lists the signal-based alternatives, and shows how to suppress the check for the rare cases where no signal or pollable condition exists.
11 daystests: replace QTest::qWait(N) with signal-based waitsSebastian Englbrecht
Fixed-time sleeps are a source of intermittent failures on slow CI machines — if the delay is too short, the test races ahead of the code under test. Replacements made: - dolphinmainwindowtest: qWait() calls replaced with QTRY_COMPARE, QTRY_VERIFY, qWaitFor lambdas and processEvents() where animations are disabled; one genuinely unavoidable timer wait marked // UNAVOIDABLE: - kitemlistcontrollerexpandtest: qWaitFor(..., 100ms) / qWaitFor(..., 300ms) replaced with spy->wait() loops that block until all expected directoryLoadingCompleted signals have arrived - kitemlistkeyboardsearchmanagertest: timer-driven wait marked // UNAVOIDABLE: (must wait for keyboard search timeout to expire) Add testhelpers.h providing TestHelpers::disableAnimations(), which eliminates the need for delays that previously waited for Qt UI animations to settle.
12 daysviewproperties: fall back to .directory when xattr space is exhaustedSebastian Englbrecht
When saving view properties to extended attributes failed with NoSpace, the code cleared the xattr entry and returned without writing anything to disk. The .directory fallback file was never created, silently losing the user's view settings. Fix by copying the current settings into a file-backed KConfig pointing to .directory whenever the xattr write returns NoSpace. The copy uses KConfigGroup::copyTo per group (not KConfig::copyFrom, which replaces the entire entry map) so that unrelated groups already present in .directory — such as a [Desktop Entry] group carrying a custom folder icon — are left untouched by sync().
13 daysviewproperties: respect saved properties for special folders with global ↵Pan Zhang
view props enabled When "Use common display style for all folders" is enabled, the useDefaultSettings condition was always true because useGlobalViewProps was the first term in the OR chain. This caused special folders controlled by useSearchView, useTrashView, and useRecentDocumentsView to reset to their default view on every load, overriding any user customization. Restrict the unconditional default-apply to non-special folders only. For special folders, the existing timestamp-based check handles the logic correctly, and the fallback in the else branch still applies defaults when no saved properties exist (first visit). BUG: 520089
13 daystests: kfileitemmodeltest avoid scheme-less urlMéven Car
2026-05-13kfileitemmodelrolesupdater: fix directory item count for large foldersPan Zhang
Dolphin reported an incorrect item count in the "Size" column for directories containing 200 or more entries. Use KIO::ListJob::ListFlag::ExcludeDotAndDotDot and ExcludeHidden to filter entries at the source. Use a local counter (totalCount) captured via std::shared_ptr in the lambda to ensure each scan job starts from zero and maintains its own state. Add a fast path using list.size() when showDirectoriesOnly is false to improve performance. BUG: 509150
2026-05-11dolphintabpage: drop swapActiveView in RightView close pathPan Zhang
The RightView case in setSplitViewEnabled(false) called swapActiveView() when the secondary (right) pane was active. After the swap, m_primaryViewContainer pointed to the right pane—the same object already stored in view—so the subsequent m_primaryViewContainer->setActive(true) activated the pane about to be removed, leaving the left pane orphaned as secondary. Since the left pane is always the surviving view and already the primary, no pointer swap is needed. Remove the conditional swap so that closing the right pane always leaves m_primaryViewContainer pointing at the left pane, regardless of which pane was active. BUG: 520002
2026-05-10dolphintabbar: remove tabClosedRequested handling for middle clickMéven Car
Qt 6.11 added its own middle click tab closing.
2026-05-10Revert "zoomwidgetactions: allow the zoom actions to appear in the commandbar"Méven Car
This reverts commit 980b09b92ae3061006526293c1e64bc399cdc07b
2026-05-10dolphinmainwindow: defer menuBar visibility apply until after UI has loadedOleksandr Bondar
The KXmlGuiWindow base class restores menuBar visibility directly via applyMainWindowSettings(), bypassing the ShowMenubar action's checked state. As a result, the action always reported checked=true on startup regardless of the saved setting. Sync the action's checked state from the actual menuBar visibility after setupGUI(), then apply it back via singleShot(0) to ensure all QueuedConnection slots have fired first Amends c3ef613f29dd256e1b6065f1c744241b6f69788a
2026-05-08KItemListWidget: stop overriding style‑provided background brushEvgeniy Harchenko
The previous implementation forced a custom background colour before delegating to the style's PE_PanelItemViewItem primitive. This interferes with theme‑specific drawing and results in a hard‑coded, non‑themed highlight that breaks styling across themes. Remove the explicit brush assignment, allowing the style to paint the background itself. The focus rectangle handling remains unchanged and is still drawn only for the active item. And pass the State_MouseOver to focus rect style option when hovered.
2026-05-07userfeedback: prevent dangling pointer access in SettingsDataSourceNicolas Fella
When the main window is closed m_mainWindow becomes dangling Since data collection happens infrequently we don't need to cache the window, just find it on demand BUG: 519876 SENTRY: DOLPHIN-VPX
2026-05-05Search: Fix title being displayed percent-encoded for baloosearchFelix Ernst
Prior to this commit, searching in Dolphin using "File Indexing" results in the location bar showing a percent-encoded title instead of a human-readable one.
2026-05-04GIT_SILENT Update Appstream for new releaseHeiko Becker
(cherry picked from commit 632c991f6d975752f41457a3af865e21535a0999)
2026-05-04panels/information: when not hovering anything show selectionMéven Car
This regressed after bad63660b4c3253fdbd5fc3f989146519a7338b7. This also could cause crashes when asserts are active.
2026-05-04Restore session if this is the first instanceSergey Katunin
1. Restore session if this is the first instance even with "new-window" option. Otherwise, if Dolphin has not been opened before, and a program (such as browsers or Kate) that launch Dolphin with "new-window" option will start Dolphin, it opens only with one tab and closes the user's previous session. With this patch, the behavior is similar to how the first instance of browsers opens with setting for tab recovery enabled. Also restore sessions if this is restoring multiple instances with session restoration after reboot enabled. 2. Dolphin should not restore all tabs for additional instances. This is especially noticeable if the "Keep a single Dolphin window, opening new folders in tabs" checkbox is turned off, and when the Dolphin window is already open (with several tabs), folders from the desktop (plasmashell) are opened by double-clicking. Desktop opens a new Dolphin window with the tabs restored and an open folder at the end. BUG: 464693 CCBUG: 448707 CCBUG: 469271
2026-05-04Dolphin::dolphinGuiInstances should skip daemon processSergey Katunin
This function should return a list without daemonized process, because it is a list of GUI instances. So, check whether the found DBus service can actually call requests for the path `/dolphin/Dolphin_1`, by calling `isActiveWindow()` method from this interface.
2026-05-02search/popup: hide the popup when launching kfindMéven Car
Otherwise the focus can be passed.
2026-04-29Search/Selectors: Prevent unexpectedly removing a chipFelix Ernst
One can close a chip by pressing the "X" close button on it. Prior to this commit, one could also close a chip somewhat unexpectedly by choosing an option from the Chip's dropdown. This commit removes any "empty" options from the Chips which would lead to the Chip disappearing. Example: Choosing "Any Rating" would remove the rating chip because it would no longer act as a restriction on what the search should find. Now the "Any Rating" option is not added to the Chip in the first place.
2026-04-27Show type-ahead typing feedback in the status barFelix Ernst
The typed keys are displayed in the status bar while also displaying which file name they were auto-completed to (i.e. which file was selected because of the typing). This commit contains some refactoring to keep the original status bar functionality working as expected. This commit also separates DolphinMainWindow from DolphinStatusBar which is great news architecture-wise. The status bar is encapsulated within the DolphinViewContainer.
2026-04-27Avoid string concatenation for command line buildingDavid Edmundson
This is prone to errors. CommandLauncherJob takes care of it with the right syntax.
2026-04-26Remove code for notifying about successful job completionFelix Ernst
Because of a bug these messages haven't reached users in years, and it seems it is better this way. Remove the dead code. Preparation for https://invent.kde.org/system/dolphin/-/merge_requests/1254
2026-04-26Fix occasional UAF crashes in KConfig::sync() during exitWendi Gan
Previously, c035e95 introduced `QtConcurrent::run` to execute `KConfig::sync()` in a separate thread. However, this introduced thread-safety issue: BUG 518433 (UAF caused by RC): During application exit, the main thread frees the old `s_sessionConfig` in `KMWSessionManager::saveState()` to create a new one. Meanwhile, the worker thread is still iterating over the old instance's entryMap during `KConfig::sync()`, leading to a Use-After-Free (UAF) crash. Changes: Copy the `config` in the main thread so `KConfig::sync()` can safely run in the worker. BUG: 518433 BUG: 516481 CCBUG: 425627
2026-04-24zoomwidgetactions: allow the zoom actions to appear in the commandbarMéven Car
kxmlgui KCommandBar uses QAction::menu() to construct its action list. Reuse the popupMenu as the menu, so KCommandbar finds zoom actions.
2026-04-20terminalpanel: allow refreshing the terminal locationAntti Savolainen
When a program is running on front while the graphical view is being changed, that can make the terminal and file view working directories out of sync. I wasn't able to find a signal from Konsole for when the foreground program exits, so having the terminal respond to F5 is the second best thing. BUG: 510557
2026-04-18dolphincontextmenu: move "Empty Trash" to where you expect destructive ↵Antti Savolainen
actions to be "Empty Trash" has caused me to delete files that I've wanted to restore. This moves the position to where you expect them to be. To my understanding the standard order in the context menu is: Creation operations Visual adjustments Destructive operations Misc. Settings | Before | After | Restore for comparison | |-|-|-| | ![image](/uploads/16e8bc66d3123be2f6ab598972d8be3c/image.png){width=185 height=144}| ![image](/uploads/fbcded1023c7133099b2dcddbd6c7bc3/image.png){width=225 height=161} | ![image](/uploads/8bdb39e0e21a9128204181d38acb0ed6/image.png){width=270 height=159} | BUG: 518713
2026-04-17dolphincontextmenu: Show 'Open Terminal Here' only for folders not for filesBrijesh krishna
2026-04-14dolphinnavigatorswidgetaction: Add "Open KDE Connect" buttonKai Uwe Broulik
When browsing kdeconnect scheme, offer to open the KDE Connect app to configure the devices. On the overview, the button just opens the app. When listing storage on a device, it opens the app directly with the given device.
2026-04-13KItemListRoleEditor: Remove document adjustSizeAkseli Lahtinen
This method would adjust the document to "reasonable size" but such size is set nowhere, nor there is any indication what is a reasonable size. This leads to the rename field being a lot wider than the actual item size, making it look broken. Removing this just keeps the document size same width as the widget itself, making it more sensible and less broken looking.
2026-04-12kitemviews: remove unused variable and add missing fallthrough annotationSebastian Englbrecht
Remove unused `referenceItem` variable in KFileItemModelRolesUpdater and add Q_FALLTHROUGH() annotation for intentional SingleSelection → MultiSelection fallthrough in KItemListController.
2026-04-12informationpanel: clear stale hover item on selection changeSebastian Englbrecht
Reset m_hoveredItem when a new selection is set, preventing the information panel from showing outdated hover data after selecting a different item
2026-04-12GIT_SILENT made messages (after extraction)l10n daemon script
2026-04-10SVN_SILENT made messages (.desktop file) - always resolve oursl10n daemon script
In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2026-04-10GIT_SILENT made messages (after extraction)l10n daemon script
2026-04-09SVN_SILENT made messages (.desktop file) - always resolve oursl10n daemon script
In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2026-04-08GIT_SILENT Update Appstream for new releaseHeiko Becker
(cherry picked from commit 707947a73a6c31097960a94c07aa0ee608ad4a65)
2026-04-07Revert "KItemListController: Use entire row for drag and drop if ↵Felix Ernst
highlightEntireRow is true" This reverts commit 17e55c976581aa58b4500e426fb2925a3d45c308, making drag and drops on non-selected item rows count as drops on the folder of the view, which was the intended behaviour. The commit being reverted here makes it very difficult to drag and drop items between Dolphin windows, tabs, and split views, whenever the view is full of items. Drag and drop should be a natural and easy interaction with the file system, aiming at the margins to the sides of the view to even be able to drop an item is IMO very uncomfortable. This was also directly pointed out by Cristoph Feck in the bug report https://bugs.kde.org/show_bug.cgi?id=515439#c4. The bug report also has only one active requester and no duplicates. This is insufficient reason to encumber such a basic behaviour as drag and drop.
2026-04-03dolphinmainwindow: use directly ShowMenubar actionOleksandr Bondar
to change menuBar visibility The menubar check was defined by menubar isHidden var. The logic has been reverted. The toggleShowMenuBar func was simply inverting the isVisible var. Now it's being set the menubar isChecked value. This led to testedObjectsSizeAfterTraversingForwards=10 instead of 11 (apparently there was a phantom object), so adjust the comparation in dolphinmainwindowtest. BUG: 492298
2026-04-02kfileitemmodel: sort dotted numeric names naturallyPan Zhang
Natural sorting already handled plain numeric chunks, but names containing dots between numeric segments were still ordered lexically in important cases. This broke expected ordering for decimal-style names like 0.09 and 0.1, and for version-like names such as v1.2.3 and v1.2.10. Teach KFileItemModel's natural string comparison to recognize dotted numeric chains instead of relying solely on QCollator's numeric mode. Compare two-part numeric chains (e.g. 0.09 vs 0.1) as decimal values, and compare longer chains segment by segment like version numbers, while still treating real file extensions separately so names like 1.09.txt keep working correctly. Add a direct unit test for KFileItemModel::stringCompare covering decimal-style names, version-like dotted numeric names, numeric basenames with extensions, leading-dot names, and the non-natural sorting fallback. BUG: 411707
2026-04-02dolphin/kitemlistwidget: Fix full selected state persisting on deselect with ↵Filip Fila
non-Breeze QStyles For non-Breeze QStyles Dolphin is currently drawing the full highlight effect for items even when they are deselected. The issues is that it treats keyboard focus as the same state as a selected state, resulting in a persisting highlight effect. This patch adds and extra check to paint `State_Selected` only when `m_selected` is true, thereby fixing the problem. **TEST PLAN** Tested with Oxygen, Fusion, Kvantum, Darkly, MS Windows 9x. - all of the styles had the issue with the full selected state persisting on mouse deselect - after this change all of the styles lost the full selected state and retained only their keyboard focus state **SCREENSHOTS** Before (MS Windows 9x): ![2026-03-29_21-42-03](/uploads/b369a63acb817a2b79e769a7c99a0378/2026-03-29_21-42-03.mp4) After (MS Windows 9x): ![2026-03-29_21-40-54](/uploads/b65230529dee7b552d58a1139353eca9/2026-03-29_21-40-54.mp4)
2026-04-02Refresh shortcut: Ignore repeat events Ritchie Frodomar
Disables auto-repeat on the action for refreshing Dolphin's file list, preventing flickering, when holding F5 pressed/long. BUG: 514209
2026-03-29KItemListWidget: Use primitives instead of custom paintingAkseli Lahtinen
We should avoid custom painting since that will cause issues with Union and other styles. We however still use the old hardcoded painting for Breeze style, which can be removed when Breeze 6.8 is released. For other styles, we draw using the primitives the QStyle provides. Also make the icon items less wider for better information density. CCBUG: 508294 BUG: 508465