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

Jean-Baptiste Kempf git at videolan.org
Tue Dec 13 03:30:01 CET 2011


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

Qt: allow easy deletion of the keys and global key

This was a regression of the new design

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

 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