| Age | Commit message (Collapse) | Author |
|
The test created a file in a collapsed subtree and then waited five
seconds for an items-inserted signal that must never arrive, spending
that whole time on every run and making kfileitemmodeltest about three
times slower than it needs to be.
Create a file in the watched top directory instead and wait for its
insertion. Once that arrives the directory change has been processed and
the model has settled, so the collapsed file has had its chance to appear
and only the expected items are present. The sentinel stays as a
top-level sibling, so the later re-expansion expects it alongside the
restored subtree.
testInsertAfterExpand drops from about 4.9 seconds to 1.6 seconds and the
whole kfileitemmodeltest from about 7.2 seconds to 2.4 seconds.
|
|
testWindowTitle compares the window title against fixed strings such as
"Home" and "Trash". On a machine configured for another language the
title comes back translated, for example "Dossier Personnel", and the
test fails.
Set the language environment variables to English in main(), before
QApplication is constructed and before any translation is loaded, so the
comparisons are deterministic regardless of the machine's configured
language.
|
|
On Windows QFileInfo::isWritable() returns true for a directory that
carries the read-only attribute, because the attribute does not prevent
creating child files. It does prevent writing the directory's own
extended attribute, the Alternate Data Stream where the view properties
are stored, so the save fails with access denied and the settings are
lost.
Detect the read-only attribute with GetFileAttributesW and store the view
properties in the destination directory instead, the same way a directory
without write permission is handled on other platforms.
The read-only directory test checks that the properties land in the
destination directory.
|
|
dolphinmainwindowtest requires a real window server
no_bare_qwait_in_tests requires bash and only serves as lint, so linux only is OK
|
|
|
|
CCBUG: 499717
|
|
Replace the setting "Switch between views with Tab key" with a
dedicated "Focus Other View" action (which can be bound to the Tab key
if the user wants to).
The "Focus Other View" action moves the keyboard focus to the inactive
split view. When there is no other view, split view is triggered
instead. The action is located in `Menubar>View`.
### Motivation
The Tab key is essential for keyboard navigation within an application.
The old "Switch between views with Tab key" setting forces users to
give up on the intended purpose of the Tab key, which means many
keyboard-bound users currently do not have a way to switch between
views when using the "Split" feature. The dedicated "Focus Other View"
action gives users more control, and they can change the keyboard
shortcut as they are used to.
|
|
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"
|
|
Currently the code for the Dolphin chip, that gets used for filters with file indexing, is hardcoding Breeze.
We want it to support other styles too, all the while retaining the desired appearance for Breeze.
The port to use the `FrameLineEdit` accomplishes that. The results are that:
- Non-Breeze themes now get to style the chip properly
- the code is cleaner
- Breeze even looks better since there is no more of this hover glitch:
{width=173 height=72}
| Breeze before | Breeze after |
| ------ | ------ |
| {width=613 height=120} | {width=642 height=139} |
| Oxygen before | Oxygen after |
| ------ | ------ |
| {width=616 height=106} | {width=621 height=103} |
| MSWindows9x before | MSWindows9x after |
| ------ | ------ |
| {width=618 height=99} | {width=606 height=89} |
|
|
The stat job started by showItemInfo() to describe the current folder ran
to completion on its own. When the panel was destroyed while the job was
still in flight, the job and the UI delegate it created outlived the panel.
Parent the job to the panel so QObject destruction aborts it instead.
|
|
The updater must not react to its own setData() changes, or it would
resolve the roles again. Instead of disconnecting slotItemsChanged()
around every setData() and reconnecting (a dozen times), add a
setModelData() helper that sets a guard while calling setData(), and
make slotItemsChanged() return early while it is set. The view still
gets itemsChanged and repaints.
This also drops a stray disconnect of itemsMoved (never reconnected)
that a hover-sequence block did while duplicating the itemsChanged
connection.
|
|
testThumbnailAfterRename waited for KFileItemModelRolesUpdater::previewJobFinished
after renaming a.jpg to b.jpg. That signal is only emitted when a new preview is
generated successfully (slotGotPreview), but a rename keeps the file's content and
its already-correct thumbnail, so whether a fresh preview job runs at all is timing-
and platform-dependent. On FreeBSD CI none is produced, so the wait timed out.
Assert the actual outcome instead: the renamed item still shows a non-null preview
pixmap. This passes whether the thumbnail is regenerated, inherited across the
rename, or cache-served, and still fails if a rename ever drops the preview.
|
|
When scrollTo() is asked to move to the position the scrollbar already
holds (clamped, e.g. an item at the bottom, or a sub-pixel offset), no
animation runs and scrollingStopped() was never emitted. Callers waiting
for it stayed blocked: KItemListView::scrollToItem() delegates to scrollTo
for any non-zero offset, and DolphinView::renameSelectedItems() only opens
the inline rename editor once scrollingStopped() arrives. So inline rename
silently did nothing for the affected items.
Emit scrollingStopped() in the no-op case too, and add a regression test.
|
|
KIO_VERSION and KFILEMETADATA_VERSION checks up to 6.23 are always true
given the Qt 6.4 / KF 6.23 minimum versions.
|
|
searchPlugin returns one of the observer-owned m_plugins, so m_currentPlugin
always aliases an entry in that list. Deleting m_currentPlugin in setModel
freed that object while leaving a dangling pointer in m_plugins, which the
next searchPlugin or actions call would dereference. setModel(nullptr) runs
on every directory change, so this was reachable when leaving a versioned
directory.
Make the observer the real owner: parent the plugins to it so QObject
deletes them, stop deleting the shared plugin in setModel (just clear the
current selection), and drop the matching delete in the destructor.
|
|
ButtonsWithSubMenuWidgetAction owned the QMenu (no parent, setMenu does not
take ownership) but had no destructor, so every folder context menu leaked
one QMenu and its overflow actions. Add a destructor that deletes it.
|
|
The button allows to restore to defaults, in case you are using the
per-folder view properties settings.
The button disables or enables itself whether or not it matches the
defaults view settings.
|
|
As the global file defines the defaults, it will always match the
isDefault filter.
In this case prevent the filter to remove its settings.
|
|
Add an explicit group role to Dolphin views so items can be grouped independently from the active sort role.
Previously, Dolphin's grouped view always used the current sort role as the grouping criterion. This meant that grouping and sorting were tied together, for example grouping by type also required sorting by type.
This change adds a separate Group By menu. It replaces the previous Show in Groups toggle and allows the user to disable grouping, keep the old Same as Sort behavior, or explicitly group by a selected criterion.
When an explicit group role is set, the model keeps groups stable and uses the normal sort role as a secondary key inside each group. The roles
updater also receives the active group role, so roles used only for grouping are still updated correctly.
BUG: 416134
CCBUG: 510670
CCBUG: 513235
CCBUG: 46393
|
|
|
|
navbar how they want
Currently when Dolphin's location bar is moved from the main toolbar, it stops being a nice `FrameLineEdit` that QStyles can style as they please.
That's because the current code is only adjusted for Breeze, which wants to fill the entire navbar frame with a plain rectangle.
Unfortunately, non-Breeze styles suffer from bad looks because this Breeze design is applied for them too.
In order to fix this, this MR restores the styling power back to QStyles by removing the rectangle, all the while keeping it for Breeze.
| Before (Breeze) | After (Breeze) |
| ------ | ------ |
|{width=698 height=134} | {width=715 height=138} |
| Before (Oxygen) | After (Oxygen) |
| ------ | ------ |
| {width=714 height=114} | {width=687 height=129} |
| Before (MSWindows9x) | After (MSWindows9x) |
| ------ | ------ |
| {width=715 height=107} | {width=702 height=100} |
| Before (Darkly) | After (Darkly) |
| ------ | ------ |
| {width=675 height=123} | {width=705 height=144} |
| Before (Fusion) | After (Fusion) |
| ------ | ------ |
| {width=701 height=118} | {width=692 height=122} |
| Before (Kvantum) | After (Kvantum) |
| ------ | ------ |
| {width=697 height=135} | {width=700 height=123} |
BUG: 518285
FIXED-IN:
|
|
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"
|
|
|
|
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"
|
|
Postfix increment creates an unnecessary temporary copy.
|
|
Returning a QPointer<T> where T* is expected relies on an implicit
conversion that cppcheck cannot model correctly. Use .data() to make
the intent explicit.
|
|
exec() runs a nested event loop that can destroy the parent widget, so
the post-exec null-check on the QPointer is intentional, not redundant.
dolphinmainwindow: replace `if (contextMenu) deleteLater()` with
`delete contextMenu`. QPointer returns nullptr for a destroyed object,
making delete a safe no-op.
dolphinview: capture the menu as a raw pointer for pre-exec setup;
reserve the QPointer for the post-exec liveness check and deletion.
|
|
|
|
|
|
When items were pressed, we never called the
updateAdditionalInfoTextColor, which caused
some of the text colors get out of sync.
This was especially noticeable in details view
when using an accent color that makes the font
color change to preserve readability.
BUG: 508329
|
|
(cherry picked from commit ecdffe5fff8439e91249067b0a80190a7fa158ce)
|
|
This commit removes the "Play" arrow on top of the video preview.
There is no change to behavior.
Motivation:
There is already the play button and seekbar directly below the
thumbnail, and when mousing over it you get the pointing hand. Surely
this gives the user enough clues that the video can be previewed
in-place.
|
|
In a fresh test environment there is no saved session, so the places panel may
not be visible. Explicitly show it before testing.
Additionally, focus-related assertions require the window to be the active
window — setFocus() on dock widget contents has no effect on an inactive window.
Replace the weak QTRY_VERIFY_WITH_TIMEOUT(activeWindow() != nullptr, 100) with
requestActivate() + qWaitForWindowActive() to enforce this precondition.
|
|
Dolphin was missing copyright and license information on ~750 files,
which would cause the KDE CI job `gitlab-templates/reuse-lint.yml` to fail.
This commit makes the project fully compliant with REUSE Specification 3.3.
REUSE.toml is used for file categories that cannot carry inline comments
or are managed externally:
- po/**: covered with precedence=aggregate so the bulk declaration
combines with individual translators' existing inline headers
- **/*.kcfg, **/*.kcfgc: KConfigXT schema files, no comment syntax
- doc/*.png: documentation screenshots
- src/icons/*.png: application icons (LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL)
- src/**/*.{qrc,rc,desktop,xml,json,knsrc,upd,in}: resource and
metadata files without usable comment syntax
- .gitignore, .git-blame-ignore-revs: infrastructure, CC0-1.0
- logo.png: application artwork (LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL)
Inline SPDX headers are added to all source files that support comments
(C++, QML, CMake, shell scripts, Python). A small number of remaining
binary or single-purpose files retain individual .license sidecars.
License inference heuristic (applied per file, in order):
1. Existing inline SPDX-License-Identifier — reused as-is
2. Most common license among sibling files in the same directory
that already carry SPDX info, excluding infrastructure filenames
(.gitignore etc.) and requiring at least two qualifying neighbors
to prevent a single CC0 CI config from pulling source files along
3. Default: GPL-2.0-or-later
Copyright years and authors are sourced from `git log --follow` per
file. Automation accounts (l10n daemon [email protected], Weblate) are
excluded from author lists. If more than 5 authors are found only a
generic KDE Contributors was used.
|
|
Parent QMenu to the main window so it is owned and deleted with it.
Register KItemListContainerAccessible in Qt's accessibility cache so
Qt takes ownership and deletes it with the container widget.
|
|
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
|
|
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.
|