┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2010-01-26 12:18:08 +0000
committerFrank Reininghaus <[email protected]>2010-01-26 12:18:08 +0000
commit17ff26c355adf945e143418c8bd756cf168d963b (patch)
treeaa5fd98f4b1008d8b782ee03268db57219ed01f8 /src/dolphinviewcontainer.cpp
parentad85be955bc34f9ed9aa69f4453f26f57bf85e04 (diff)
Reorganise some code in DolphinView and DolphinViewContainer. This
makes it possible to restore the expanded folders in the Details View when navigating in history (based on r1056438 and r1079843). Also remove DolphinView::activateItem(const KUrl&) and DolphinView's m_loadingDirectory member (they are not needed any more). This will be in KDE 4.5. BUG: 169886 svn path=/trunk/KDE/kdebase/apps/; revision=1080549
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
-rw-r--r--src/dolphinviewcontainer.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 8f4427cb9..89cf6cdbd 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -307,7 +307,6 @@ void DolphinViewContainer::slotDirListerCompleted()
} else {
updateStatusBar();
}
- QMetaObject::invokeMethod(this, "restoreViewState", Qt::QueuedConnection);
// Enable the 'File'->'Create New...' menu only if the directory
// supports writing.
@@ -369,13 +368,6 @@ void DolphinViewContainer::setNameFilter(const QString& nameFilter)
delayedStatusBarUpdate();
}
-void DolphinViewContainer::restoreViewState()
-{
- QByteArray locationState = m_urlNavigator->locationState();
- QDataStream stream(&locationState, QIODevice::ReadOnly);
- m_view->restoreState(stream);
-}
-
void DolphinViewContainer::activate()
{
setActive(true);
@@ -458,12 +450,11 @@ void DolphinViewContainer::saveUrlCompletionMode(KGlobalSettings::Completion com
void DolphinViewContainer::slotHistoryChanged()
{
- const int index = m_urlNavigator->historyIndex();
- if (index > 0) {
- // The "Go Forward" action is enabled. Try to mark
- // the previous directory as active item:
- const KUrl url = m_urlNavigator->locationUrl(index - 1);
- m_view->activateItem(url);
+ QByteArray locationState = m_urlNavigator->locationState();
+
+ if (!locationState.isEmpty()) {
+ QDataStream stream(&locationState, QIODevice::ReadOnly);
+ m_view->restoreState(stream);
}
}