[vlc-commits] Qt: add a shortcut to give the focus to the search entry in advanced prefs

Ludovic Fauvet git at videolan.org
Wed Jul 10 16:48:45 CEST 2013


vlc/vlc-2.1 | branch: master | Ludovic Fauvet <etix at videolan.org> | Tue Jul  9 00:33:39 2013 +0200| [19fb8488656f12aaeee1df24f4122346a7718a5c] | committer: Jean-Baptiste Kempf

Qt: add a shortcut to give the focus to the search entry in advanced prefs

(cherry picked from commit e7807a9e6266eca9fdee49488941b16adbe06fef)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt4/dialogs/preferences.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/gui/qt4/dialogs/preferences.cpp b/modules/gui/qt4/dialogs/preferences.cpp
index bfa421a..1a18445 100644
--- a/modules/gui/qt4/dialogs/preferences.cpp
+++ b/modules/gui/qt4/dialogs/preferences.cpp
@@ -43,6 +43,7 @@
 #include <QDialogButtonBox>
 #include <QStackedWidget>
 #include <QSplitter>
+#include <QShortcut>
 
 PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
             : QVLCDialog( parent, _p_intf )
@@ -165,6 +166,9 @@ void PrefsDialog::setAdvanced()
         CONNECT( current_filter, stateChanged(int),
                  this, onlyLoadedToggled() );
         advanced_tree_panel->layout()->addWidget( current_filter );
+
+        QShortcut *search = new QShortcut( QKeySequence( QKeySequence::Find ), tree_filter );
+        CONNECT( search, activated(), tree_filter, setFocus() );
     }
 
     /* If don't have already and advanced TREE, then create it */



More information about the vlc-commits mailing list