summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2023-03-09 08:15:01 +0100
committerTim Jenssen <tim.jenssen@qt.io>2023-03-09 08:41:41 +0000
commit73d0087251f0d5b748207072aa7c0f3334972539 (patch)
tree6a5ede0875a78117105fcb8384418cdcbb71ca87
parenta71421651190a7d2f3613f267f8233b45f6c374a (diff)
downloadqt-creator-73d0087251f0d5b748207072aa7c0f3334972539.tar.gz
QmlDesigner: Hotfix for content library license check
if (QmlDesigner::checkEnterpriseLicense()) does not require any ifdef and is the proper solution. Not taking any risk in the qds/4.0 branch, though. CHECK_LICENSE is never defined in QtC. Change-Id: I0a6098f362cd78de4e972044340b296cb0559099 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--src/plugins/qmldesigner/components/componentcore/viewmanager.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/qmldesigner/components/componentcore/viewmanager.cpp b/src/plugins/qmldesigner/components/componentcore/viewmanager.cpp
index 55468a3569..353ef0fddc 100644
--- a/src/plugins/qmldesigner/components/componentcore/viewmanager.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/viewmanager.cpp
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "viewmanager.h"
+#include "dynamiclicensecheck.h"
#include "modelnodecontextmenu_helper.h"
#include <abstractview.h>
@@ -237,12 +238,9 @@ QList<AbstractView *> ViewManager::standardViews() const
.toBool())
list.append(&d->debugView);
-#ifdef CHECK_LICENSE
+ // TODO Should be if (QmlDesigner::checkEnterpriseLicense())
if (checkLicense() == FoundLicense::enterprise)
list.append(&d->contentLibraryView);
-#else
- list.append(&d->contentLibraryView);
-#endif
return list;
}
@@ -415,12 +413,9 @@ QList<WidgetInfo> ViewManager::widgetInfos() const
else
widgetInfoList.append(d->newStatesEditorView.widgetInfo());
-#ifdef CHECK_LICENSE
+ // TODO Should be if (QmlDesigner::checkEnterpriseLicense())
if (checkLicense() == FoundLicense::enterprise)
widgetInfoList.append(d->contentLibraryView.widgetInfo());
-#else
- widgetInfoList.append(d->contentLibraryView.widgetInfo());
-#endif
if (d->debugView.hasWidget())
widgetInfoList.append(d->debugView.widgetInfo());