Replace RiaApplication::instance()->project() with RimProject::current().

Also remove uneccessary includes of RiaApplication.h.
This commit is contained in:
Kristian Bendiksen
2020-05-12 09:50:38 +02:00
committed by Magne Sjaastad
parent 7972ff8c02
commit c016c02e40
263 changed files with 320 additions and 610 deletions

View File

@@ -20,7 +20,6 @@
#include "RiaSocketCommand.h"
#include "RiaApplication.h"
#include "RiaPreferences.h"
#include "RiaSocketServer.h"
#include "RiaSocketTools.h"

View File

@@ -20,7 +20,6 @@
#include "RiaSocketCommand.h"
#include "RiaApplication.h"
#include "RiaPreferences.h"
#include "RiaSocketServer.h"
#include "RiaSocketTools.h"

View File

@@ -18,7 +18,6 @@
#include "RiaSocketCommand.h"
#include "RiaApplication.h"
#include "RiaPreferences.h"
#include "RiaSocketDataTransfer.h"
#include "RiaSocketServer.h"

View File

@@ -20,7 +20,6 @@
#include "RiaSocketCommand.h"
#include "RiaApplication.h"
#include "RiaSocketServer.h"
#include "RiaSocketTools.h"
@@ -168,7 +167,7 @@ public:
static QString commandName() { return QString( "GetCaseGroups" ); }
bool interpretCommand( RiaSocketServer* server, const QList<QByteArray>& args, QDataStream& socketStream ) override
{
RimProject* proj = RiaApplication::instance()->project();
RimProject* proj = RimProject::current();
RimEclipseCaseCollection* analysisModels =
( proj && proj->activeOilField() ) ? proj->activeOilField()->analysisModels() : nullptr;
if ( analysisModels )
@@ -231,7 +230,7 @@ public:
argCaseGroupId = args[1].toInt();
}
RimProject* proj = RiaApplication::instance()->project();
RimProject* proj = RimProject::current();
RimEclipseCaseCollection* analysisModels =
( proj && proj->activeOilField() ) ? proj->activeOilField()->analysisModels() : nullptr;
if ( analysisModels )

View File

@@ -160,7 +160,7 @@ RimEclipseCase* RiaSocketServer::findReservoir( int caseId )
}
else
{
RimProject* project = RiaApplication::instance()->project();
RimProject* project = RimProject::current();
if ( !project ) return nullptr;
std::vector<RimCase*> cases;

View File

@@ -20,7 +20,6 @@
#include "RiaSocketTools.h"
#include "RiaApplication.h"
#include "RiaPreferences.h"
#include "RiaSocketDataTransfer.h"
#include "RiaSocketServer.h"