| Age | Commit message (Collapse) | Author |
|
Both objects start KIO jobs that can outlive the object if it is
destroyed before the job finishes. Store the pending job and call
kill(Quietly) in the destructor to avoid leaks and dangling callbacks.
|
|
teardown
Both singletons start KIO list jobs on construction. Register
qAddPostRoutine to destroy the owned objects during QCoreApplication
teardown, while KIO's KCoreDirListerCache can still cancel in-flight jobs.
|
|
KXMLGUIBuilder
Deleting konsolePart before QObject child cleanup ensures
m_konsolePartClientBuilder is still alive when the lambda connected
to m_terminalWidget::destroyed fires and calls factory->removeClient().
|
|
|
|
newHoveredWidget is already guarded non-null by the enclosing if-block;
!isAboveSelectionToggle is always true after the preceding early return.
Remove both dead sub-expressions.
|
|
zoomLevel() called twice returns the same value to static analysis.
Found with cppcheck
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
action is a by-value parameter; action = nullptr only affects the local copy.
Remove the dead line.
Found with cppcheck
|
|
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
|
|
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
|
|
Tests are now deterministic — flaky qWait(N) calls have been replaced
with signal-based waits and a lint rule prevents reintroduction.
The retry workaround is no longer needed.
|
|
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.
|
|
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.
|
|
|
|
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().
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
|
|
Qt 6.11 added its own middle click tab closing.
|
|
This reverts commit 980b09b92ae3061006526293c1e64bc399cdc07b
|
|
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
|
|
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.
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
(cherry picked from commit 632c991f6d975752f41457a3af865e21535a0999)
|
|
This regressed after bad63660b4c3253fdbd5fc3f989146519a7338b7.
This also could cause crashes when asserts are active.
|
|
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
|
|
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.
|
|
|
|
|
|
Otherwise the focus can be passed.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
This is prone to errors. CommandLauncherJob takes care of it with the
right syntax.
|