Improve error handling when trying to access OSDU data

Show more details when support for SSL is missing.

Move connection of signal/slot away from constructor. This makes it possible to use ResInsight even if SSL is not available.
This commit is contained in:
Magne Sjaastad
2024-08-16 16:48:04 +02:00
parent 3f2c669bc4
commit 141484f8a7
6 changed files with 48 additions and 18 deletions

View File

@@ -1711,6 +1711,18 @@ RiaOsduConnector* RiaApplication::makeOsduConnector()
{
if ( m_osduConnector ) return m_osduConnector;
if ( !QSslSocket::supportsSsl() )
{
QString errMsg = "SSL support is not available. ";
#ifdef Q_OS_WIN
errMsg +=
"Make sure that the SSL libraries are available (on Windows platform, they are called 'libcrypto*.dll' and 'libssl*.dll').";
#endif
RiaLogging::errorInMessageBox( nullptr, "OSDU Service Connection", errMsg );
return nullptr;
}
RiaPreferencesOsdu* osduPreferences = preferences()->osduPreferences();
const QString server = osduPreferences->server();
const QString dataPartitionId = osduPreferences->dataPartitionId();