mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
Osdu: make sure token is valid before background loading.
This commit is contained in:
parent
2651ca91b6
commit
76a1d43b0e
@ -48,6 +48,8 @@ public:
|
||||
|
||||
QString server() const;
|
||||
|
||||
QString requestTokenBlocking();
|
||||
|
||||
public slots:
|
||||
void requestToken();
|
||||
void requestFailed( const QAbstractOAuth::Error error );
|
||||
@ -61,8 +63,6 @@ private slots:
|
||||
void accessGranted();
|
||||
|
||||
protected:
|
||||
QString requestTokenBlocking();
|
||||
|
||||
static QString constructAuthUrl( const QString& authority );
|
||||
static QString constructTokenUrl( const QString& authority );
|
||||
|
||||
|
@ -155,6 +155,25 @@ void RimWellPathCollection::loadDataAndUpdate()
|
||||
|
||||
readWellPathFormationFiles();
|
||||
|
||||
auto hasOsduData = []( const std::vector<RimWellPath*>& wellPaths ) -> bool
|
||||
{
|
||||
for ( RimWellPath* wellPath : wellPaths )
|
||||
{
|
||||
if ( dynamic_cast<RimOsduWellPath*>( wellPath ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
if ( hasOsduData( allWellPaths() ) )
|
||||
{
|
||||
auto osduConnector = RiaApplication::instance()->makeOsduConnector();
|
||||
osduConnector->requestTokenBlocking();
|
||||
}
|
||||
|
||||
caf::DataLoadController* dataLoadController = caf::DataLoadController::instance();
|
||||
|
||||
const QString wellPathGeometryKeyword = "WELL_PATH_GEOMETRY";
|
||||
|
Loading…
Reference in New Issue
Block a user