#6771 Regression Test: Replace QMessageBox with RiaLogging::errorInMessageBox

Fix typo


Includes
This commit is contained in:
Magne Sjaastad
2020-10-13 11:19:51 +02:00
parent ef1b5a3d89
commit 03f659df0c
38 changed files with 133 additions and 232 deletions

View File

@@ -17,12 +17,12 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RifElementPropertyReader.h"
#include "RiaLogging.h"
#include "cvfAssert.h"
#include <cmath>
#include <QMessageBox>
#include <QString>
//--------------------------------------------------------------------------------------------------
@@ -233,11 +233,7 @@ void RifElementPropertyReader::makeElementIdToIdxMap()
//--------------------------------------------------------------------------------------------------
void RifElementPropertyReader::outputWarningAboutWrongFileData()
{
QMessageBox msgBox;
msgBox.setIcon( QMessageBox::Warning );
QString warningText;
warningText = QString( "The chosen result property does not fit the model" );
msgBox.setText( warningText );
msgBox.setStandardButtons( QMessageBox::Ok );
msgBox.exec();
QString warningText = QString( "The chosen result property does not fit the model" );
RiaLogging::errorInMessageBox( nullptr, "Element Property Reader", warningText );
}

View File

@@ -20,10 +20,10 @@
#include "RiaGuiApplication.h"
#include "RiaLogging.h"
#include "RiaRegressionTestRunner.h"
#include "Riu3DMainWindowTools.h"
#include <QFile>
#include <QMessageBox>
#include <QStringList>
#include <algorithm>
@@ -64,27 +64,19 @@ std::map<QString, cvf::ref<RigWellPathFormations>>
if ( wellNames.empty() || formationNames.empty() )
{
if ( RiaGuiApplication::isRunning() )
{
QMessageBox::warning( Riu3DMainWindowTools::mainWindowWidget(),
"Import failure",
QString( "Failed to parse %1 as a well pick file" ).arg( filePath ) );
}
RiaLogging::error( QString( "Failed to parse %1 as a well pick file" ).arg( filePath ) );
RiaLogging::errorInMessageBox( Riu3DMainWindowTools::mainWindowWidget(),
"Import failure",
QString( "Failed to parse %1 as a well pick file" ).arg( filePath ) );
return result;
}
else if ( !( mdIsPresent || tvdIsPresent ) )
{
if ( RiaGuiApplication::isRunning() )
{
QMessageBox::warning( Riu3DMainWindowTools::mainWindowWidget(),
"Import failure",
QString( "Failed to parse %1 as a well pick file. Neither MD or TVD is present." )
.arg( filePath ) );
}
RiaLogging::error(
QString( "Failed to parse %1 as a well pick file. Neither MD or TVD is present." ).arg( filePath ) );
RiaLogging::errorInMessageBox( Riu3DMainWindowTools::mainWindowWidget(),
"Import failure",
QString(
"Failed to parse %1 as a well pick file. Neither MD or TVD is present." )
.arg( filePath ) );
return result;
}