diff options
| author | arnav dhamija <[email protected]> | 2016-11-02 21:49:11 +0530 |
|---|---|---|
| committer | arnav dhamija <[email protected]> | 2016-11-02 21:49:11 +0530 |
| commit | e7f6a1010ac07dfddaaa75a372dbeaa6d0352731 (patch) | |
| tree | e796cc4f2df36ba7df2fa90bd5a8cc5fdf0a1ab6 | |
| parent | ee1231541a306bb5874426fe2db5451539983132 (diff) | |
Changed default arg for the setSplitViewEnabled
| -rw-r--r-- | src/dolphinmainwindow.cpp | 2 | ||||
| -rw-r--r-- | src/dolphintabpage.cpp | 4 | ||||
| -rw-r--r-- | src/dolphintabpage.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 687b30698..9817bf08a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -527,7 +527,7 @@ void DolphinMainWindow::toggleSplitView() void DolphinMainWindow::toggleSplitStash() { DolphinTabPage* tabPage = m_tabWidget->currentTabPage(); - tabPage->setSplitViewEnabled(!tabPage->splitViewEnabled(), true); + tabPage->setSplitViewEnabled(!tabPage->splitViewEnabled(), QUrl("stash:/")); } void DolphinMainWindow::reloadView() diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index 3491dbad8..9d239fdfc 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -71,13 +71,13 @@ bool DolphinTabPage::splitViewEnabled() const return m_splitViewEnabled; } -void DolphinTabPage::setSplitViewEnabled(bool enabled, bool stash /*= false*/) +void DolphinTabPage::setSplitViewEnabled(bool enabled, QUrl secondaryUrl /*= QUrl()*/) { if (m_splitViewEnabled != enabled) { m_splitViewEnabled = enabled; if (enabled) { - const QUrl& url = (stash) ? QUrl("stash:/") : m_primaryViewContainer->url(); + const QUrl& url = (secondaryUrl.isEmpty()) ? m_primaryViewContainer->url() : secondaryUrl; m_secondaryViewContainer = createViewContainer(url); const bool placesSelectorVisible = m_primaryViewContainer->urlNavigator()->isPlacesSelectorVisible(); diff --git a/src/dolphintabpage.h b/src/dolphintabpage.h index d14574561..023f216fc 100644 --- a/src/dolphintabpage.h +++ b/src/dolphintabpage.h @@ -50,7 +50,7 @@ public: * * If \a enabled is true, it creates a secondary view with the url of the primary view. */ - void setSplitViewEnabled(bool enabled, bool stash = false); + void setSplitViewEnabled(bool enabled, QUrl secondaryUrl = QUrl()); /** * @return The primary view containter. |
