diff options
author | Katja Marttila <katja.marttila@qt.io> | 2017-05-12 12:22:54 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2017-05-15 05:44:33 +0000 |
commit | 22d340e39e119b32baf18f206c7363743119b9c8 (patch) | |
tree | 365ea59250e52cfd97fe9102388402c0f448c955 /src/sdk | |
parent | 41b18d6aa0277ae90bf6c76ee7bbc50696e7be26 (diff) |
Check license when doing silentUpdate
Task-number: QTAUTO-428
Change-Id: Ib3d56b59a12d4c7091a6abdbc5231ed5dbe2c3b1
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/sdk')
-rw-r--r-- | src/sdk/installerbase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp index e09e651a2..043d7beca 100644 --- a/src/sdk/installerbase.cpp +++ b/src/sdk/installerbase.cpp @@ -287,6 +287,9 @@ int InstallerBase::run() if (parser.isSet(QLatin1String(CommandLineOptions::SilentUpdate))) { if (m_core->isInstaller()) throw QInstaller::Error(QLatin1String("Cannot start installer binary as updater.")); + const ProductKeyCheck *const productKeyCheck = ProductKeyCheck::instance(); + if (!productKeyCheck->hasValidLicense()) + throw QInstaller::Error(QLatin1String("Silent update not allowed.")); m_core->setUpdater(); m_core->updateComponentsSilently(); } |