mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6771 Regression Test : Add errorInMessageBox
Show message box when running interactively. Never show message box if console mode or running regression tests
This commit is contained in:
@@ -35,7 +35,10 @@
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#include "QString"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
#include <QMessageBox>
|
||||
#include <QString>
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
@@ -247,6 +250,19 @@ void RiaLogging::debug( const QString& message )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaLogging::errorInMessageBox( QWidget* parent, const QString& title, const QString& text )
|
||||
{
|
||||
if ( RiaGuiApplication::isRunning() && !RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
|
||||
{
|
||||
QMessageBox::warning( parent, title, text );
|
||||
}
|
||||
|
||||
RiaLogging::error( text );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user