mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Replace RiaApplication::instance()->project() with RimProject::current().
Also remove uneccessary includes of RiaApplication.h.
This commit is contained in:
committed by
Magne Sjaastad
parent
7972ff8c02
commit
c016c02e40
@@ -17,7 +17,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RiaGrpcPdmObjectService.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGrpcCallbacks.h"
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
@@ -337,7 +336,7 @@ grpc::Status RiaGrpcPdmObjectService::GetAncestorPdmObject( grpc::ServerContext*
|
||||
const rips::PdmParentObjectRequest* request,
|
||||
rips::PdmObject* reply )
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RimProject* project = RimProject::current();
|
||||
std::vector<caf::PdmObject*> objectsOfCurrentClass;
|
||||
|
||||
QString scriptClassName = QString::fromStdString( request->object().class_keyword() );
|
||||
@@ -449,7 +448,7 @@ grpc::Status RiaGrpcPdmObjectService::UpdateExistingPdmObject( grpc::ServerConte
|
||||
}
|
||||
|
||||
matchingObject->updateAllRequiredEditors();
|
||||
RiaApplication::instance()->project()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
|
||||
Rim3dView* view = dynamic_cast<Rim3dView*>( matchingObject );
|
||||
if ( view )
|
||||
@@ -610,7 +609,7 @@ caf::PdmObject* RiaGrpcPdmObjectService::findCafObjectFromRipsObject( const rips
|
||||
caf::PdmObject* RiaGrpcPdmObjectService::findCafObjectFromScriptNameAndAddress( const QString& scriptClassName,
|
||||
uint64_t address )
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RimProject* project = RimProject::current();
|
||||
std::vector<caf::PdmObject*> objectsOfCurrentClass;
|
||||
|
||||
QString classKeyword = caf::PdmObjectScriptabilityRegister::classKeywordFromScriptClassName( scriptClassName );
|
||||
|
||||
@@ -78,7 +78,7 @@ grpc::Status RiaGrpcProjectService::GetAllCaseGroups( grpc::ServerContext* conte
|
||||
const rips::Empty* request,
|
||||
rips::CaseGroups* reply )
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
RimProject* proj = RimProject::current();
|
||||
RimEclipseCaseCollection* analysisModels =
|
||||
( proj && proj->activeOilField() ) ? proj->activeOilField()->analysisModels() : nullptr;
|
||||
if ( analysisModels )
|
||||
@@ -102,7 +102,7 @@ grpc::Status RiaGrpcProjectService::GetAllCases( grpc::ServerContext* context,
|
||||
rips::CaseInfoArray* reply )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RiaApplication::instance()->project()->allCases( cases );
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
if ( cases.empty() )
|
||||
{
|
||||
@@ -132,7 +132,7 @@ grpc::Status RiaGrpcProjectService::GetCasesInGroup( grpc::ServerContext* cont
|
||||
const rips::CaseGroup* request,
|
||||
rips::CaseInfoArray* reply )
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
RimProject* proj = RimProject::current();
|
||||
RimEclipseCaseCollection* analysisModels =
|
||||
( proj && proj->activeOilField() ) ? proj->activeOilField()->analysisModels() : nullptr;
|
||||
if ( analysisModels )
|
||||
@@ -189,7 +189,7 @@ grpc::Status RiaGrpcProjectService::GetCasesInGroup( grpc::ServerContext* cont
|
||||
grpc::Status
|
||||
RiaGrpcProjectService::GetPdmObject( grpc::ServerContext* context, const rips::Empty* request, rips::PdmObject* reply )
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RimProject* project = RimProject::current();
|
||||
if ( project )
|
||||
{
|
||||
copyPdmObjectFromCafToRips( project, reply );
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include "RiaGrpcServer.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RiaGrpcServiceInterface.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
@@ -42,7 +41,7 @@
|
||||
RimCase* RiaGrpcServiceInterface::findCase( int caseId )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RiaApplication::instance()->project()->allCases( cases );
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
@@ -172,7 +171,7 @@ bool RiaGrpcServiceInterface::assignFieldValue( const QString& stringValue
|
||||
QTextStream stream( stringValue.toLatin1() );
|
||||
caf::PdmScriptIOMessages messages;
|
||||
if ( valueField ) *oldValue = valueField->toQVariant();
|
||||
scriptability->writeToField( stream, nullptr, &messages, false, RiaApplication::instance()->project() );
|
||||
scriptability->writeToField( stream, nullptr, &messages, false, RimProject::current() );
|
||||
if ( valueField ) *newValue = valueField->toQVariant();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user