From 020b7974dfc7778fb70a4bb63a56f30a06dc4d4c Mon Sep 17 00:00:00 2001
From: Andrew Nelless
%1 days of " - "your Synergy Pro trial remain. " - "Buy now!" - "
"; + QString expiringNotice ("%1 days of " + "your %2 trial remain. " + "Buy now!" + "
"); expiringNotice = expiringNotice.arg - (m_LicenseManager->serialKey().daysLeft(::time(0))); + (m_LicenseManager->serialKey().daysLeft(::time(0))).arg + (LicenseManager::getEditionName(m_LicenseManager->activeEdition())).arg + (QString::fromStdString(m_LicenseManager->serialKey().toString())); + this->m_trialLabel->setText(expiringNotice); this->m_trialWidget->show(); } diff --git a/src/lib/shared/SerialKey.cpp b/src/lib/shared/SerialKey.cpp index cdc7695f..60a039cb 100644 --- a/src/lib/shared/SerialKey.cpp +++ b/src/lib/shared/SerialKey.cpp @@ -126,15 +126,20 @@ std::string SerialKey::toString() const { std::ostringstream oss; - oss << "v2;"; - oss << (isTrial() ? "trial" : "lifetime") << ";"; + oss << "{"; + if (isTrial()) { + oss << "v2;trial;"; + } else { + oss << "v1;"; + } oss << editionString() << ";"; oss << m_name << ";"; oss << m_userLimit << ";"; oss << m_email << ";"; oss << m_company << ";"; - oss << m_warnTime << ";"; - oss << m_expireTime; + oss << (isTrial() ? m_warnTime : 0) << ";"; + oss << (isTrial() ? m_expireTime : 0); + oss << "}"; return hexEncode(oss.str()); }