Commit e775ff30 authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Eike Ziller
Browse files

Remove license checker dependency



Change-Id: I99fc1ad25adf294409f372c654f2affb872f8957
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 4dba05a9
......@@ -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
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
/****************************************************************************
**
** 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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment