[vlc-commits] Qt: allow easy deletion of the keys and global key

Jean-Baptiste Kempf git at videolan.org
Tue Dec 13 22:55:26 CET 2011


vlc/vlc-1.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Dec 13 03:29:30 2011 +0100| [c246fa85a5bcbb443f3fd341d97f3b511ce4b444] | committer: Jean-Baptiste Kempf

Qt: allow easy deletion of the keys and global key

This was a regression of the new design
(cherry picked from commit e75a889e632b16a6c1b719025e6d9fcc8ba3b829)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=c246fa85a5bcbb443f3fd341d97f3b511ce4b444
---

 modules/gui/qt4/components/preferences_widgets.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index 289f4ae..1db7a9a 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -1492,6 +1492,12 @@ bool KeySelectorControl::eventFilter( QObject *obj, QEvent *e )
         selectKey( aTable->currentItem(), aTable->currentColumn() );
         return true;
     }
+    else if( keyEv->key() == Qt::Key_Delete )
+    {
+        aTable->currentItem()->setText( aTable->currentColumn(), NULL );
+        aTable->currentItem()->setData( aTable->currentColumn(), Qt::UserRole, QVariant() );
+        return true;
+    }
     else
         return false;
 }



More information about the vlc-commits mailing list