mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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 server() const;
|
||||||
|
|
||||||
|
QString requestTokenBlocking();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void requestToken();
|
void requestToken();
|
||||||
void requestFailed( const QAbstractOAuth::Error error );
|
void requestFailed( const QAbstractOAuth::Error error );
|
||||||
@ -61,8 +63,6 @@ private slots:
|
|||||||
void accessGranted();
|
void accessGranted();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString requestTokenBlocking();
|
|
||||||
|
|
||||||
static QString constructAuthUrl( const QString& authority );
|
static QString constructAuthUrl( const QString& authority );
|
||||||
static QString constructTokenUrl( const QString& authority );
|
static QString constructTokenUrl( const QString& authority );
|
||||||
|
|
||||||
|
@ -155,6 +155,25 @@ void RimWellPathCollection::loadDataAndUpdate()
|
|||||||
|
|
||||||
readWellPathFormationFiles();
|
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();
|
caf::DataLoadController* dataLoadController = caf::DataLoadController::instance();
|
||||||
|
|
||||||
const QString wellPathGeometryKeyword = "WELL_PATH_GEOMETRY";
|
const QString wellPathGeometryKeyword = "WELL_PATH_GEOMETRY";
|
||||||
|
Loading…
Reference in New Issue
Block a user