mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 06:55:56 -06:00
#2443 Replace QMessageBox with RiaLogging to avoid blocking of batch commands
This commit is contained in:
parent
dc0c6d1b47
commit
ba09906163
@ -20,6 +20,7 @@
|
||||
#include "RicExportFaultsFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFault.h"
|
||||
@ -33,7 +34,6 @@
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicExportFaultsFeature, "RicExportFaultsFeature");
|
||||
|
||||
@ -191,7 +191,7 @@ void RicExportFaultsFeature::saveFault(QString completeFilename, const RigMainGr
|
||||
|
||||
if (!exportFile.open(QIODevice::WriteOnly) )
|
||||
{
|
||||
QMessageBox::critical(NULL, "ResInsight - Export Faults", "Could not open the file :\n" + completeFilename);
|
||||
RiaLogging::error("Could not open the file : " + completeFilename);
|
||||
}
|
||||
|
||||
QTextStream stream(&exportFile);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "RicSaveEclipseResultAsInputPropertyExec.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RicExportFeatureImpl.h"
|
||||
|
||||
@ -38,7 +39,7 @@
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -101,7 +102,7 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
|
||||
bool isOk = RifEclipseInputFileTools::writeBinaryResultToTextFile(exportSettings.fileName, m_cellColors->reservoirView()->eclipseCase()->eclipseCaseData(), timeStep, m_cellColors, exportSettings.eclipseKeyword, exportSettings.undefinedValue);
|
||||
if (!isOk)
|
||||
{
|
||||
QMessageBox::critical(NULL, "File export", "Failed to exported current result to " + exportSettings.fileName);
|
||||
RiaLogging::error("Failed to exported current result to " + exportSettings.fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QMdiSubWindow>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicSnapshotAllPlotsToFileFeature, "RicSnapshotAllPlotsToFileFeature");
|
||||
@ -63,7 +62,7 @@ void RicSnapshotAllPlotsToFileFeature::saveAllPlots()
|
||||
exportSnapshotOfAllPlotsIntoFolder(snapshotFolderName);
|
||||
|
||||
QString text = QString("Exported snapshots to folder : \n%1").arg(snapshotFolderName);
|
||||
QMessageBox::information(nullptr, "Export Snapshots To Folder", text);
|
||||
RiaLogging::info(text);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QMdiSubWindow>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicSnapshotAllViewsToFileFeature, "RicSnapshotAllViewsToFileFeature");
|
||||
@ -64,7 +63,7 @@ void RicSnapshotAllViewsToFileFeature::saveAllViews()
|
||||
exportSnapshotOfAllViewsIntoFolder(snapshotFolderName);
|
||||
|
||||
QString text = QString("Exported snapshots to folder : \n%1").arg(snapshotFolderName);
|
||||
QMessageBox::information(nullptr, "Export Snapshots To Folder", text);
|
||||
RiaLogging::info(text);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user