Fix solnar issues

This commit is contained in:
Serhii Hadzhilov 2020-09-25 22:01:17 +03:00
parent 2d8a7472cd
commit 2083b66e8e
5 changed files with 8 additions and 13 deletions

View file

@ -144,7 +144,7 @@ LicenseManager::getEditionName(Edition const edition, bool trial)
} }
void void
LicenseManager::notifyActivation(QString identity) LicenseManager::notifyActivation(QString identity) const
{ {
ActivationNotifier* notifier = new ActivationNotifier(); ActivationNotifier* notifier = new ActivationNotifier();
notifier->setIdentity(identity); notifier->setIdentity(identity);
@ -222,7 +222,7 @@ LicenseManager::getTemporaryNotice() const
} }
else if (m_serialKey.isExpiring(::time(0))) { else if (m_serialKey.isExpiring(::time(0))) {
Notice = "<html><head/><body><p><span style=\"" Notice = "<html><head/><body><p><span style=\""
"font-weight:600;\">%1</span> day%2 / " "font-weight:600;\">%1</span> day%2 "
"before your license expires.<a href=" "before your license expires.<a href="
"\"https://members.symless.com/purchase\">" "\"https://members.symless.com/purchase\">"
"<span style=\"text-decoration: underline;" "<span style=\"text-decoration: underline;"

View file

@ -40,7 +40,7 @@ public:
void skipActivation(); void skipActivation();
void notifyUpdate(QString fromVersion, QString toVersion); void notifyUpdate(QString fromVersion, QString toVersion);
static QString getEditionName(Edition edition, bool trial = false); static QString getEditionName(Edition edition, bool trial = false);
void notifyActivation(QString identity); void notifyActivation(QString identity) const;
QString getLicenseNotice() const; QString getLicenseNotice() const;
private: private:

View file

@ -33,8 +33,7 @@ SerialKey::SerialKey(Edition edition):
m_userLimit(1), m_userLimit(1),
m_warnTime(ULLONG_MAX), m_warnTime(ULLONG_MAX),
m_expireTime(ULLONG_MAX), m_expireTime(ULLONG_MAX),
m_edition(edition), m_edition(edition)
m_KeyType()
{ {
} }
@ -42,8 +41,7 @@ SerialKey::SerialKey(std::string serial) :
m_userLimit(1), m_userLimit(1),
m_warnTime(0), m_warnTime(0),
m_expireTime(0), m_expireTime(0),
m_edition(kBasic), m_edition(kBasic)
m_KeyType()
{ {
string plainText = decode(serial); string plainText = decode(serial);
bool valid = false; bool valid = false;
@ -74,7 +72,6 @@ bool
SerialKey::isExpired(time_t currentTime) const SerialKey::isExpired(time_t currentTime) const
{ {
bool result = false; bool result = false;
std::cout<<"Current time = "<<static_cast<unsigned long long>(currentTime)<<std::endl;
if (isTemporary()) { if (isTemporary()) {
unsigned long long currentTimeAsLL = static_cast<unsigned long long>(currentTime); unsigned long long currentTimeAsLL = static_cast<unsigned long long>(currentTime);

View file

@ -20,9 +20,7 @@
const std::string SerialKeyType::TRIAL = "trial"; const std::string SerialKeyType::TRIAL = "trial";
const std::string SerialKeyType::TEMPORARY = "temp"; const std::string SerialKeyType::TEMPORARY = "temp";
SerialKeyType::SerialKeyType() : SerialKeyType::SerialKeyType()
m_isTrial(false),
m_isTemporary(false)
{ {
} }

View file

@ -35,8 +35,8 @@ public:
bool isPermanent() const; bool isPermanent() const;
protected: protected:
bool m_isTrial; bool m_isTrial = false;
bool m_isTemporary; bool m_isTemporary = false;
}; };
inline bool inline bool