forked from qt-creator/qt-creator
Remove license checker dependency
Change-Id: I99fc1ad25adf294409f372c654f2affb872f8957 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Eike Ziller
parent
4dba05a94c
commit
e775ff3049
@@ -28,7 +28,6 @@ HEADERS += \
|
||||
clangstaticanalyzerdiagnosticmodel.h \
|
||||
clangstaticanalyzerdiagnosticview.h \
|
||||
clangstaticanalyzer_global.h \
|
||||
clangstaticanalyzerlicensecheck.h \
|
||||
clangstaticanalyzerlogfilereader.h \
|
||||
clangstaticanalyzerplugin.h \
|
||||
clangstaticanalyzerprojectsettings.h \
|
||||
@@ -51,7 +50,5 @@ equals(TEST, 1) {
|
||||
RESOURCES += clangstaticanalyzerunittests.qrc
|
||||
}
|
||||
|
||||
CONFIG(licensechecker): DEFINES += LICENSECHECKER
|
||||
|
||||
DISTFILES += \
|
||||
tests/tests.pri
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import qbs
|
||||
|
||||
QtcCommercialPlugin {
|
||||
QtcPlugin {
|
||||
name: "ClangStaticAnalyzer"
|
||||
|
||||
Depends { name: "AnalyzerBase" }
|
||||
@@ -29,7 +29,6 @@ QtcCommercialPlugin {
|
||||
"clangstaticanalyzerdiagnosticmodel.h",
|
||||
"clangstaticanalyzerdiagnosticview.cpp",
|
||||
"clangstaticanalyzerdiagnosticview.h",
|
||||
"clangstaticanalyzerlicensecheck.h",
|
||||
"clangstaticanalyzerlogfilereader.cpp",
|
||||
"clangstaticanalyzerlogfilereader.h",
|
||||
"clangstaticanalyzerplugin.cpp",
|
||||
|
@@ -8,5 +8,3 @@ QTC_PLUGIN_DEPENDS += \
|
||||
QTC_TEST_DEPENDS += \
|
||||
qbsprojectmanager \
|
||||
qmakeprojectmanager
|
||||
|
||||
CONFIG(licensechecker): QTC_PLUGIN_DEPENDS += licensechecker
|
||||
|
@@ -1,56 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CLANGSTATICANALYZERLICENSECHECK_H
|
||||
#define CLANGSTATICANALYZERLICENSECHECK_H
|
||||
|
||||
#ifdef LICENSECHECKER
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <licensechecker/licensecheckerplugin.h>
|
||||
#endif
|
||||
|
||||
inline bool enterpriseFeaturesAvailable()
|
||||
{
|
||||
#ifdef LICENSECHECKER
|
||||
LicenseChecker::LicenseCheckerPlugin *licenseChecker
|
||||
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
||||
|
||||
if (licenseChecker && licenseChecker->hasValidLicense()) {
|
||||
if (licenseChecker->enterpriseFeatures()) {
|
||||
return true;
|
||||
} else {
|
||||
qWarning() << "License does not cover enterprise features, "
|
||||
"disabling Clang Static Analyzer";
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Invalid license, disabling Clang Static Analyzer";
|
||||
}
|
||||
return false;
|
||||
#else // LICENSECHECKER
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // Include guard.
|
@@ -27,7 +27,6 @@
|
||||
|
||||
#include "clangstaticanalyzerconfigwidget.h"
|
||||
#include "clangstaticanalyzerconstants.h"
|
||||
#include "clangstaticanalyzerlicensecheck.h"
|
||||
#include "clangstaticanalyzerprojectsettingswidget.h"
|
||||
#include "clangstaticanalyzerruncontrolfactory.h"
|
||||
#include "clangstaticanalyzertool.h"
|
||||
@@ -128,9 +127,6 @@ bool ClangStaticAnalyzerPlugin::initializeEnterpriseFeatures(const QStringList &
|
||||
Q_UNUSED(arguments);
|
||||
Q_UNUSED(errorString);
|
||||
|
||||
if (!enterpriseFeaturesAvailable())
|
||||
return true;
|
||||
|
||||
auto tool = m_analyzerTool = new ClangStaticAnalyzerTool(this);
|
||||
addAutoReleasedObject(new ClangStaticAnalyzerRunControlFactory(m_analyzerTool));
|
||||
addAutoReleasedObject(new ClangStaticAnalyzerOptionsPage);
|
||||
|
Reference in New Issue
Block a user