Commit ccbe34ff authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Only printable characters may trigger KRunner, otherwise a white-space character

is introduced and the term you've entered is not recognized.
BUG: 285350
REVIEW: 104497
FIXED-IN: 4.8.3
(cherry picked from commit 48d18241)
parent e1232610
...@@ -174,7 +174,9 @@ void DefaultDesktop::dropEvent(QGraphicsSceneDragDropEvent *event) ...@@ -174,7 +174,9 @@ void DefaultDesktop::dropEvent(QGraphicsSceneDragDropEvent *event)
void DefaultDesktop::keyPressEvent(QKeyEvent *event) void DefaultDesktop::keyPressEvent(QKeyEvent *event)
{ {
if (focusItem() == this && !event->text().isEmpty()) { // Only printable characters may trigger KRunner, otherwise a white-space
// character is introduced and the term you've entered is not recognized
if (focusItem() == this && !event->text().isEmpty() && event->text()[0].isPrint()) {
const QString interface("org.kde.krunner"); const QString interface("org.kde.krunner");
org::kde::krunner::App krunner(interface, "/App", QDBusConnection::sessionBus()); org::kde::krunner::App krunner(interface, "/App", QDBusConnection::sessionBus());
krunner.query(event->text()); krunner.query(event->text());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment