diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2016-01-14 11:23:13 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2016-01-20 10:37:21 +0000 |
commit | e775ff3049fb7433ac97cb687b0ebfa956a8a040 (patch) | |
tree | 8e0bdb1299713ceb1bed934a08f0aea407980ecb | |
parent | 4dba05a94cc39d67995bef775e3122ee336cc827 (diff) | |
download | qt-creator-e775ff3049fb7433ac97cb687b0ebfa956a8a040.tar.gz |
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>
5 files changed, 1 insertions, 67 deletions
diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzer.pro b/plugins/clangstaticanalyzer/clangstaticanalyzer.pro index 176c3274f1..cdffb1f1d1 100644 --- a/plugins/clangstaticanalyzer/clangstaticanalyzer.pro +++ b/plugins/clangstaticanalyzer/clangstaticanalyzer.pro @@ -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 diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzer.qbs b/plugins/clangstaticanalyzer/clangstaticanalyzer.qbs index a97cd7f5ac..2562b46b3c 100644 --- a/plugins/clangstaticanalyzer/clangstaticanalyzer.qbs +++ b/plugins/clangstaticanalyzer/clangstaticanalyzer.qbs @@ -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", diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzer_dependencies.pri b/plugins/clangstaticanalyzer/clangstaticanalyzer_dependencies.pri index 22a09515c4..b099392373 100644 --- a/plugins/clangstaticanalyzer/clangstaticanalyzer_dependencies.pri +++ b/plugins/clangstaticanalyzer/clangstaticanalyzer_dependencies.pri @@ -8,5 +8,3 @@ QTC_PLUGIN_DEPENDS += \ QTC_TEST_DEPENDS += \ qbsprojectmanager \ qmakeprojectmanager - -CONFIG(licensechecker): QTC_PLUGIN_DEPENDS += licensechecker diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzerlicensecheck.h b/plugins/clangstaticanalyzer/clangstaticanalyzerlicensecheck.h deleted file mode 100644 index 94cf2f3b3f..0000000000 --- a/plugins/clangstaticanalyzer/clangstaticanalyzerlicensecheck.h +++ /dev/null @@ -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. diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzerplugin.cpp b/plugins/clangstaticanalyzer/clangstaticanalyzerplugin.cpp index 96c0800783..5d5cec13e1 100644 --- a/plugins/clangstaticanalyzer/clangstaticanalyzerplugin.cpp +++ b/plugins/clangstaticanalyzer/clangstaticanalyzerplugin.cpp @@ -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); |