This allows us to speed up the compilation because we don't need to
build twice the source files we use in the unit tests.
Test Plan: Builds, dolphin works and tests pass.
Reviewers: emmanuelp, dfaure
Differential Revision: https://phabricator.kde.org/D5935
Summary: This enables us to run the tests on Windows.
Reviewers: elvisangelaccio, kfunk, dfaure
Reviewed By: elvisangelaccio
Subscribers: #konqueror, #dolphin
Differential Revision: https://phabricator.kde.org/D5810
Summary:
Now that we can use the metadata widgets in the tooltips, we can also
open the tags:// url if the user clicks some tag in a tooltip.
The behavior is now consistent with the metadata widget in the information panel.
Test Plan: Click a tag when the metadata tooltip shows up.
Reviewers: emmanuelp
Subscribers: #konqueror, #dolphin
Differential Revision: https://phabricator.kde.org/D5658
Up until now tag-values have appeared unsorted in the Tags column
when the selected View Mode is "Details".
In older versions of Dolphin (in KDE4) the tags-values were
alphabetically sorted in the Tags column, which means that back then
this was the desired behavior.
This commit restores this functionality.
BUG: 377589
FIXED-IN: 17.04.1
REVIEW: 130068
Summary:
Small regression in commit 68bb0ec22a. We need to use the new (standard)
name for the delete action, otherwise it won't be properly
enabled/disabled.
BUG: 378154
FIXED-IN: 17.03.90
Reviewers: emmanuelp
Differential Revision: https://phabricator.kde.org/D5248
This patch will cause a "New Window" command to open a new window with
the URL from the active view. Opening a new instance via launcher will
still open a new window with the URL specified in Startup settings.
This is the behavior in Windows 10 file explorer. The advantage is this
gives the user a way to open a new window with the current URL(New
Window) as well as a new window with URL specified in Startup
settings(new instance) whereas currently, there isn't an easy way to
open a new window with the current URL. You'd have to either open a new
window and copy and paste the URL, or open a new tab(which opens with
the same URL) and detach it. I'd much rather have the new window open
with the current URL and if what I wanted was the Startup URL I could
easily get there as it's already bookmarked.
REVIEW: 129973
KUser does quite a lot of stuff under the hood and also calls getpwuid which might block with network login.
Differential Revision: https://phabricator.kde.org/D5049
Summary:
point the knsrc providers file to the new kde store,
and port the servicemenuinstallation/servicemenudeinstallation
scripts to kf5 (they still were based on kde4-config)
BUG:376922
Test Plan:
downloaded some service menus (send to telegram, convert svg)
by the knewstuff ui available in the services page of config dialog
they get installed in the proper folder and work, uninstall works
Reviewers: #dolphin, emmanuelp
Reviewed By: #dolphin, emmanuelp
Subscribers: elvisangelaccio
Differential Revision: https://phabricator.kde.org/D5035
Summary:
It was introduced in kconfig 5.25 and it properly handles the shift+del
shortcut (together with kxmlgui >= 5.30). This allows us to drop the
custom delete shortcut as well as the shift+del workaround in
DolphinMainWindow.
Test Plan: Shift+Del still deletes files, without the 'ambiguous shortcut' warning dialog.
Reviewers: emmanuelp
Differential Revision: https://phabricator.kde.org/D5010
Summary:
This improves the discoverability of the diskspace menu, a feature
otherwise almost impossible to find.
Reviewers: gregormi, emmanuelp
Differential Revision: https://phabricator.kde.org/D4873
Instead of just assuming hidden files always start with a "."
The items were already filtered out but when showing hidden files they weren't painted at reduced opacity.
Differential Revision: https://phabricator.kde.org/D4978
Summary:
The current animation duration for smooth scrolling is 100 ms which feels as if there is no smooth scroll animation in the first place. Bumping this up to something like 300 ms seems to make the scrolling actually appear smooth.
Also, based on diff comments the easing curve is set to InOutQuart.
Test Plan: Built this change locally and tried scrolling a folder with many items both single step mouse wheel and also larger steps of the mouse wheel.
Reviewers: elvisangelaccio, emmanuelp
Reviewed By: emmanuelp
Subscribers: htietze, colomar, andreask, emmanuelp, elvisangelaccio
Differential Revision: https://phabricator.kde.org/D4560
There is a bug that can happen in the following situation:
- user right clicks to open a menu
- that context menu grabs input
- the QGrabphicsView also notes the mouse was pressed, but not that the
mouse was released because it doesn't have mouse events any more
- when a user clicks to dismiss the menu and then without moving clicks
quickly again to send, we don't get another press event because the
QGraphicsScene still thinks the mouse is pressed from the first time the
context menu was shown and
QGraphicsScenePrivate::lastMouseGrabberItemHasImplicitMouseGrab still
points to the old object.
This is a known bug in QGraphicsView and you can see
QGraphicsScenePrivate::sendMouseEvent has a workaround to reset the
lastMouseGrabberItemHasImplicitMouseGrab on mouse moves, with the
comment: "This is a temporary fix for until we get proper mouse
grab events."
Realistically this isn't going to happen in QGraphicsView now.
We do get a double click event though. By checking for double click
events we can grab those missed clicks. It doesn't cause any other side
effects because normally the context menu will fire after the first
click and this rarely gets processed.
REVIEW: 129960
The patch applies the shadow to all previews except for folders, fonts and
Win32 exe/dll previews, similar to how Windows and MacOS handles it.
REVIEW: 129918
that the selection can be changed after reloading of the current view.
Otherwise it is not possible to alter the selection without restarting a new
one.
Bug found by Martin Tobias Holmedahl Sandsmark
See also RR 128563
as stated in the documentation of KUrlNavigator::saveLocationState.
The historyChanged signal of the KUrlNavigator is emitted before the urlChanged
signal and so the view state restoring happens before the view URL has been
changed. This makes it impossible to save and restore the selected URLs, because
DolphinView::setUrl clears the list of selected items (which has been restored
right before). This changes removes the history changed slot and restores the
view state after the setUrl call.
Since commit 230fe13d1f this class is not a "tooltip" anymore, but just a
simple widget. Rename it to avoid future confusion.
Reviewers: emmanuelp
Differential Revision: https://phabricator.kde.org/D4451
If this KCM is disabled through KIOSK restriction opening it would result in an error message.
Hide the entry altogether in this case.
Differential Revision: https://phabricator.kde.org/D4502
KWindowSystem is no longer used since commit 230fe13d1f.
It was only pulled for `KWindowEffects::enableBlurBehind()`, which is
now in plasma-integration (triggered by KToolTipWidget).
Use the new KToolTipWidget class (introduced by kwidgetsaddons 5.30) as backend of ToolTipManager.
FileMetaDataToolTip becomes a simple widget used as content of the tooltip.
It is now possible to actually use the metadata widget shown inside the tooltips.
Tooltips are now functional on Wayland as well.
More information about KToolTipWidget in https://git.reviewboard.kde.org/r/129648/
BUG: 352276
BUG: 371223
FIXED-IN: 17.04.0
Closes T4980
Differential Revision: D4449
When mass-renaming files, you could end up with a a gazillion notifications of a finished move job.
This fixes this. Ideally we would have one job which had the rename jobs as subjobs to still get
progress info for the overall task.
Differential Revision: https://phabricator.kde.org/D4372
This code was added a long time ago in b1c9b5126d, but the commit
message doesn't explain why. If we remove it nothing seems to change and
we fix the ugly background on the scrollbar when Breeze draws a frame
around dockable panels.
BUG: 366203
FIXED-IN: 16.12.2
REVIEW: 129861
Enabling the 'duration' column in a folder with audio files did only show empty information. Properly initializing the QTime object fixes this.
Testing Done
Find a folder with audio files
Make sure that Baloo has indexed this folder
Open this folder in Dolphin, detail view, enable the Audio/Duration column
Unpatched Dolphin does not display audio duration, patched Dolphin does
Tested on Gentoo x86_64 with Qt 5.5.1, KF 5.21.0 and Arch x86_64 with Qt 5.6.0 and KF 5.21.0.
REVIEW: 127799
Additionally, moves the "More/Fewer options" button from right to left to reduce the mouse travelling distance when the dolphin is maximized on a large screen (see screenshots)
The current location url will be passed to the search tool to set the initial search root directory.
REVIEW: 123883
This is merge of #128964 and #128942. This will impelement changing the "Date" field to "Modified" and allow a new "Accessed" time field to be available. This also includes changes to update configuration files.
REVIEW: 129077
Everything is already set up to show the directory loading progress in the status bar, but the signal KFileItemModel::directoryLoadingProgress is never emmited anywhere. I connected it to KFileItemModelDirLister::percent.
This was difficult to test because I had a hard time finding a directory that didn't load almost immediately. I was able to verify the fix by listing a remote directory of 20,000 files (see screenshot)
REVIEW: 129619
Once KIO::iconNameForUrl returns special icons for standard paths (e.g. Video folder)
this will ensure when adding such a folder to places it will automatically get the proper icon.
Since KIO already depends on KBookmarks it can't depend the other way round, otherwise
this would have been fixed in KBookmarks directly.
Differential Revision: https://phabricator.kde.org/D3896
Everything was handling palette change already but for the visual distinction between
active and non-active view (in case of split view), a custom palette was set which was
then never updated. This could be seen by the label text color changing but not the view background.
Differential Revision: https://phabricator.kde.org/D3909
`isFolderWritable` is set in DolphinView::updateWritableState() according to
KFileItemListProperties::supportsWriting().
However, `writing=true` does not imply `makedir=true`,
in an ioslave's .protocol file. An example is the trash protocol.
So we need to enable the `create_dir` action only if the protocol is
actually able to create folders.
CCBUG: 332463
REVIEW: 129712
Correctly set the active status of views when changing tabs.
Before: Right click in home folder, see create new enabled, open tab, go
to /usr, right click and see it is disabled, switch back to first tab
and right click, and it is still disabled.
After: It is enabled and disabled as appropriate when switching tab.
REVIEW: 129664
The test was not saving its changes to the global settings, so it was
passing on the CI only because the default value of GlobalViewProps is
already false. If GlobalViewProps was set to true instead, testAutoSave()
would fail because save() was not called and GlobalViewProps was not
Commit f688bcd1f1 fixed slow scrolling with xf86-input-libinput on DolphinView.
However the commit also exposed a bug in the Dolphin scrolling
algorithm, which was previously hidden. This resulted in slow
scrolling in dock panels (Places and Folders), with both
xf86-input-evdev and xf86-input-libinput drivers, as well as libinput on
Wayland.
KItemListContainer::updateScrollOffsetScrollBar() relied on the view's
itemSize() method to compute the scrollbar's singleStep, but this QSize
was invalid for the dock panels' views.
We use a new itemSizeHint() method instead, which is always valid and
also adapts to the current icon size set in the view.
BUG: 365968
FIXED-IN: 16.12.0
REVIEW: 129409
By setting a parent for the QDialogButtonBox we let QDialog handle everything by itself.
Also, store the dialog button box as a member rather than just the OK button.
This removes the need to set the OK button as default manually (which didn't work anyway)
and fixes pressing Return while the input is focused erroneously opening the folder browser
rather than accepting the dialog.
REVIEW: 129213
Documentation of QGuiApplication::keyboardModifiers() says that "It should
be noted this may not reflect the actual keys held on the input device at
the time of calling but rather the modifiers as last reported in one of
the above events".
Since this method is called in DolphinContextMenu's keyPressEvent()
and keyReleaseEvent(), the first time that keyboardModifiers() is
called it doesn't report that shift has been pressed.
Replacing this method with queryKeyboardModifiers() does the job
because the latter doesn't care about the event queue.
BUG: 354301
FIXED-IN: 16.08.2
REVIEW: 128972
Commit d48b733 introduced support for kfileitemaction plugins with json
metadata, but forgot to filter them by the commonMimeType (like
KMimeTypeTrader::query() does with old-style plugins).
So we need to load a plugin only when commonMimeType is equal to (or child of) one
of the mimetypes supported by the plugin.
Otherwise KRun opens a separate instance for every URL passed although Dolphin
already has logic to open different folders in tabs if neccessary.
REVIEW: 128306
The KAuthorized key to prevent shell access according the documentation
is simply "shell_action" not "action/shellAction" so should use
authorize not authorizeKAction
This appears to have come about as part of a porting bug when going from
KApplication::authorize to KAuthorized in kdelibs3 to kdelibs4.
To currently block shell access a sysadmin currently needs to
have both keys set already, so we can be confident it won't have any
actual compatibility problems.
KPluginLoader::instantiatePlugins() wraps QPluginLoader::instace(),
which doesn't return a new object for each call, so if we set the
KFileItemModelRolesUpdater instance as parent to the plugin the shared
instance will be deleted leading to crashes when other instances of
KFileItemModelRolesUpdater tries to use their plugin objects.
To fix this, set the QApplication as a parent.
BUG: 357479
REVIEW: 127930
KPluginLoader::instantiatePlugins() wraps QPluginLoader::instace(),
which doesn't return a new object for each call, so if we set the
KFileItemModelRolesUpdater instance as parent to the plugin the shared
instance will be deleted leading to crashes when other instances of
KFileItemModelRolesUpdater tries to use their plugin objects.
To fix this, set the QApplication as a parent.
BUG: 357479
REVIEW: 127930
Since now the breeze icons can be recolored by kiconloader
with svg stylesheets, use this feature to recolor the
currently selected icon in the sidebar and in the
details view (not the icon view)
look wouldn't change if used with icon themes that
don't support this feature
This makes it look more in line with the breeze style
REVIEW:127877
The default fallback of QIcon::fromTheme() is QIcon(), i.e. a null icon.
Set the generic "unknown" icon as fallback to prevent missing icons for
filetypes that specify an icon name that doesn't exist.
This also gets rid of "QPixmap::scaled: Pixmap is a null pixmap"
warnings in that case.
BUG: 358958
BUG: 361034
FIXED-IN: 16.04.1
REVIEW: 127713
Dolphin users can now choose between 3 different sorting modes:
* natural sorting
* case insensitive sorting
* case sensitive sorting
REVIEW: 126467
BUG: 148550
FIXED-IN: 16.04.0
This prevents that the setup of the PlacesItemModel queries Solid for
the available devices, which can take some time.
Places can be added multiple times now using the context menu, but this
has always been possible with drag and drop anyway.
See https://forum.kde.org/viewtopic.php?f=223&t=130617 for a dicsussion
on this topic.
REVIEW: 126904
qApp->isSessionRestored() specifies whether the application has been
restored by session management. This is obviously wrong here. Use
qApp->isSavingSession() instead.
BUG: 353548
FIXED-IN: 15.12.2
REVIEW: 126917
This is not necessary because the sub menus are children of the main
menu, such that they are deleted together with the other actions by
QMenu::clear().
This prevents a crash that can happen if a sub menu is open while
another menu action is clicked.
Thanks to Fabian Vogt and Wolfgang Bauer for investigating this issue!
BUG: 354558
FIXED-IN: 15.12.2
REVIEW: 126693
when setting a different "mouse wheel scrolls by" value in the
mouse kcm, the user expects every view to scroll more or less
accordingly (even if it's not strictlya text view)
This makes the scroll in dolphin take that into account
REVIEW:126718
dolphin is using
-DTRANSLATION_DOMAIN=\"dolphin\"
that is wrong for applications, apps need to use
KLocalizedString::setApplicationDomain
since that makes some other things like the transltators tab in the about
dialog show.
I have not removed -DTRANSLATION_DOMAIN=\"dolphin\" because on the other hand
this code is also a library (i.e. the dolphin kpart).
The "being pedandly correct" fix would be using -DTRANSLATION_DOMAIN=\"dolphin\"
only to compile the files that are part of the kpart but that's prone to
break at some point and using both KLocalizedString::setApplicationDomain and
-DTRANSLATION_DOMAIN does not create any problem so i went that route
CCMAIL: kfm-devel@kde.org
addType("File") will create a invalid query for baloo. Currently seems
there is no replacement for it, so just remove it.
REVIEW: 126109
FIXED-IN: 15.12
BUG: 348902
This prevents that the new widths are written to disk multiple times in
quick succession, which can make column resizing quite slow.
BUG: 351846
REVIEW: 351846
FIXED-IN: 15.08.1
KItemListSmoothScroller::handleWheelEvent has some issues:
1. When I scroll file list holding mouse over the list, one mouse wheel tick corresponds
to 1/4 page interval, but when I hover on QScrollBar, one wheel tick corresponds to
1 page interval.
2. In KItemListSmoothScroller::eventFilter we don't return true, so that QScrollBar also
handles this event, and total scroll interval is m_scrollBar->pageStep() +
m_scrollBar->singleStep().
3. When I use touchpad that supports smooth scrolling via XInput2, and I hover it over
QScrollBar, I can only scroll content if I move my fingers very fast, because
numSteps = event->delta() / 8 / 15 is just zero unless I move very fast
(event->delta() in this case is less than 120).
4. Holding Shift while scrolling has no effect when holding mouse over QScrollBar in
contrast to scrolling faster when holding mouse over file list.
The patch eliminates all these issues making the behavior of KItemListSmoothScroller the
same as in KItemListContainer::wheelEvent, adding support for QWheelEvent::pixelDelta()
and removing usage of deprecated QWheelEvent::delta().
REVIEW: 124670
FIXED-IN: 15.12.0
It appears that KF5TextEditor was added for KTextEdit, but that is actually
provided by KF5TextWidgets. It's then necessary to explicitly link to KF5Parts
(it was previously brought in implicitly by KF5TextEditor).
REVIEW: 124932
there are no headers being installed for the private library so it cannot
be linked anyway, so we can also skip the namelink creation (.so symlink)
REVIEW: 124812
Baloo is set to become a framework and wants to only export the bare
minimum number of classes as it will need to provide ABI + API
guarentees forever. The Term class is now no longer exported. It can be
added back again.
REVIEW: 123643
Commit 119f7a3f fixed a crash that was caused by the porting of the
natural sorting code to QCollator. QCollator is not thread-safe, so
every thread needs its own instance. However, that commit made every
recursive call in the sorting code create a new deep-copied QCollator
instance, which is quite expensive and thus made inserting any items
into the model very slow (this could also be seen in the KFileItemModel
benchmark).
This commit avoids unnecessary QCollator copying by forcing all sorting
functions which are called in the same thread to pass the 'lessThan'
object by const reference, such that no unnecessary copying of that
object, including a deep copy of the QCollator, takes place.
REVIEW: 123620
The benchmark inserted KFileItemLists of different sizes in the model.
The intention was to verify that an O(N^2) complexity issue was fixed.
However, now that this original problem does not exist any more, the
benchmark results are much easier to read, and regressions are much
easier to spot at first sight, if only a single list size is used.