[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde-workspace/plasma/sreich/tasks-qml] plasma/desktop/containments/desktop: Only printable characte
From:       Kai Uwe Broulik <kde () privat ! broulik ! de>
Date:       2012-04-07 13:32:46
Message-ID: 20120407133246.F1920A60BB () git ! kde ! org
[Download RAW message or body]

Git commit 68c222a1effd446a55556d269be0f8a12fb4f5fa by Kai Uwe Broulik.
Committed on 07/04/2012 at 15:26.
Pushed by broulik into branch 'plasma/sreich/tasks-qml'.

Only printable characters may trigger KRunner, otherwise a white-space is introduced
and the term you've entered is not recognized.

BUG: 285350
REVIEW: 104497
FIXED-IN: 4.8.3

M  +3    -1    plasma/desktop/containments/desktop/desktop.cpp

http://commits.kde.org/kde-workspace/68c222a1effd446a55556d269be0f8a12fb4f5fa

diff --git a/plasma/desktop/containments/desktop/desktop.cpp \
b/plasma/desktop/containments/desktop/desktop.cpp index 8bcb877..e5e02c0 100644
--- a/plasma/desktop/containments/desktop/desktop.cpp
+++ b/plasma/desktop/containments/desktop/desktop.cpp
@@ -174,7 +174,9 @@ void DefaultDesktop::dropEvent(QGraphicsSceneDragDropEvent \
*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");
         org::kde::krunner::App krunner(interface, "/App", \
QDBusConnection::sessionBus());  krunner.query(event->text());


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic