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

List:       kde-commits
Subject:    KDE/kdepim/libkdepim
From:       Allen Winter <winter () kde ! org>
Date:       2010-09-14 13:25:29
Message-ID: 20100914132529.079B5AC871 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1175208 by winterz:

forward port SVN commit 1174989 by winterz:

only process keyrelease events for key_up and kde_down in the eventFilter().
kolab/issue3879

doesn't solve the issue completely.


 M  +8 -3      addresseelineedit.cpp  


--- trunk/KDE/kdepim/libkdepim/addresseelineedit.cpp #1175207:1175208
@@ -1283,6 +1283,9 @@
       return true;
     }
     if ( keyEvent->key() == Qt::Key_Up ) {
+      if ( event->type() != QEvent::KeyRelease ) {
+        return true;
+      }
       //kDebug() <<"EVENTFILTER: Qt::Key_Up currentIndex=" << currentIndex;
       // figure out if the item we would be moving to is one we want
       // to ignore. If so, go one further
@@ -1308,10 +1311,12 @@
             item->setSelected( true );
           }
         }
-
+      }
         return true;
+    } else if ( keyEvent->key() == Qt::Key_Down ) {
+      if ( event->type() != QEvent::KeyRelease ) {
+        return true;
       }
-    } else if ( keyEvent->key() == Qt::Key_Down ) {
       // same strategy for downwards
       //kDebug() <<"EVENTFILTER: Qt::Key_Down. currentIndex=" << currentIndex;
       const QListWidgetItem *itemBelow = completionBox()->item( currentIndex );
@@ -1328,7 +1333,6 @@
             item->setSelected( true );
           }
         }
-
         return true;
       }
       // special case of the initial selection, which is unfortunately a header.
@@ -1339,6 +1343,7 @@
         completionBox()->setCurrentItem( item );
         item->setSelected( true );
       }
+      return true;
     } else if ( event->type() == QEvent::KeyRelease &&
                 ( keyEvent->key() == Qt::Key_Tab || keyEvent->key() == Qt::Key_Backtab ) ) {
       /// first, find the header of the current section
[prev in list] [next in list] [prev in thread] [next in thread] 

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