mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-16 11:01:53 +08:00
#5707 Prefer 'update' over 'upgrade'
This commit is contained in:
@@ -29,7 +29,7 @@ void ActivationNotifier::setIdentity(QString identity)
|
||||
m_Identity = identity;
|
||||
}
|
||||
|
||||
void ActivationNotifier::setUpgradeInfo(QString const& fromVersion,
|
||||
void ActivationNotifier::setUpdateInfo(QString const& fromVersion,
|
||||
QString const& toVersion,
|
||||
QString const& serialKey)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ void ActivationNotifier::notify()
|
||||
}
|
||||
}
|
||||
|
||||
void ActivationNotifier::notifyUpgrade()
|
||||
void ActivationNotifier::notifyUpdate()
|
||||
{
|
||||
try {
|
||||
CoreInterface coreInterface;
|
||||
|
||||
@@ -27,12 +27,12 @@ public:
|
||||
explicit ActivationNotifier(QObject *parent = 0);
|
||||
|
||||
void setIdentity(QString identity);
|
||||
void setUpgradeInfo(QString const& fromVersion,
|
||||
void setUpdateInfo(QString const& fromVersion,
|
||||
QString const& toVersion, QString const& serialKey);
|
||||
|
||||
public slots:
|
||||
void notify();
|
||||
void notifyUpgrade();
|
||||
void notifyUpdate();
|
||||
|
||||
signals:
|
||||
void finished();
|
||||
|
||||
@@ -65,7 +65,7 @@ QString CoreInterface::getSerialKeyFilePath()
|
||||
QString CoreInterface::notifyUpdate (QString const& fromVersion,
|
||||
QString const& toVersion,
|
||||
QString const& serialKey) {
|
||||
QStringList args("--notify-upgrade");
|
||||
QStringList args("--notify-update");
|
||||
QString input(fromVersion + ":" + toVersion + ":" + serialKey);
|
||||
return run(args, input);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ LicenseManager::setSerialKey(QString serialKeyString, bool acceptExpired)
|
||||
void
|
||||
LicenseManager::notifyUpdate(QString fromVersion, QString toVersion) {
|
||||
ActivationNotifier* notifier = new ActivationNotifier();
|
||||
notifier->setUpgradeInfo (fromVersion, toVersion,
|
||||
notifier->setUpdateInfo (fromVersion, toVersion,
|
||||
QString::fromStdString(m_serialKey.toString()));
|
||||
|
||||
QThread* thread = new QThread();
|
||||
@@ -85,7 +85,7 @@ LicenseManager::notifyUpdate(QString fromVersion, QString toVersion) {
|
||||
notifier->moveToThread(thread);
|
||||
thread->start();
|
||||
|
||||
QMetaObject::invokeMethod(notifier, "notifyUpgrade",
|
||||
QMetaObject::invokeMethod(notifier, "notifyUpdate",
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user