]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinurlnavigator.cpp
SVN_SILENT made messages (.desktop file) - always resolve ours
[dolphin.git] / src / dolphinurlnavigator.cpp
index 3a40eea5c482fbefe777b8f24d5c413909138d82..5c32538b06b27dbbdf12d7556d24166d90ce5926 100644 (file)
@@ -16,6 +16,7 @@
 #include <KUrlComboBox>
 
 #include <QAbstractButton>
+#include <QKeyEvent>
 #include <QLabel>
 #include <QLayout>
 #include <QLineEdit>
@@ -145,4 +146,13 @@ void DolphinUrlNavigator::slotReturnPressed()
     }
 }
 
+void DolphinUrlNavigator::keyPressEvent(QKeyEvent *keyEvent)
+{
+    if (keyEvent->key() == Qt::Key_Escape && !isUrlEditable()) {
+        Q_EMIT requestToLoseFocus();
+        return;
+    }
+    KUrlNavigator::keyPressEvent(keyEvent);
+}
+
 #include "moc_dolphinurlnavigator.cpp"