[vlc-commits] Qt: preferences, fix conflict detection.
Jean-Baptiste Kempf
git at videolan.org
Wed Nov 16 22:47:54 CET 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Nov 16 22:43:58 2011 +0100| [ae8b4b8188bff1e249f1fa6ab3ac41afb4420413] | committer: Jean-Baptiste Kempf
Qt: preferences, fix conflict detection.
Should close #3823 and #5052
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ae8b4b8188bff1e249f1fa6ab3ac41afb4420413
---
modules/gui/qt4/components/preferences_widgets.cpp | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp
index f26faf3..f9cf579 100644
--- a/modules/gui/qt4/components/preferences_widgets.cpp
+++ b/modules/gui/qt4/components/preferences_widgets.cpp
@@ -1545,16 +1545,16 @@ KeyInputDialog::KeyInputDialog( QTreeWidget *_table,
void KeyInputDialog::checkForConflicts( int i_vlckey )
{
- QList<QTreeWidgetItem *> conflictList =
- table->findItems( VLCKeyToString( i_vlckey ), Qt::MatchExactly,
- b_global ? 2 : 1 );
+ QList<QTreeWidgetItem *> conflictList =
+ table->findItems( VLCKeyToString( i_vlckey ), Qt::MatchExactly,
+ b_global ? 2 : 1 );
if( conflictList.count() &&
- conflictList[0]->data( b_global ? 2 : 1, Qt::UserRole ).toInt() > 1 )
- /* Avoid 0 or -1 that are the "Unset" states */
+ !conflictList[0]->data( b_global ? 2 : 1, Qt::UserRole ).toString().isEmpty() &&
+ conflictList[0]->data( b_global ? 2 : 1, Qt::UserRole ).toString() != "Unset" )
{
warning->setText( qtr("Warning: the key is already assigned to \"") +
- conflictList[0]->text( 0 ) + "\"" );
+ conflictList[0]->text( 0 ) + "\"" );
warning->show();
buttonBox->show();
More information about the vlc-commits
mailing list