Persist Profile folder #4715
This commit is contained in:
parent
0e58bfc5fe
commit
cab8a99233
|
@ -23,6 +23,7 @@
|
||||||
#include "AppConfig.h"
|
#include "AppConfig.h"
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDate>
|
#include <QDate>
|
||||||
|
@ -34,12 +35,12 @@ SubscriptionManager::SubscriptionManager(QWidget* parent, AppConfig& appConfig,
|
||||||
m_AppConfig(appConfig),
|
m_AppConfig(appConfig),
|
||||||
m_Edition(edition)
|
m_Edition(edition)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SubscriptionManager::activateSerial(const QString& serial)
|
bool SubscriptionManager::activateSerial(const QString& serial)
|
||||||
{
|
{
|
||||||
m_Edition = Unknown;
|
m_Edition = Unknown;
|
||||||
|
persistDirectory();
|
||||||
CoreInterface coreInterface;
|
CoreInterface coreInterface;
|
||||||
QString output;
|
QString output;
|
||||||
|
|
||||||
|
@ -62,6 +63,7 @@ bool SubscriptionManager::activateSerial(const QString& serial)
|
||||||
bool SubscriptionManager::checkSubscription()
|
bool SubscriptionManager::checkSubscription()
|
||||||
{
|
{
|
||||||
m_Edition = Unknown;
|
m_Edition = Unknown;
|
||||||
|
persistDirectory();
|
||||||
CoreInterface coreInterface;
|
CoreInterface coreInterface;
|
||||||
QString output;
|
QString output;
|
||||||
try
|
try
|
||||||
|
@ -152,3 +154,14 @@ bool SubscriptionManager::shouldWarnExpiring()
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SubscriptionManager::persistDirectory()
|
||||||
|
{
|
||||||
|
CoreInterface coreInterface;
|
||||||
|
QString profileDir = coreInterface.getProfileDir();
|
||||||
|
|
||||||
|
QDir dir(profileDir);
|
||||||
|
if (!dir.exists()) {
|
||||||
|
dir.mkpath(".");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ private:
|
||||||
void getEditionType(QString& output);
|
void getEditionType(QString& output);
|
||||||
void checkExpiring(QString& output);
|
void checkExpiring(QString& output);
|
||||||
bool shouldWarnExpiring();
|
bool shouldWarnExpiring();
|
||||||
|
void persistDirectory();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_ErrorMessage;
|
QString m_ErrorMessage;
|
||||||
|
|
Loading…
Reference in New Issue