Ctrl + scroll wheel zoom was not working as designed after Dolphin is launched. Initialize m_controlWheelAccumulatedDelta in DolphinView's constructor.
Jakob Petsovits [Mon, 24 Jul 2023 17:43:18 +0000 (13:43 -0400)]
KF6 Dolphin depends on kio-extras, for kcm_trash embedded in settings
When kio-extras is not installed (or kcm_trash.so exists, but
is outdated) then opening the "Configure Dolphin..." settings dialog
will crash. It tries to load kcm_trash with its old KCModule plugin
construction signature and gets a fatal symbol mismatch.
kcm_trash was recently moved from kio to kio-extras and is
unconditionally loaded in non-Windows environments, so that
dependency should be required in the metadata for kdesrc-build.
Add explicit moc includes to sources for moc-covered headers
* 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
Felix Ernst [Fri, 23 Jun 2023 17:07:10 +0000 (19:07 +0200)]
Move focus from hiding selection mode bars to view
When a user exits selection mode for example by clicking the "Exit
Selection Mode" button, the bar is closed but the focus doesn't return
to the view which would be expected. This commit actively moves the
focus to the view in such a scenario.
Méven Car [Fri, 26 May 2023 15:10:09 +0000 (15:10 +0000)]
KDirectoryContentsCounter: show intermediate dir size counting results, improve stopping, improve data caching
Two user visible changes:
* we can see the dir size changing as it is updated.
* This makes the file counting a lot more reactive, when changing directories for instance.
`KDirectoryContentsCounterWorker::walkDir` is not recursive anymore.
The cache is now shared and only a single thread is used to count size recursively.
Jakob Petsovits [Fri, 12 May 2023 22:13:39 +0000 (18:13 -0400)]
Bring back the "Create New" menu in the menu bar
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.