Store username/password in session cache

Compute UTM region before import wizard is displayed
p4#: 22351
This commit is contained in:
Magne Sjaastad
2013-09-08 10:53:25 +02:00
parent 00d9560885
commit f9112c458c
8 changed files with 81 additions and 49 deletions

View File

@@ -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();
}

View File

@@ -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
};