mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Store username/password in session cache
Compute UTM region before import wizard is displayed p4#: 22351
This commit is contained in:
@@ -1654,3 +1654,26 @@ void RiaApplication::slotUpdateScheduledDisplayModels()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaApplication::setCacheDataObject(const QString& key, const QVariant& dataObject)
|
||||
{
|
||||
m_sessionCache[key] = dataObject;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QVariant RiaApplication::cacheDataObject(const QString& key) const
|
||||
{
|
||||
QMap<QString, QVariant>::const_iterator it = m_sessionCache.find(key);
|
||||
|
||||
if (it != m_sessionCache.end())
|
||||
{
|
||||
return it.value();
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
||||
@@ -130,6 +130,9 @@ public:
|
||||
QString commandLineParameterHelp() const;
|
||||
void showFormattedTextInMessageBox(const QString& text);
|
||||
|
||||
void setCacheDataObject(const QString& key, const QVariant& dataObject);
|
||||
QVariant cacheDataObject(const QString& key) const;
|
||||
|
||||
private:
|
||||
void onProjectOpenedOrClosed();
|
||||
void setWindowCaptionFromAppState();
|
||||
@@ -163,4 +166,6 @@ private:
|
||||
QString m_startupDefaultDirectory;
|
||||
|
||||
cvf::ref<cvf::Font> m_standardFont;
|
||||
|
||||
QMap<QString, QVariant> m_sessionCache; // Session cache used to store username/passwords per session
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user