┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabpage.cpp
AgeCommit message (Collapse)Author
2026-01-10Use Q_ASSERT instead of Q_CHECK_PTR for plain checks of pointer valueFriedrich W. H. Kossebau
Q_CHECK_PTR (other than the name suggests) is intended only to check the success of memory allocations. Using it for any pointers instead can be misleading due to the "Out of memory" log printed in case of hits.
2025-12-23dolphintabbpage: Allow migration for users with the old session file formatOliver Schramm
Commit 8d44699f introduced a new session file format, without providing a migration path for the old file format, which led to users losing their session. Besides adding the migration path, the condition check for future updates is necessary, since we don't provide guarantees for backwards-compatible format changes. In case users downgrade their Dolphin version/immutable distro or they share the Dolphin config file across multiple systems, Dolphin at least won't crash when reading a session file with a newer format. BUG: 513466
2025-12-03folderstabssettingspage: add 3 options for closing split viewRafał Lichwała
There is one bool setting in Dolphin Interface->Folders&Tabs->Split_view which determines which panel is closed on "Close split view" button click (currently focused or unfocused one). This commit replaces this setting with (enum-based) 3-state combo box. Since now we can set "When closing a split view" action to: - Close the active pane - Close the inactive pane - Close the right pane BUG: 464696 BUG: 186185
2025-11-27dolphinnavigatorswidgetaction: show focus indicator in split modeRafał Lichwała
This commit uses KUrlNavigator focus indicator to show sufficiently which panel (left or right) is currently active in split mode. This MR is based on KIO changes in https://invent.kde.org/frameworks/kio/-/merge_requests/2054 See discussion in MR: !1076 (comment 1334290), see https://invent.kde.org/frameworks/kio/-/merge_requests/2058 @teams/vdg ![Screenshot_20251117_232634.png](/uploads/2999f35fdc1c6dd359621c60d23460f2/Screenshot_20251117_232634.png){width=849 height=313} ![Screenshot_20251117_232704.png](/uploads/bd7b75f9159ab533b8e446781233e027/Screenshot_20251117_232704.png){width=849 height=313} ![Screenshot_20251117_232740.png](/uploads/e07153c1e9ae162ebc0ff3f09df1ac34/Screenshot_20251117_232740.png){width=849 height=313} ![Screenshot_20251117_232752.png](/uploads/ececd4c70c0e1f67145e2486d1cf21f2/Screenshot_20251117_232752.png){width=849 height=313} @teams/vdg BUG: 150718 BUG: 428440
2025-10-31dolphintabpage: save and restore splitter positionRafał Lichwała
This commit changes version number for save/restore tab state, because format has changed - m_splitterLastPosition is now also saved/restored BUG: 430705
2025-10-28dolphintabpage: when enabling split view without animation reset sizesMéven Car
of the splitter. So the previous size of a pontential leftover closed state does not apply initially. BUG: 510915
2025-10-03DolphinTabPage, DolphinView: Fix duplicate folder for MTP deviceWendi Gan
Issue: When opening an MTP device via the sidebar, Dolphin shows one "Internal shared storage" folder. However, clicking the entry again results in a duplicate folder being displayed. This regression was introduced by !865 (commit 6c7c047). Reason: The URL of an MTP device in the sidebar is `mtp:udi=/org/kde/solid/udev/sys/devices/...`. When clicking to open the MTP device, it is redirected to `mtp:/...`. - On the first click (no cache), `KCoreDirListerCache::slotUpdateResult()` calls `KCoreDirListerPrivate::emitItems()`. - On the second click (with cache), `KCoreDirListerCache::slotRedirection()` first calls `KCoreDirListerPrivate::emitItems()`. Besides, `DolphinTabPage::slotViewUrlRedirection()` calls `KCoreDirLister::openUrl()`, which triggers `CachedItemsJob::start()`, and eventually calls `KCoreDirListerPrivate::emitItems()` again. As a result, two `KCoreDirLister::itemsAdded` signals are emitted, causing `m_pendingItemsToInsert` to be appended twice. --- BUG 496414: Need to rename folder twice to make it reflect in the tab title. Reason: `m_url` is updated after emitting the `DolphinView::redirection` signal. It triggers `DolphinTabWidget::tabUrlChanged()`, which still uses the old URL and thus resets the tab title incorrectly. --- Change: - Revert the change in `DolphinTabPage::slotViewUrlRedirection()`. - Update `m_url` before `DolphinView::redirection` to fix BUG 496414. - Emit `DolphinView::urlChanged` signal to refresh the navigator of the inactive view. BUG: 506634 CCBUG: 497313 CCBUG: 496414
2025-09-19DolphinTabPage: Show separator when navigator is outside of menubarAkseli Lahtinen
When navigator is outside of menubar, we should show separator under it to make it visually easier to understand it's a clickable area. This adds a small separator, that will be disabled when the navigator is moved back to menubar. BUG: 508303
2025-02-06changed all calls to "title(), setTitle()" to "customLabel(), setCustomLabel()"ambar chakravartty
2025-02-06changes saveState() and restoreState() to restore renamed tabs (if any)ambar chakravartty
2025-02-06Apply 1 suggestion(s) to 1 file(s)ambar chakravartty
Co-authored-by: Méven Car <[email protected]>
2025-02-06Apply 1 suggestion(s) to 1 file(s)ambar chakravartty
Co-authored-by: Méven Car <[email protected]>
2025-02-06Removed unused imports to QUuid,quuidambar chakravartty
BUG: 197009
2025-02-06Added code for a "Rename Tab" feature.ambar chakravartty
BUG: 197009
2024-11-28DolphinTabPage: Update container view url on redirectionAkseli Lahtinen
On url redirect, we should check which container url is being changed and then update it accordingly. This makes sure the tab name is updated. We also should not disconnect redirection on view activation since the redirection might be used by the other split. The disconnection is done in `setSplitViewEnabled` instead. This allows us to update the tab name every time the url changes, even inside a splitview where the split which name is changed is not active. BUG:496414
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-04Update my eMail to the KDE-provided oneFelix Ernst
GIT_SILENT NO_CHANGELOG
2023-04-23Add DolphinTabPage::inactiveViewContainer()Eugene Popov
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-01-16Replace qswap with std::swapWillyanto Willyanto
Fixes obsolete function 'qSwap' called. It is recommended to use 'std::swap' instead. (CWE-477)
2022-09-26Remove unused includesLaurent Montel
2022-08-14Add Selection ModeFelix Ernst
The selection mode action is a checkable toggle action named "Select Files and Folders" which has "Space" as the default shortcut. In selection mode a bottom bar with contextual actions is shown. These should mostly mirror the actions which are available through the right-click context menu aka DolphinContextMenu. Resizing of the window might make a overflow button appear in the bottom selection mode bar. This commit makes press and hold in the view activate selection mode. This behaviour is not triggered if the press and hold is used to either start a rubberband selection or a drag operation within a short time. The length of the short timeframe is defined by a QStyleHint. This is currently not implemented in touch because I can't test it. Mix the selection mode bars' background colors using a nice combination of colors from the current color scheme BUG: 427202
2021-08-30[Split view] Reset splitter position on double clickEugene Popov
This commit makes Dolphin to reset the position of the Split View splitter on double-click. BUG: 206525 FIXED-IN: 21.12
2021-04-24Remove code for dolphin < 4.14 tab restoreAlexander Lohnau
The old config keys haven't been written for since KDE 4 times and has been internally marked as deprecated.
2021-01-06Fix location bar being wrongly aligned on first startupFelix Ernst
When starting Dolphin the very first time, the spacing in front of the location bar is wrong. This commit fixes this by completely updating all cached geometry every time adjustSpacing() is called. Because this happens once on a timer 100 ms after every url change, it will happen once shortly after the window is shown. At that point all geometry is where it should be and spacing calculation works as expected. The ViewContainer geometry retrieval is refactored into a small nested helper class in DolphinNavigatorsWidgetAction by the name ViewGeometriesHelper. Previously the logic of that class was divided between DolphinTabPage and DolphinNavigatorsWidgetAction. BUG: 429447 FIXED-IN: 21.04.0
2021-01-02Animate split view mode togglingFelix Ernst
Have the secondary ViewContainer slide into/out of view when split view mode is switched on or off by the user. This should help users understand what split view mode is about. Without the animation it might seem like the only thing the button does is creating a weird vertical line in the middle of the view or something. With the animation it should be clear that the second view is a separate entity that was added. The closing animation will help users understand which of the ViewContainers was just closed.
2020-11-19Allow having the UrlNavigators below the tab barFelix Ernst
This commit restores the possibility to have the UrlNavigators below the tab bar. This will happen automatically whenever the UrlNavigator is removed from the toolbar. It is also now again possible to have the toolbar on the side. This option is disabled while the toolbar contains the UrlNavigators. This commit makes no changes to the new default which is having the UrlNavigators in the toolbar but makes sure that upgrading users won't be affected.
2020-11-09Adress the third round of Angelaccio's review commentsFelix Ernst
Additionally remove some redundant code concerning UrlNavigator visuals.
2020-11-09Fix a crash and extract unrelated changesFelix Ernst
The secondary UrlNavigator is now created when and only when: - split view mode is activated for the active tab OR - switching to a tab that has split view already enabled. This fixes a crash that occurs when the setting to always start in split view mode is enabled. An animation for activating split view is also removed from this and moved into a separate MR. Another unrelated name change left over from a previous commit (viewContainers() -> activeViewContainers()) is dropped.
2020-11-09Make UrlNavigators in the toolbar the only optionFelix Ernst
The UrlNavigators will be automatically added to the toolbar. The Sort By action is removed from the default toolbar to make space. Remove all options to have UrlNavigators outside the toolbar and remove those code paths. Make it so the new NavigatorsWidgetAction contains two UrlNavigators when in split view mode. Spacing was also added to align these UrlNavigators with the ViewContainers when enough space is available. Force the toolbar to be either at the top or bottom of the window. Set a sane sizeHint for DolphinUrlNavigator. It would be better to do this in KUrlNavigator in the future. This commit also contains a changes which should be moved to a separate merge requests before this gets merged: - Add an expansion animation when split view is enabled by the user
2020-11-09Add the UrlNavigator to the toolbar automatically if neededFelix Ernst
This commit adds the DolphinUrlNavigatorWidgetAction::addToToolbarAndSave() method which changes the users toolbar configuration to contain an Url Navigator. This way the user doesn't need to do anything manually. Aside from that a bunch of minor fixes like renaming and reordering
2020-11-09Add an option to use an UrlNavigator in the toolbar insteadFelix Ernst
This commit adds a locationInToolbar KToggleAction to switch between using a location bar to navigate or using a new custom QWidgetAction in the toolbar. A big portion of this MR is refactoring because until now the UrlNavigator was tightly intertwined with the DolphinViewContainer. With this MR an UrlNavigator for controlling a View can be freely connected or disconnected with a single method call. A DolphinUrlNavigator class is created in the process which contains all Dolphin-specific UrlNavigator code which did previously reside in the DolphinViewContainer class. Other application parts that belong to UrlNavigator-management are also moved here.
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-02-27remove deprecated methodsLaurent Montel
2019-02-16Add option to choose which view to closeAngelo Oliveira Jr
Summary: This Diff make configurable which view will close when toggling off the split view mode, if it's the active one or the inactive one. A new checkbox was added to the Dolphin configuration window, and defaults to the original behavior. FEATURE: 312834 FIXED-IN: 19.03.80 Test Plan: {F6535432} Reviewers: ngraham, #dolphin, elvisangelaccio Reviewed By: ngraham, #dolphin Subscribers: elvisangelaccio, cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D18040
2019-01-16Abort updateWindowTitle and activeViewChanged if not changed.Chris Rizzitello
Summary: - Prevent activeViewChanged from updating the window if the view is the same view (happens at least once when starting up) - Stop updateWindowTitle from updating the title if its not changed. Reviewers: #dolphin, elvisangelaccio, broulik Reviewed By: #dolphin, elvisangelaccio, broulik Subscribers: anthonyfieroni, broulik, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17882
2019-01-05Fix title update when changing active split viewElvis Angelaccio
Summary: The DolphinTabPage::activeViewUrlChanged signal triggers the title update in DolphinMainWindow, which sets the new title from the `m_activeViewContainer` instance. This means we need to notify the main window that the active view changed before telling it that the current url changed. BUG: 402641 FIXED-IN: 18.12.1 Reviewers: #dolphin, rizzitello, ngraham Reviewed By: #dolphin, rizzitello, ngraham Subscribers: rizzitello, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17881
2018-04-25DolphinTabPage: deactivate secondary view after closing split viewElvis Angelaccio
We deactivate the previously active view container whenever we change the active split view, but we never do the same when we close the split view. Long term we should probably even delete the secondary view after closing the split view, because it will never be used again and the pointer will be overwritten the next time the user opens the split view.
2018-04-25Update window title after closing split viewRobert Jennings
Summary: In dolphintabpage.cpp: Through the connections set up in createViewContainer(), m_primaryViewContainer->setActive(true), at line 98, ends up triggering slotViewActivated(). Because m_primaryViewActive is true, oldActiveView is not set to the view needed in this particular situation. Both oldActiveView and newActiveView end up pointing to the same view and the connections are not set up. BUG: 385111 FIXED-IN: 18.04.1 Test Plan: 1. Open split view 2. Make left panel active 3. Close split view 4. Navigate to various directories Window title now updates to show current directory Also tried with multiple tabs/combinations Reviewers: #dolphin, ngraham Reviewed By: #dolphin, ngraham Subscribers: elvisangelaccio, ngraham Differential Revision: https://phabricator.kde.org/D12446
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-05-22Correct searchbox, split view transitions between tabsAnthony Fieroni
Differential Revision: https://phabricator.kde.org/D5864 BUG: 379135 BUG: 380032 FIXED-IN: 17.04.2 Signed-off-by: Anthony Fieroni <[email protected]>
2017-02-13fixed argarnav dhamija
2017-01-29Made more changesarnav dhamija
2016-11-02Changed default arg for the setSplitViewEnabledarnav dhamija
2016-09-27Changed shortcut, but need to fix async conditionsarnav dhamija
2016-09-26Added the GUI button for quick stashingarnav dhamija
2016-09-04Use tab for switching active splitMartin T. H. Sandsmark
REVIEW: 128564 REVIEW: 110970 BUGS: 171743
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771