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
LicenseManager::notifyActivation(QString identity)
LicenseManager::notifyActivation(QString identity) const
{
ActivationNotifier* notifier = new ActivationNotifier();
notifier->setIdentity(identity);
@ -222,7 +222,7 @@ LicenseManager::getTemporaryNotice() const
}
else if (m_serialKey.isExpiring(::time(0))) {
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="
"\"https://members.symless.com/purchase\">"
"<span style=\"text-decoration: underline;"

View file

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

View file

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

View file

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