]> cloud.milkyroute.net Git - dolphin.git/commitdiff
search/bar: Use correct parent method in keyPressEvent
authorWang Yu <wangyu@uniontech.com>
Thu, 24 Jul 2025 06:11:16 +0000 (14:11 +0800)
committeryu wang <wangyu@uniontech.com>
Mon, 28 Jul 2025 01:45:45 +0000 (01:45 +0000)
Changed QWidget::keyReleaseEvent to QWidget::keyPressEvent to
match the actual event being handled.

src/search/bar.cpp

index 18707ef2363f3f15257a76101cb157770c092024..794274cef25a5ad4ddd612ff0ceda7332db610db 100644 (file)
@@ -275,7 +275,7 @@ void Bar::updateState(const std::shared_ptr<const DolphinQuery> &dolphinQuery)
 
 void Bar::keyPressEvent(QKeyEvent *event)
 {
-    QWidget::keyReleaseEvent(event);
+    QWidget::keyPressEvent(event);
     if (event->key() == Qt::Key_Escape) {
         if (m_searchTermEditor->text().isEmpty()) {
             setVisible(false, WithAnimation);