summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/dynamiclicensecheck.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/dynamiclicensecheck.h')
-rw-r--r--src/plugins/qmldesigner/dynamiclicensecheck.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/dynamiclicensecheck.h b/src/plugins/qmldesigner/dynamiclicensecheck.h
index f8362cec94..197f5da415 100644
--- a/src/plugins/qmldesigner/dynamiclicensecheck.h
+++ b/src/plugins/qmldesigner/dynamiclicensecheck.h
@@ -37,6 +37,7 @@
namespace QmlDesigner {
enum FoundLicense {
+ noLicense,
community,
professional,
enterprise
@@ -57,12 +58,28 @@ inline ExtensionSystem::IPlugin *licenseCheckerPlugin()
inline FoundLicense checkLicense()
{
+ static FoundLicense license = noLicense;
+
+ if (license != noLicense)
+ return license;
+
if (auto plugin = Internal::licenseCheckerPlugin()) {
bool retVal = false;
+
bool success = QMetaObject::invokeMethod(plugin,
- "qdsEnterpriseLicense",
+ "evaluationLicense",
Qt::DirectConnection,
Q_RETURN_ARG(bool, retVal));
+
+ if (success && retVal)
+ return enterprise;
+
+ retVal = false;
+
+ success = QMetaObject::invokeMethod(plugin,
+ "qdsEnterpriseLicense",
+ Qt::DirectConnection,
+ Q_RETURN_ARG(bool, retVal));
if (success && retVal)
return enterprise;
else