┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-10-16 22:37:50 +0200
committerFrank Reininghaus <[email protected]>2013-10-16 22:39:47 +0200
commit77fd0e771ac2e173438c98abc1725d1818b4b868 (patch)
tree1891ea70c0d634aaae5bc431a06ba575ea63b9d7 /src/views/dolphinview.cpp
parent011299eb6ee8397f9d716e2196801b748c511adb (diff)
Abort loading the current URL if the user presses Escape
BUG: 323181 FIXED-IN: 4.12.0 REVIEW: 113234
Diffstat (limited to 'src/views/dolphinview.cpp')
-rw-r--r--src/views/dolphinview.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index c1d245301..fd149e0f6 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -154,6 +154,7 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) :
connect(controller, SIGNAL(itemHovered(int)), this, SLOT(slotItemHovered(int)));
connect(controller, SIGNAL(itemUnhovered(int)), this, SLOT(slotItemUnhovered(int)));
connect(controller, SIGNAL(itemDropEvent(int,QGraphicsSceneDragDropEvent*)), this, SLOT(slotItemDropEvent(int,QGraphicsSceneDragDropEvent*)));
+ connect(controller, SIGNAL(escapePressed()), this, SLOT(stopLoading()));
connect(controller, SIGNAL(modelChanged(KItemModelBase*,KItemModelBase*)), this, SLOT(slotModelChanged(KItemModelBase*,KItemModelBase*)));
connect(m_model, SIGNAL(directoryLoadingStarted()), this, SLOT(slotDirectoryLoadingStarted()));
@@ -485,11 +486,6 @@ void DolphinView::reload()
restoreState(restoreStream);
}
-void DolphinView::stopLoading()
-{
- m_model->cancelDirectoryLoading();
-}
-
void DolphinView::readSettings()
{
const int oldZoomLevel = m_view->zoomLevel();
@@ -724,6 +720,11 @@ void DolphinView::pasteIntoFolder()
}
}
+void DolphinView::stopLoading()
+{
+ m_model->cancelDirectoryLoading();
+}
+
bool DolphinView::eventFilter(QObject* watched, QEvent* event)
{
switch (event->type()) {