mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #847 Use a local static QTempDirectory so it is not destroyed too early.
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include <QNetworkRequest>
|
||||
#include <QSslSocket>
|
||||
#include <QStandardPaths>
|
||||
#include <QTemporaryDir>
|
||||
#include <QThread>
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
@@ -431,14 +432,9 @@ namespace BlackCore
|
||||
|
||||
QString CApplication::getTemporaryDirectory() const
|
||||
{
|
||||
if (this->m_tempDirectory.isValid())
|
||||
{
|
||||
return this->m_tempDirectory.path();
|
||||
}
|
||||
else
|
||||
{
|
||||
return QDir::tempPath();
|
||||
}
|
||||
static QTemporaryDir tempDir;
|
||||
if (tempDir.isValid()) { return tempDir.path(); }
|
||||
return QDir::tempPath();
|
||||
}
|
||||
|
||||
QString CApplication::getInfoString(const QString &separator) const
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <QScopedPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QTemporaryDir>
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
|
||||
@@ -438,7 +437,6 @@ namespace BlackCore
|
||||
QScopedPointer<CSetupReader> m_setupReader; //!< setup reader
|
||||
QScopedPointer<CWebDataServices> m_webDataServices; //!< web data services
|
||||
QScopedPointer<BlackMisc::CFileLogger> m_fileLogger; //!< file logger
|
||||
QTemporaryDir m_tempDirectory; //!< temp.directory for the lifetime of application object
|
||||
QNetworkAccessManager m_accessManager { this }; //!< single network access manager
|
||||
CCookieManager m_cookieManager; //!< single cookie manager for our access manager
|
||||
QString m_applicationName; //!< application name
|
||||
|
||||
Reference in New Issue
Block a user