X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/87594350e88d630c5de58b2a73128b63ebfcc070..ed0df8dc1fc9576e36c920882e7f4b00a2811113:/src/dolphinsearchbox.cpp diff --git a/src/dolphinsearchbox.cpp b/src/dolphinsearchbox.cpp index cc305599f..d27b08014 100644 --- a/src/dolphinsearchbox.cpp +++ b/src/dolphinsearchbox.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -63,6 +64,10 @@ bool DolphinSearchBox::event(QEvent* event) { if (event->type() == QEvent::Polish) { m_searchInput->setFont(KGlobalSettings::generalFont()); + } else if (event->type() == QEvent::KeyPress) { + if (static_cast(event)->key() == Qt::Key_Escape) { + m_searchInput->clear(); + } } return QWidget::event(event); }