┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.cpp
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2007-03-26 23:04:43 +0000
committerDavid Faure <[email protected]>2007-03-26 23:04:43 +0000
commit85bc196887fbed01187e3830cd28c2500cb01cb2 (patch)
tree98cde59002e2e1214e61a328c253ba58546bb532 /src/dolphinview.cpp
parentc6bc5511a8ba05d8f44217b404d615d4d56bb53f (diff)
Ported to KBookmarkManager::closestBookmark - which even solves another TODO about code duplication.
Improved urlnavigator API to avoid exposing the full QList (api independent from implementation now). svn path=/trunk/KDE/kdebase/apps/; revision=646954
Diffstat (limited to 'src/dolphinview.cpp')
-rw-r--r--src/dolphinview.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 23c91b9f4..17bbd608d 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -454,11 +454,6 @@ void DolphinView::setUrlEditable(bool editable)
m_urlNavigator->editUrl(editable);
}
-const QList<UrlNavigator::HistoryElem> DolphinView::urlHistory(int& index) const
-{
- return m_urlNavigator->history(index);
-}
-
bool DolphinView::hasSelection() const
{
return itemView()->selectionModel()->hasSelection();
@@ -771,15 +766,12 @@ void DolphinView::showPreview(const KFileItem* item, const QPixmap& pixmap)
void DolphinView::restoreContentsPos()
{
- int index = 0;
- const QList<UrlNavigator::HistoryElem> history = urlHistory(index);
- if (!history.isEmpty()) {
+ UrlNavigator::HistoryElem historyItem = m_urlNavigator->currentHistoryItem();
+ if (!historyItem.url().isEmpty()) {
QAbstractItemView* view = itemView();
- // TODO: view->setCurrentItem(history[index].currentFileName());
-
- const UrlNavigator::HistoryElem& it = history[index];
- view->horizontalScrollBar()->setValue(it.contentsX());
- view->verticalScrollBar()->setValue(it.contentsY());
+ // TODO: view->setCurrentItem(historyItem.currentFileName());
+ view->horizontalScrollBar()->setValue(historyItem.contentsX());
+ view->verticalScrollBar()->setValue(historyItem.contentsY());
}
}