From 5d707bff3d2b01532ccfc429096e3fd34988e619 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@theqtcompany.com>
Date: Thu, 21 May 2015 15:45:44 +0200
Subject: [PATCH] Make Qt Edition available to qmake

Allow .pro, .prf ... files to check the edition (OpenSource,
Evaluation, Preview, Enterprise ...) of the Qt installation.

Change-Id: If2a8e3877d066b225b1777916cef1d23c65f8512
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
---
 configure                        | 2 ++
 tools/configure/configureapp.cpp | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/configure b/configure
index dddb40f4851..19802a367c3 100755
--- a/configure
+++ b/configure
@@ -6763,6 +6763,8 @@ QT_PATCH_VERSION = $QT_PATCH_VERSION
 QT_LIBINFIX = $QT_LIBINFIX
 QT_NAMESPACE = $QT_NAMESPACE
 
+QT_EDITION = $Edition
+
 EOF
 
 if [ "$CFG_SHARED" = "no" ]; then
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 08ec9435638..4d1ce3d1132 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3460,6 +3460,9 @@ void Configure::generateQConfigPri()
                      << "QT_MINOR_VERSION = " << dictionary["VERSION_MINOR"] << endl
                      << "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl;
 
+        configStream << endl
+                     << "QT_EDITION = " << dictionary["EDITION"] << endl;
+
         if (!dictionary["CFG_SYSROOT"].isEmpty() && dictionary["CFG_GCC_SYSROOT"] == "yes") {
             configStream << endl
                          << "# sysroot" << endl
-- 
GitLab