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>
This commit is contained in:
Thomas Hartmann
2023-03-09 08:15:01 +01:00
committed by Tim Jenssen
parent a714216511
commit 73d0087251

View File

@@ -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());