#4377 Octave : Use RiaLogging for error messages instead of QErrorMessage

This commit is contained in:
Magne Sjaastad
2019-04-29 07:58:37 +02:00
parent 950458455d
commit f758a8edb2
7 changed files with 76 additions and 68 deletions

View File

@@ -44,7 +44,6 @@
#include "RimSimWellInViewCollection.h"
#include <QTcpSocket>
#include <QErrorMessage>
//--------------------------------------------------------------------------------------------------
///
@@ -148,7 +147,7 @@ public:
if (timeStepReadError)
{
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: riGetDynamicNNCValues : \n") + RiaSocketServer::tr("An error occurred while interpreting the requested time steps."));
server->showErrorMessage(RiaSocketServer::tr("ResInsight SocketServer: riGetDynamicNNCValues : \n") + RiaSocketServer::tr("An error occurred while interpreting the requested time steps."));
}
}
else
@@ -319,7 +318,7 @@ public:
if (!(rimCase && rimCase->eclipseCaseData() && rimCase->eclipseCaseData()->mainGrid()))
{
QString caseId = args[1];
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find case with id %1").arg(caseId));
server->showErrorMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find case with id %1").arg(caseId));
return true;
}
@@ -347,7 +346,7 @@ public:
bool ok = createIJKCellResults(rimCase->results(m_porosityModelEnum), propertyName);
if (!ok)
{
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find the property named: \"%2\"").arg(propertyName));
server->showErrorMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("Could not find the property named: \"%2\"").arg(propertyName));
return true;
}
RigEclipseResultAddress resAddr(QString("%1IJK").arg(propertyName));
@@ -386,7 +385,7 @@ public:
if (timeStepReadError)
{
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: riSetNNCProperty : \n") +
server->showErrorMessage(RiaSocketServer::tr("ResInsight SocketServer: riSetNNCProperty : \n") +
RiaSocketServer::tr("An error occurred while interpreting the requested time steps."));
}
@@ -394,7 +393,7 @@ public:
if (! m_requestedTimesteps.size())
{
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("No time steps specified"));
server->showErrorMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") + RiaSocketServer::tr("No time steps specified"));
return true;
}
@@ -466,7 +465,7 @@ public:
if (connectionCountFromOctave != connectionCount)
{
server->errorMessageDialog()->showMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") +
server->showErrorMessage(RiaSocketServer::tr("ResInsight SocketServer: \n") +
RiaSocketServer::tr("The number of connections in the data coming from octave does not match the case: '%1'\n").arg(m_currentReservoir->caseUserDescription()) +
RiaSocketServer::tr(" Octave: %1\n").arg(connectionCountFromOctave) +
RiaSocketServer::tr(" %1: Connection count: %2").arg(m_currentReservoir->caseUserDescription()).arg(connectionCount));
@@ -499,7 +498,7 @@ public:
{
for (int i = 0; i < errorMessages.size(); i++)
{
server->errorMessageDialog()->showMessage(errorMessages[i]);
server->showErrorMessage(errorMessages[i]);
}
currentClient->abort();