┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.cpp
AgeCommit message (Collapse)Author
2024-05-08view: Add setting to trigger user set action with double clickGeorge Florea Bănuș
Default action is select-all.
2024-05-04DolphinView: Update selection on newly created item(s)Anthony Fieroni
Adjust paste to url to new KF6 signals BUG: 476670 Signed-off-by: Anthony Fieroni <[email protected]>
2024-04-09Fix saving sort role after change from headerFelix Ernst
This is a partial revert of 5186f09cabf0af4b0683e75b0bcde1061f84a67e. That commit tried to simplify code, however this lead to the saving of view properties being skipped, introducing the linked bug. The issue is that by the time the slotSortRoleChangedFromHeader() method is called, the model already changed its sort role. Therefore the check if the new role is identical to the old sort role fails and no saving would occur. With this partial revert the header will continue to change the sort role itself (which allows a minor optimization of not double sorting when also changing the sort order at the same time). The method slotSortRoleChangedFromHeader() is then only responsible for saving that change in the ViewProperties and telling the SortBy menu in the user interface that the sorting has changed. BUG: 480246
2024-01-16Fix: "empty folder" placeholder text eating mouse eventsJin Liu
BUG: 441070
2024-01-14Never emit the fileMiddleClickActivated signal if isTabsForFilesEnabled is trueStefano Crocco
Commit d27ee07d makes it impossible for applications embedding Dolphin part (for example, Konqueror) to react to middle mouse click on a file. If I understand correctly (I'm not familiar with Dolphin code) the `fileMiddleClickActivated` signal is connected with a slot in `DolphinViewContainer`, which is only used by Dolphin itself and not by `DolphinPart`. The result is that middle clicking on a file (except archives) from a Dolphin part has no effect. To avoid this situation, I removed the check for `!archiveProtocolIsEmpty()` in the `else if` condition. This way, if `isTabsForFilesEnabled()` is `true`, which should be true if and only if the view is inside a `DolphinPart`, the `activeTabRequested` or `tabRequested` signal will be emitted, allowing the embedding application to respond however it wants. When the view is inside the Dolphin application, instead, `isTabsForFilesEnabled()` will always be `false`, so the new behavior will be used.
2024-01-14DolphinView: Use SingleShot and Queued ConnectionsAmol Godbole
A minor refactor where Qt::SingleShotConnection has been utilized. Also, signal delay using QTimer has been replaced with a Qt::QueuedConnection.
2024-01-13Always automatically choose a new file name while duplicatingEugene Popov
Since now when duplicating items we automatically generate a name for the new item, we can do the same if an item with that name already exists. BUG: 475410
2024-01-06DolphinView: merge update functions into set functionsMéven Car
NO_CHANGELOG
2023-12-18DolphinView: Ensure to update the whole viewState after a job created filesMéven Car
BUG: 476670
2023-11-29Set style to nullptr before painting listviewAkseli Lahtinen
Resolves any possible dangling pointers if application style is changed after toggling the selection mode BUG:477288
2023-11-21dolphinview: Fix right-click on header whilst unfocusedOliver Beard
When the window is unfocused, there's no activeWindow and right-clicking on the header causes the menu to appear with window decorations.
2023-11-21dolphinview: Change case of status bar textOliver Beard
We should use lower case for this text, matching other strings (properties dialog, information panel).
2023-10-24Merge branch 'master' into kf6Nicolas Fella
2023-10-17KItemListView: add view position in scrollToItem()Amol Godbole
An item, on being scrolled to, is always located at the nearest edge of the view. This is not always convenient. Allow specifying where the item should be positioned with respect to the view in scrollToItem(). BUG: 423884
2023-10-12DolphinView: get rid of writeStateChanged signal in setActive()Amol Godbole
The signal writeStateChanged() was not working because it is not connected to slotWriteStateChanged() slots when the active view changes. Replace the signal with direct calls to the slots. Also, do not delay openRequest signal in DolphinSearchBox::slotSearchTextChanged. It's no longer required. BUG: 440366
2023-10-05Merge branch 'master' into kf6Nate Graham
2023-10-05Fix accessibility ancestor treeFelix Ernst
Before this commit, KItemListViewAccessible would always return nullptr as its parent. This meant that accessibility software would have to guess to which window/hierarchy the KItemListView belongs to. Guessing shouldn't be necessary here. This commit makes sure that the KItemListView always returns a sensible parent in the accessible hierarchy. It does so by explicitly setting the accessible parent for every KItemListView after construction in the DolphinView contructor. Since KItemListView now always knows about its accessible parent, the accessibleInterfaceFactory can always ask the KItemListView for that information when constructing the QAccessibleInterfaces. Fixes https://invent.kde.org/system/dolphin/-/issues/47.
2023-09-10Merge remote-tracking branch 'origin/master' into kf6Méven Car
2023-09-10Copy Location: Make sure to export path with native separatorsMéven Car
2023-09-05DolphinView: Reset scrollbars before changing view modeAmol Godbole
When view modes are changed, the scrollbars are not reset. This can cause the scroll area to be moved out of view after changing the view mode, making the view unusable. This commit resets the scrollbars. BUG: 393152
2023-08-29Fix a bunch of clazy warningsMéven Car
2023-08-28Use KMessageBox::warningContinueCancel when appropriateMéven Car
This will prevent saving the "Cancel" + "don't show again" result, which is meaningless.
2023-08-28Clean obsolete ifdefs since dolphin requires KF 5.101+Méven Car
2023-08-23Merge branch 'master' into kf6Méven Car
2023-08-23Allow to not ask again confirmation when opening 5 or more files or terminal ↵Felix Ernst
at once BUG: 473513
2023-08-23On middle-click, open file with the second application for the file mimeMéven Car
FEATURE: 390631
2023-08-10Merge branch 'master' into kf6Nicolas Fella
2023-08-03DolphinView: initialize m_controlWheelAccumulatedDeltaAmol Godbole
Ctrl + scroll wheel zoom was not working as designed after Dolphin is launched. Initialize m_controlWheelAccumulatedDelta in DolphinView's constructor. BUG: 469354
2023-08-01Fix incorrect file selection after file renameAmol Godbole
forceUrlsSelection() needs to be called only when new name of renamed file does not exist. BUG: 417930
2023-07-05Merge branch 'master' into kf6Nicolas Fella
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* 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
2023-06-29Use ellipsis everywhere instead of three dotsTem PQD
Better for screen readers etc.
2023-05-12Remove deprecated, ifdef'd code for old KIO versionsJakob Petsovits
2023-05-09Fix a bunch of Qt6/Kf6 warningsMéven Car
2023-04-25Fix test regression in DolphinMainWindowTest::testGoActionsMéven Car
2023-04-25Fix activating the Selection Mode with a keyboard shortcutEugene Popov
If a spacebar is used as a keyboard shortcut to activate the Selection Mode, then allow this shortcut to be triggered only if the view has a keyboard focus. BUG: 465489
2023-04-23Improve copying and moving items between panelsEugene Popov
Currently, copying the selected items between panels is performed by the active panel, which is wrong, because the inactive panel cannot select the copied items after the operation is completed (as it happens when drag'n'dropping or copying using keyboard shortcuts).
2023-04-20DolphinView: allow selectUrls to be considered for selection in more casesMéven Car
* when there is some selection already (some files were created previously) * when the model has not yet insert all the selectedUrls Also * Rename DolphinView::slotCopyingDone to slotItemCreatedFromJob BUG: 407161
2023-04-20Reuse existing proxy styleFelix Ernst
Before this commit, a new QProxyStyle was created every time the selection mode was enabled. The previously used one was automatically deleted in the process because of the std::unique_ptr re-assignment. This isn't really a problem in itself, but I strongly assume that the sudden deletion of the old style shortly before setting a new style might be the cause of the crash/bug 468548. This commit simply re-uses the previously created proxy style which doesn't seem to cause any behaviour change even when the application style has been changed in the time since the proxy style was created. Another potential solution might be to simply use deleteLater() on the old proxy style instead of letting std::unique_ptr delete the old proxy style instantly while it is still in use. That seems more involved than simply re-using the old style though. BUG: 468548 FIXED-IN: 23.08
2023-02-23Fix header index are colIndex and not roleIndexMéven Car
2023-02-21Fix typo in m_hoveredColumnHearderRoleIndexAleix Pol
2023-02-21Fix uninitialised valueAleix Pol
Do not read m_hoveredColumnHearderRoleIndex before it has been initialised. .6 0x00007fe00632182c in QList<KFileItemModel::RoleInfo>::Node::t (this=<optimized out>, this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:153 .7 QList<KFileItemModel::RoleInfo>::at (i=3080252, this=0x7ffdf2e9bba8) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:572 .8 DolphinView::eventFilter (this=0x5584bef25160, watched=0x5584bef8a300, event=0x7ffdf2e9bd30) at ./src/views/dolphinview.cpp:978 .9 0x00007fe003ebbdda in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .10 0x00007fe004b6c782 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 .11 0x00007fe004b75411 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 .12 0x00007fe003ebc07a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .13 0x00007fe004b72269 in QApplication::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 .14 0x00007fe004b6c793 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 .15 0x00007fe003ebc07a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .16 0x00007fe003f14e0b in QTimerInfoList::activateTimers() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .17 0x00007fe003f15754 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .18 0x00007fe001d20d3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 .19 0x00007fe001d756c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 .20 0x00007fe001d1e3e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 .21 0x00007fe003f15ad8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .22 0x00007fe003eba99b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .23 0x00007fe003ec2f34 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .24 0x00005584bd2a9aad in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:249 BUG: 466110
2023-02-18DolphinView: Allow to have tootips on columns headersMéven Car
Add events columnHovered/columnUnHovered to KItemListview and KItemListHeaderWidget.
2023-02-14Add new settings for permissions column formatSerg Podtynnyi
Ability to configure column for the file/dir permissions in Numeric(Octal)/Textual/Combined style and update field display style to be right-alighed. Add toolips to column menu items BUG: 227745
2023-02-09Fix zooming for high resolution scroll wheelsFriso Smit
BUG: 432671
2023-02-06Selects next item in list after delete/trash actionsSerg Podtynnyi
BUG: 419914 BUG: 181214
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-02-01dolphinview: Fix right click broken on placeholderLabelDavide Garberi
* This commit fixes the right click context menu not being shown whenever the click is made right on the placeholderLabel text Signed-off-by: Davide Garberi <[email protected]>
2022-11-30DolphinView: Add placeholder label for AFC kioKai Uwe Broulik
Similar to how it's special-cased for MTP
2022-11-29Exit the deleted directory when it is removedMéven Car
If current directory is a local file, try to find nearest dir ancestor and open it. Display warning to the user.