[vlc-commits] qt: Fix "Hide future errors"

Hugo Beauzée-Luyssen git at videolan.org
Fri Mar 9 11:24:47 CET 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Mar  8 16:53:01 2018 +0100| [ff83c22b6d70c7df3d4f661bde100b84f3a7ed4a] | committer: Hugo Beauzée-Luyssen

qt: Fix "Hide future errors"

Fix #19726

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

 modules/gui/qt/dialogs/errors.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/dialogs/errors.cpp b/modules/gui/qt/dialogs/errors.cpp
index ddbc065531..900aeb12cd 100644
--- a/modules/gui/qt/dialogs/errors.cpp
+++ b/modules/gui/qt/dialogs/errors.cpp
@@ -52,6 +52,7 @@ ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf )
     messages->setReadOnly( true );
     messages->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
     stopShowing = new QCheckBox( qtr( "Hide future errors" ) );
+    stopShowing->setChecked( var_InheritInteger( p_intf, "qt-error-dialogs" ) != 0 );
 
     layout->addWidget( messages, 0, 0, 1, 3 );
     layout->addWidget( stopShowing, 1, 0 );
@@ -74,14 +75,14 @@ void ErrorsDialog::addError( const QString& title, const QString& text )
 
 void ErrorsDialog::add( bool error, const QString& title, const QString& text )
 {
-    if( stopShowing->isChecked() ) return;
     messages->textCursor().movePosition( QTextCursor::End );
     messages->setTextColor( error ? "red" : "yellow" );
     messages->insertPlainText( title + QString( ":\n" ) );
     messages->setTextColor( "black" );
     messages->insertPlainText( text + QString( "\n" ) );
     messages->ensureCursorVisible();
-    show();
+    if ( var_InheritInteger( p_intf, "qt-error-dialogs" ) != 0 )
+        show();
 }
 
 void ErrorsDialog::close()
@@ -98,6 +99,6 @@ void ErrorsDialog::dontShow()
 {
     if( stopShowing->isChecked() )
     {
-        config_PutInt( "qt-show-errors", 0 );
+        config_PutInt( "qt-error-dialogs", 0 );
     }
 }



More information about the vlc-commits mailing list