#5707 Prefer 'update' over 'upgrade'

This commit is contained in:
Andrew Nelless 2016-10-28 14:54:38 +01:00
parent fa7daa48f7
commit af9037276c
9 changed files with 15 additions and 15 deletions

View File

@ -29,7 +29,7 @@ void ActivationNotifier::setIdentity(QString identity)
m_Identity = identity; m_Identity = identity;
} }
void ActivationNotifier::setUpgradeInfo(QString const& fromVersion, void ActivationNotifier::setUpdateInfo(QString const& fromVersion,
QString const& toVersion, QString const& toVersion,
QString const& serialKey) QString const& serialKey)
{ {
@ -49,7 +49,7 @@ void ActivationNotifier::notify()
} }
} }
void ActivationNotifier::notifyUpgrade() void ActivationNotifier::notifyUpdate()
{ {
try { try {
CoreInterface coreInterface; CoreInterface coreInterface;

View File

@ -27,12 +27,12 @@ public:
explicit ActivationNotifier(QObject *parent = 0); explicit ActivationNotifier(QObject *parent = 0);
void setIdentity(QString identity); void setIdentity(QString identity);
void setUpgradeInfo(QString const& fromVersion, void setUpdateInfo(QString const& fromVersion,
QString const& toVersion, QString const& serialKey); QString const& toVersion, QString const& serialKey);
public slots: public slots:
void notify(); void notify();
void notifyUpgrade(); void notifyUpdate();
signals: signals:
void finished(); void finished();

View File

@ -65,7 +65,7 @@ QString CoreInterface::getSerialKeyFilePath()
QString CoreInterface::notifyUpdate (QString const& fromVersion, QString CoreInterface::notifyUpdate (QString const& fromVersion,
QString const& toVersion, QString const& toVersion,
QString const& serialKey) { QString const& serialKey) {
QStringList args("--notify-upgrade"); QStringList args("--notify-update");
QString input(fromVersion + ":" + toVersion + ":" + serialKey); QString input(fromVersion + ":" + toVersion + ":" + serialKey);
return run(args, input); return run(args, input);
} }

View File

@ -74,7 +74,7 @@ LicenseManager::setSerialKey(QString serialKeyString, bool acceptExpired)
void void
LicenseManager::notifyUpdate(QString fromVersion, QString toVersion) { LicenseManager::notifyUpdate(QString fromVersion, QString toVersion) {
ActivationNotifier* notifier = new ActivationNotifier(); ActivationNotifier* notifier = new ActivationNotifier();
notifier->setUpgradeInfo (fromVersion, toVersion, notifier->setUpdateInfo (fromVersion, toVersion,
QString::fromStdString(m_serialKey.toString())); QString::fromStdString(m_serialKey.toString()));
QThread* thread = new QThread(); QThread* thread = new QThread();
@ -85,7 +85,7 @@ LicenseManager::notifyUpdate(QString fromVersion, QString toVersion) {
notifier->moveToThread(thread); notifier->moveToThread(thread);
thread->start(); thread->start();
QMetaObject::invokeMethod(notifier, "notifyUpgrade", QMetaObject::invokeMethod(notifier, "notifyUpdate",
Qt::QueuedConnection); Qt::QueuedConnection);
} }

View File

@ -208,8 +208,8 @@ ArgParser::parseToolArgs(ToolArgs& args, int argc, const char* const* argv)
args.m_notifyActivation = true; args.m_notifyActivation = true;
return true; return true;
} }
else if (isArg(i, argc, argv, NULL, "--notify-upgrade", 0)) { else if (isArg(i, argc, argv, NULL, "--notify-update", 0)) {
args.m_notifyUpgrade = true; args.m_notifyUpdate = true;
return true; return true;
} }
else { else {

View File

@ -80,8 +80,8 @@ ToolApp::run(int argc, char** argv)
else if (m_args.m_getArch) { else if (m_args.m_getArch) {
std::cout << ARCH->getPlatformName() << std::endl; std::cout << ARCH->getPlatformName() << std::endl;
} }
else if (m_args.m_notifyUpgrade) { else if (m_args.m_notifyUpdate) {
notifyUpgrade(); notifyUpdate();
} }
else if (m_args.m_notifyActivation) { else if (m_args.m_notifyActivation) {
notifyActivation(); notifyActivation();
@ -138,7 +138,7 @@ ToolApp::loginAuth()
} }
void void
ToolApp::notifyUpgrade() ToolApp::notifyUpdate()
{ {
String data; String data;
std::cin >> data; std::cin >> data;

View File

@ -30,7 +30,7 @@ public:
private: private:
void loginAuth(); void loginAuth();
void notifyActivation(); void notifyActivation();
void notifyUpgrade(); void notifyUpdate();
private: private:
ToolArgs m_args; ToolArgs m_args;

View File

@ -24,6 +24,6 @@ ToolArgs::ToolArgs() :
m_getProfileDir(false), m_getProfileDir(false),
m_getArch(false), m_getArch(false),
m_notifyActivation(false), m_notifyActivation(false),
m_notifyUpgrade(false) m_notifyUpdate(false)
{ {
} }

View File

@ -30,5 +30,5 @@ public:
bool m_getProfileDir; bool m_getProfileDir;
bool m_getArch; bool m_getArch;
bool m_notifyActivation; bool m_notifyActivation;
bool m_notifyUpgrade; bool m_notifyUpdate;
}; };