mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 09:00:20 -05:00
#13126 RiaLogging: Extract errorInMessageBox to RiuMessageDialog
Move the QMessageBox-displaying helper out of the logging utility into a dedicated UI class. RiaLogging.h no longer pulls QMessageBox/QWidget into the ~270 files that include it. Behavior is preserved: showError displays the dialog when running interactively (and not under regression tests), then forwards the text to RiaLogging::error.
This commit is contained in:
1 parent
0e27709fe3
commit
bb0afbf962
56 files changed
+249
-147
No files matched your search
@@ -28,6 +28,7 @@
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaTextStringTools.h"
|
||||
#include "RiaWellNameComparer.h"
|
||||
#include "RiuMessageDialog.h"
|
||||
|
||||
#include "RifOsduWellLogReader.h"
|
||||
#include "RifOsduWellPathReader.h"
|
||||
@@ -537,7 +538,7 @@ void RimWellPathCollection::addWellPathFormations( const QStringList& filePaths
|
||||
|
||||
if ( fileReadSuccess )
|
||||
{
|
||||
RiaLogging::errorInMessageBox( Riu3DMainWindowTools::mainWindowWidget(), "Well Picks Import", outputMessage );
|
||||
RiuMessageDialog::showError( Riu3DMainWindowTools::mainWindowWidget(), "Well Picks Import", outputMessage );
|
||||
}
|
||||
|
||||
sortWellsByName();
|
||||
@@ -895,7 +896,7 @@ void RimWellPathCollection::readWellPathFormationFiles()
|
||||
QString errorMessage;
|
||||
if ( !wellPath->readWellPathFormationsFile( &errorMessage, m_wellPathFormationsImporter.get() ) )
|
||||
{
|
||||
RiaLogging::errorInMessageBox( Riu3DMainWindowTools::mainWindowWidget(), "File open error", errorMessage );
|
||||
RiuMessageDialog::showError( Riu3DMainWindowTools::mainWindowWidget(), "File open error", errorMessage );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -912,7 +913,7 @@ void RimWellPathCollection::reloadAllWellPathFormations()
|
||||
QString errorMessage;
|
||||
if ( !wellPath->reloadWellPathFormationsFile( &errorMessage, m_wellPathFormationsImporter.get() ) )
|
||||
{
|
||||
RiaLogging::errorInMessageBox( Riu3DMainWindowTools::mainWindowWidget(), "File open error", errorMessage );
|
||||
RiuMessageDialog::showError( Riu3DMainWindowTools::mainWindowWidget(), "File open error", errorMessage );
|
||||
}
|
||||
|
||||
progress.setProgressDescription( QString( "Reloading formation file for %1" ).arg( wellPath->name() ) );
|
||||
|
||||
Reference in new issue
Block a user