┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.h
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2017-02-18 20:34:02 +0100
committerEmmanuel Pescosta <[email protected]>2017-02-18 20:34:02 +0100
commit41b0e4297313b6549f9178c77c30101a42b0525f (patch)
tree3cdf96e280dae625a31bfb60a048bb77205c806a /src/dolphinviewcontainer.h
parentccb3658b3aa7f5b0f0b71cb6e91808bdfe58af64 (diff)
Restore the view state after the URL of the DolphinView has been changed,
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.
Diffstat (limited to 'src/dolphinviewcontainer.h')
-rw-r--r--src/dolphinviewcontainer.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h
index 0b6a76d5e..e50386ab6 100644
--- a/src/dolphinviewcontainer.h
+++ b/src/dolphinviewcontainer.h
@@ -245,12 +245,6 @@ private slots:
void activate();
/**
- * Is invoked if the signal urlAboutToBeChanged() from the DolphinView
- * is emitted. Tries to save the view-state.
- */
- void slotViewUrlAboutToBeChanged(const QUrl& url);
-
- /**
* Is invoked if the signal urlAboutToBeChanged() from the URL navigator
* is emitted. Tries to save the view-state.
*/
@@ -278,8 +272,6 @@ private slots:
*/
void saveUrlCompletionMode(KCompletion::CompletionMode completion);
- void slotHistoryChanged();
-
void slotReturnPressed();
/**
@@ -313,6 +305,12 @@ private:
*/
void saveViewState();
+ /**
+ * Restores the state of the current view iff the URL navigator contains a
+ * non-empty location state.
+ */
+ void tryRestoreViewState();
+
private:
QVBoxLayout* m_topLayout;
KUrlNavigator* m_urlNavigator;