From 5f73d339aae6c3663b2ca1a922ba880364994fc2 Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Tue, 17 Nov 2015 15:20:22 -0800 Subject: [PATCH] Refactor purchase url #4716 --- src/gui/src/SubscriptionManager.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/src/SubscriptionManager.cpp b/src/gui/src/SubscriptionManager.cpp index 6820472e..9794c3e1 100644 --- a/src/gui/src/SubscriptionManager.cpp +++ b/src/gui/src/SubscriptionManager.cpp @@ -27,6 +27,8 @@ #include #include +static const char purchaseURL[] = "https://synergy-project.org/account/"; + SubscriptionManager::SubscriptionManager(QWidget* parent, AppConfig& appConfig, int& edition) : m_pParent(parent), m_AppConfig(appConfig), @@ -90,7 +92,7 @@ void SubscriptionManager::checkError(QString& error) { if (error.contains("trial has expired")) { QMessageBox::warning(m_pParent, tr("Subscription warning"), - tr("Your trial has expired. Click here to purchase")); + tr("Your trial has expired. Click here to purchase").arg(purchaseURL)); } else { QMessageBox::warning(m_pParent, tr("Subscription error"), @@ -127,9 +129,10 @@ void SubscriptionManager::checkExpiring(QString& output) QString dayLeft = dayLeftRegex.cap(1); QMessageBox::warning(m_pParent, tr("Subscription warning"), - tr("Your trial will end in %1 %2. Click here to purchase") + tr("Your trial will end in %1 %2. Click here to purchase") .arg(dayLeft) - .arg(dayLeft == "1" ? "day" : "days")); + .arg(dayLeft == "1" ? "day" : "days") + .arg(purchaseURL)); } } }