[vlc-commits] qt: Fix "Hide future errors"
Hugo Beauzée-Luyssen
git at videolan.org
Fri Mar 9 15:10:36 CET 2018
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Mar 8 16:53:01 2018 +0100| [3713636527ac3678316bed90f1b990f62cb2e826] | committer: Hugo Beauzée-Luyssen
qt: Fix "Hide future errors"
Fix #19726
(cherry picked from commit ff83c22b6d70c7df3d4f661bde100b84f3a7ed4a)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=3713636527ac3678316bed90f1b990f62cb2e826
---
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 698c4c7d91..ad568f04f5 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( p_intf, "qt-show-errors", 0 );
+ config_PutInt( p_intf, "qt-error-dialogs", 0 );
}
}
More information about the vlc-commits
mailing list