mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -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
+2
-1
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiuMessageDialog.h"
|
||||
|
||||
#include "RifTextDataTableFormatter.h"
|
||||
|
||||
@@ -98,7 +99,7 @@ void RicExportCompletionsWellSegmentsFeature::onActionTriggered( bool isChecked
|
||||
if ( !folder.exists() )
|
||||
{
|
||||
QString txt = QString( "The path '%1' does not exist. Aborting export." ).arg( exportSettings.folder );
|
||||
RiaLogging::errorInMessageBox( Riu3DMainWindowTools::mainWindowWidget(), "Export", txt );
|
||||
RiuMessageDialog::showError( Riu3DMainWindowTools::mainWindowWidget(), "Export", txt );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+2
-1
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiuMessageDialog.h"
|
||||
|
||||
#include "ExportCommands/RicExportLgrFeature.h"
|
||||
#include "RicExportFeatureImpl.h"
|
||||
@@ -166,7 +167,7 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
|
||||
if ( !folder.exists() )
|
||||
{
|
||||
QString txt = QString( "The path '%1' does not exist. Aborting export." ).arg( exportSettings->folder );
|
||||
RiaLogging::errorInMessageBox( Riu3DMainWindowTools::mainWindowWidget(), "Export", txt );
|
||||
RiuMessageDialog::showError( Riu3DMainWindowTools::mainWindowWidget(), "Export", txt );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@
|
||||
#include "RiaPreferencesSystem.h"
|
||||
#include "RiaWeightedMeanCalculator.h"
|
||||
#include "RigStatisticsTools.h"
|
||||
#include "RiuMessageDialog.h"
|
||||
|
||||
#include "ExportCommands/RicExportLgrFeature.h"
|
||||
#include "RicExportCompletionDataSettingsUi.h"
|
||||
@@ -92,7 +93,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
if ( !folder.exists() )
|
||||
{
|
||||
QString txt = QString( "The path '%1' does not exist. Aborting export." ).arg( exportSettings.folder );
|
||||
RiaLogging::errorInMessageBox( Riu3DMainWindowTools::mainWindowWidget(), "Export", txt );
|
||||
RiuMessageDialog::showError( Riu3DMainWindowTools::mainWindowWidget(), "Export", txt );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user