diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-09-10 11:26:47 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-11 15:52:51 +0200 |
commit | fa7f446f8f9eb06546de6b8e80b0e1613c75b8cf (patch) | |
tree | cbdb908c27eb2d3c5168c85597a7e0bf417ff7a0 | |
parent | e952f233e6ac9212a9c9d857ce897f5a9676812c (diff) |
fix configure -commercial
Commit 0aad3fc742a7aa15c21fe75e2b1b001f1f73468c broke
"configure -commercial". The license check needs to know where Qt's
source directory is.
Change-Id: I5e53135b6b628eb5e413b2c2b3b8721dae02b503
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Kalle Viironen <kalle.viironen@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
-rw-r--r-- | tools/configure/configureapp.cpp | 2 | ||||
-rw-r--r-- | tools/configure/tools.cpp | 12 | ||||
-rw-r--r-- | tools/configure/tools.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 873568daf8..092e26abfd 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -4187,7 +4187,7 @@ void Configure::readLicense() } #ifdef COMMERCIAL_VERSION else { - Tools::checkLicense(dictionary, licenseInfo, firstLicensePath()); + Tools::checkLicense(dictionary, licenseInfo, firstLicensePath(), sourcePath); if (dictionary["DONE"] != "error") { // give the user some feedback, and prompt for license acceptance cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " " << dictionary["EDITION"] << " Edition."<< endl << endl; diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp index 5161f77203..ed0f3efb1b 100644 --- a/tools/configure/tools.cpp +++ b/tools/configure/tools.cpp @@ -56,16 +56,16 @@ std::ostream &operator<<(std::ostream &s, const QString &val); // defined in con using namespace std; void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString> &licenseInfo, - const QString &path) + const QString &path, const QString &sourcePath) { - QString tpLicense = dictionary["QT_SOURCE_TREE"] + "/LICENSE.PREVIEW.OPENSOURCE"; + QString tpLicense = sourcePath + "/LICENSE.PREVIEW.OPENSOURCE"; if (QFile::exists(tpLicense)) { dictionary["EDITION"] = "Preview"; dictionary["LICENSE FILE"] = tpLicense; dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE"; return; // No license key checking in Tech Preview } - tpLicense = dictionary["QT_SOURCE_TREE"] + "/LICENSE.PREVIEW.COMMERCIAL"; + tpLicense = sourcePath + "/LICENSE.PREVIEW.COMMERCIAL"; if (QFile::exists(tpLicense)) { dictionary["EDITION"] = "Preview"; dictionary["LICENSE FILE"] = tpLicense; @@ -204,7 +204,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString if (dictionary["EDITION"] == "Evaluation") dictionary["LICENSE_EXTENSION"] = "-EVALUATION"; - if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/.LICENSE")) { + if (QFile::exists(sourcePath + "/.LICENSE")) { // Generic, no-suffix license dictionary["LICENSE_EXTENSION"].clear(); } else if (dictionary["LICENSE_EXTENSION"].isEmpty()) { @@ -220,8 +220,8 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString } // copy one of .LICENSE-*(-US) to LICENSE - QString toLicenseFile = dictionary["QT_SOURCE_TREE"] + "/LICENSE"; - QString fromLicenseFile = dictionary["QT_SOURCE_TREE"] + "/.LICENSE" + dictionary["LICENSE_EXTENSION"]; + QString toLicenseFile = sourcePath + "/LICENSE"; + QString fromLicenseFile = sourcePath + "/.LICENSE" + dictionary["LICENSE_EXTENSION"]; if (licenseFeatures == 'B' || licenseFeatures == 'G' || licenseFeatures == 'L' || licenseFeatures == 'Y') fromLicenseFile += "-US"; diff --git a/tools/configure/tools.h b/tools/configure/tools.h index e520e22371..888a5e07b5 100644 --- a/tools/configure/tools.h +++ b/tools/configure/tools.h @@ -51,7 +51,7 @@ class Tools { public: static void checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString> &licenseInfo, - const QString &path); + const QString &path, const QString &sourcePath); }; #endif // _TOOLS_H_ |