forked from qt-creator/qt-creator
ExtensionSystem: Add PluginId and VendorId
Change-Id: I4f47f95e1f4ff4af73c2b81320087b4592007993 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -400,7 +400,7 @@ function(add_qtc_plugin target_name)
|
||||
get_property(_v TARGET "${i}" PROPERTY _arg_VERSION)
|
||||
endif()
|
||||
string(APPEND _arg_DEPENDENCY_STRING
|
||||
" { \"Name\" : \"${i}\", \"Version\" : \"${_v}\" }"
|
||||
" { \"Id\" : \"${i}\", \"Version\" : \"${_v}\" }"
|
||||
)
|
||||
endforeach(i)
|
||||
foreach(i IN LISTS _arg_PLUGIN_RECOMMENDS)
|
||||
@@ -411,7 +411,7 @@ function(add_qtc_plugin target_name)
|
||||
get_property(_v TARGET "${i}" PROPERTY _arg_VERSION)
|
||||
endif()
|
||||
string(APPEND _arg_DEPENDENCY_STRING
|
||||
" { \"Name\" : \"${i}\", \"Version\" : \"${_v}\", \"Type\" : \"optional\" }"
|
||||
" { \"Id\" : \"${i}\", \"Version\" : \"${_v}\", \"Type\" : \"optional\" }"
|
||||
)
|
||||
endforeach(i)
|
||||
foreach(i IN LISTS _arg_PLUGIN_TEST_DEPENDS)
|
||||
@@ -420,7 +420,7 @@ function(add_qtc_plugin target_name)
|
||||
endif()
|
||||
set(_v ${IDE_VERSION})
|
||||
string(APPEND _arg_DEPENDENCY_STRING
|
||||
" { \"Name\" : \"${i}\", \"Version\" : \"${_v}\", \"Type\" : \"test\" }"
|
||||
" { \"Id\" : \"${i}\", \"Version\" : \"${_v}\", \"Type\" : \"test\" }"
|
||||
)
|
||||
endforeach(i)
|
||||
list(LENGTH _arg_PLUGIN_MANUAL_DEPENDS manualdep_len)
|
||||
@@ -430,11 +430,11 @@ function(add_qtc_plugin target_name)
|
||||
foreach (i RANGE 0 ${manualdep_maxindex} 3)
|
||||
math(EXPR dep_version_i "${i} + 1")
|
||||
math(EXPR dep_type_i "${i} + 2")
|
||||
list(GET _arg_PLUGIN_MANUAL_DEPENDS ${i} dep_name)
|
||||
list(GET _arg_PLUGIN_MANUAL_DEPENDS ${i} dep_id)
|
||||
list(GET _arg_PLUGIN_MANUAL_DEPENDS ${dep_version_i} dep_version)
|
||||
list(GET _arg_PLUGIN_MANUAL_DEPENDS ${dep_type_i} dep_type)
|
||||
string(APPEND _arg_DEPENDENCY_STRING
|
||||
" { \"Name\" : \"${dep_name}\", \"Version\" : \"${dep_version}\", \"Type\" : \"${dep_type}\" }"
|
||||
" { \"Id\" : \"${dep_id}\", \"Version\" : \"${dep_version}\", \"Type\" : \"${dep_type}\" }"
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
@@ -59,7 +59,7 @@
|
||||
\li Disable the startup check for a previously crashed \QC instance.
|
||||
|
||||
\row
|
||||
\li -load <plugin>
|
||||
\li -load <plugin-id>
|
||||
\li Enable the specified plugin and all plugins that it depends on.
|
||||
You can combine \c -load and \c -noload options and specify both
|
||||
options multiple times to enable and disable several plugins.
|
||||
@@ -70,7 +70,7 @@
|
||||
\li Enable all plugins.
|
||||
|
||||
\row
|
||||
\li -noload <plugin>
|
||||
\li -noload <plugin-id>
|
||||
\li Disable the specified plugin and all plugins that depend on it.
|
||||
|
||||
\row
|
||||
|
@@ -1,10 +1,12 @@
|
||||
{
|
||||
//! [1]
|
||||
"Id" : "example",
|
||||
"Name" : "Example",
|
||||
"Version" : "0.0.1",
|
||||
"CompatVersion" : "0.0.1",
|
||||
//! [1]
|
||||
//! [2]
|
||||
"VendorId" : "mycompany",
|
||||
"Vendor" : "MyCompany",
|
||||
"Copyright" : "(C) MyCompany",
|
||||
"License" : "Put short license information here",
|
||||
|
@@ -255,8 +255,8 @@
|
||||
\snippet exampleplugin/Example.json.in 3
|
||||
|
||||
The \c {IDE_PLUGIN_DEPENDENCIES} variable is automatically replaced by the
|
||||
dependency information in \c {QTC_PLUGIN_DEPENDS} and
|
||||
\c {QTC_PLUGIN_RECOMMENDS} from your plugin's \c {.pro} file.
|
||||
dependency information in \c {PLUGIN_DEPENDS} amd \c {PLUGIN_RECOMMENDS}
|
||||
from your plugin's \c {add_qtc_plugin()} call in its \c {CMakeLists.txt} file.
|
||||
|
||||
\section1 Plugin Class
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
\section2 Main Keys
|
||||
|
||||
The main keys that are used to identify your your plugin and define default loading behavior,
|
||||
consist of the mandatory keys \c Name and \c Version, and the optional keys \c CompatVersion,
|
||||
consist of the mandatory keys \c Id and \c Version, and the optional keys \c CompatVersion,
|
||||
\c Experimental, \c DisabledByDefault, \c Required and \c Platform.
|
||||
\table
|
||||
\header
|
||||
@@ -25,10 +25,14 @@
|
||||
\li Value Type
|
||||
\li Meaning
|
||||
\row
|
||||
\li Name
|
||||
\li Id
|
||||
\li String
|
||||
\li This is used as an identifier for the plugin and can e.g.
|
||||
be referenced in other plugin's dependencies.
|
||||
\row
|
||||
\li Name
|
||||
\li String
|
||||
\li This is used as the display name of your plugin in the UI.
|
||||
\row
|
||||
\li Version
|
||||
\li String
|
||||
@@ -146,36 +150,37 @@
|
||||
these other plugins are loaded before this plugin.
|
||||
|
||||
Dependencies are declared with the key \c Dependency, which contains an array of JSON objects
|
||||
with required keys \c Name and \c Version, and optional key \c Type.
|
||||
with required keys \c Id and \c Version, and optional key \c Type.
|
||||
|
||||
The following formulas illustrate how the dependency information is matched.
|
||||
In the formulas the name of the required plugin (as defined in the \c Name of the dependency
|
||||
object) is denoted as \c DependencyName
|
||||
In the formulas the Id of the required plugin (as defined in the \c Id of the dependency
|
||||
object) is denoted as \c DependencyId
|
||||
and the required version of the plugin is denoted as \c DependencyVersion.
|
||||
A plugin with given \c Name, \c Version and \c CompatVersion
|
||||
A plugin with given \c Id, \c Version and \c CompatVersion
|
||||
as defined in the plugin meta data matches
|
||||
the dependency if
|
||||
\list
|
||||
\li its \c Name matches \c DependencyName, and
|
||||
\li its \c Id matches \c DependencyId, and
|
||||
\li \c {CompatVersion <= DependencyVersion <= Version}.
|
||||
\endlist
|
||||
For example a dependency
|
||||
\code
|
||||
{
|
||||
"Name" : "SomeOtherPlugin",
|
||||
"Id" : "someotherplugin",
|
||||
"Version" : "2.3.0_2"
|
||||
}
|
||||
\endcode
|
||||
would be matched by a plugin with
|
||||
\code
|
||||
{
|
||||
"Id" : "someotherplugin",
|
||||
"Name" : "SomeOtherPlugin",
|
||||
"Version" : "3.1.0",
|
||||
"CompatVersion" : "2.2.0",
|
||||
...
|
||||
}
|
||||
\endcode
|
||||
since the name matches, and the version \c{2.3.0_2} given in the dependency tag
|
||||
since the id matches, and the version \c{2.3.0_2} given in the dependency tag
|
||||
lies in the range of \c{2.2.0} and \c{3.1.0}.
|
||||
|
||||
\table
|
||||
@@ -196,9 +201,9 @@
|
||||
\li Value Type
|
||||
\li Meaning
|
||||
\row
|
||||
\li Name
|
||||
\li Id
|
||||
\li String
|
||||
\li The name of the plugin, on which this plugin relies.
|
||||
\li The Id of the plugin, on which this plugin relies.
|
||||
\row
|
||||
\li Version
|
||||
\li String
|
||||
@@ -298,9 +303,11 @@
|
||||
|
||||
\code
|
||||
{
|
||||
"Id" : "test",
|
||||
"Name" : "Test",
|
||||
"Version" : "1.0.1",
|
||||
"CompatVersion" : "1.0.0",
|
||||
"VendorId" : "mycompany",
|
||||
"Vendor" : "My Company",
|
||||
"Copyright" : "(C) 2016 MyCompany",
|
||||
"License" : [
|
||||
@@ -323,8 +330,8 @@
|
||||
}
|
||||
],
|
||||
"Dependencies" : [
|
||||
{ "Name" : "SomeOtherPlugin", "Version" : "2.3.0_2" },
|
||||
{ "Name" : "EvenOther", "Version" : "1.0.0" }
|
||||
{ "Id" : "someotherplugin", "Version" : "2.3.0_2" },
|
||||
{ "Id" : "evenother", "Version" : "1.0.0" }
|
||||
]
|
||||
}
|
||||
\endcode
|
||||
|
@@ -60,7 +60,7 @@ Module {
|
||||
var depdeps = deps[d].dependencies;
|
||||
for (var dd in depdeps) {
|
||||
if (depdeps[dd].name == 'pluginjson') {
|
||||
cmd.plugin_depends.push(deps[d].name);
|
||||
cmd.plugin_depends.push(deps[d].id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -87,13 +87,13 @@ Module {
|
||||
vars['QTC_PLUGIN_REVISION'] = product.vcs ? (product.vcs.repoState || "") : "";
|
||||
var deplist = [];
|
||||
for (i in plugin_depends) {
|
||||
deplist.push(" { \"Name\" : \"" + plugin_depends[i] + "\", \"Version\" : \"" + qtcVersion + "\" }");
|
||||
deplist.push(" { \"Id\" : \"" + plugin_depends[i] + "\", \"Version\" : \"" + qtcVersion + "\" }");
|
||||
}
|
||||
for (i in plugin_recommends) {
|
||||
deplist.push(" { \"Name\" : \"" + plugin_recommends[i] + "\", \"Version\" : \"" + qtcVersion + "\", \"Type\" : \"optional\" }");
|
||||
deplist.push(" { \"Id\" : \"" + plugin_recommends[i] + "\", \"Version\" : \"" + qtcVersion + "\", \"Type\" : \"optional\" }");
|
||||
}
|
||||
for (i in plugin_test_depends) {
|
||||
deplist.push(" { \"Name\" : \"" + plugin_test_depends[i] + "\", \"Version\" : \"" + qtcVersion + "\", \"Type\" : \"test\" }");
|
||||
deplist.push(" { \"Id\" : \"" + plugin_test_depends[i] + "\", \"Version\" : \"" + qtcVersion + "\", \"Type\" : \"test\" }");
|
||||
}
|
||||
deplist = deplist.join(",\n")
|
||||
vars['IDE_PLUGIN_DEPENDENCIES'] = "\"Dependencies\" : [\n" + deplist + "\n ]";
|
||||
@@ -109,4 +109,3 @@ Module {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,9 +1,11 @@
|
||||
-- Copyright (C) 2024 The Qt Company Ltd.
|
||||
-- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
return {
|
||||
Name = "AIAssistant",
|
||||
Id = "aiassistant",
|
||||
Name = "Qt AI Assistant",
|
||||
Version = "1.0.0",
|
||||
CompatVersion = "1.0.0",
|
||||
VendorId = "theqtcompany",
|
||||
Vendor = "The Qt Company",
|
||||
Category = "Language Client",
|
||||
Description = "Qt AI Assistant",
|
||||
@@ -17,8 +19,8 @@ You also need one of the following valid Qt licenses: Qt for Application Develop
|
||||
You will need access to a LLM for the suggestions. You can use a subscription to a commercial, cloud-hosted LLM, a privately hosted or on-premise LLM, or a Small Language Model running locally on your computer.
|
||||
]],
|
||||
Dependencies = {
|
||||
{ Name = "Lua", Version = "14.0.0" },
|
||||
{ Name = "LuaLanguageClient", Version = "14.0.0" }
|
||||
{ Id = "lua", Version = "14.0.0" },
|
||||
{ Id = "lualanguageclient", Version = "14.0.0" }
|
||||
},
|
||||
hooks = {
|
||||
editors = {
|
||||
|
@@ -1,9 +1,11 @@
|
||||
-- Copyright (C) 2024 The Qt Company Ltd.
|
||||
-- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
return {
|
||||
Id = "lualanguageserver",
|
||||
Name = "Lua Language Server",
|
||||
Version = "1.0.0",
|
||||
CompatVersion = "1.0.0",
|
||||
VendorId = "theqtcompany",
|
||||
Vendor = "The Qt Company",
|
||||
Category = "Language Client",
|
||||
Description = "The Lua Language Server",
|
||||
@@ -14,8 +16,8 @@ This plugin provides the Lua Language Server.
|
||||
It will try to install it if it is not found.
|
||||
]],
|
||||
Dependencies = {
|
||||
{ Name = "Lua", Version = "14.0.0" },
|
||||
{ Name = "LuaLanguageClient", Version = "14.0.0" }
|
||||
{ Id = "lua", Version = "14.0.0" },
|
||||
{ Id = "lualanguageclient", Version = "14.0.0" }
|
||||
},
|
||||
setup = function()
|
||||
require 'init'.setup()
|
||||
|
@@ -1,9 +1,11 @@
|
||||
-- Copyright (C) 2024 The Qt Company Ltd.
|
||||
-- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
return {
|
||||
Id = "luatests",
|
||||
Name = "Lua Tests",
|
||||
Version = "1.0.0",
|
||||
CompatVersion = "1.0.0",
|
||||
VendorId = "theqtcompany",
|
||||
Vendor = "The Qt Company",
|
||||
Category = "Tests",
|
||||
DisabledByDefault = true,
|
||||
@@ -13,7 +15,7 @@ return {
|
||||
It has tests for (almost) all functionality exposed by the API.
|
||||
]],
|
||||
Dependencies = {
|
||||
{ Name = "Lua", Version = "14.0.0" }
|
||||
{ Id = "lua", Version = "14.0.0" }
|
||||
},
|
||||
setup = function() require 'tests'.setup() end,
|
||||
printToOutputPane = true,
|
||||
|
@@ -1,9 +1,11 @@
|
||||
-- Copyright (C) 2024 The Qt Company Ltd.
|
||||
-- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
return {
|
||||
Id = "rustlanguageserver",
|
||||
Name = "Rust Language Server",
|
||||
Version = "1.0.0",
|
||||
CompatVersion = "1.0.0",
|
||||
VendorId = "theqtcompany",
|
||||
Vendor = "The Qt Company",
|
||||
Category = "Language Client",
|
||||
Description = "The Rust Language Server",
|
||||
@@ -14,8 +16,8 @@ This plugin provides the Rust Language Server.
|
||||
It will try to install it if it is not found.
|
||||
]],
|
||||
Dependencies = {
|
||||
{ Name = "Lua", Version = "14.0.0" },
|
||||
{ Name = "LuaLanguageClient", Version = "14.0.0" }
|
||||
{ Id = "lua", Version = "14.0.0" },
|
||||
{ Id = "lualanguageclient", Version = "14.0.0" }
|
||||
},
|
||||
setup = function()
|
||||
require 'init'.setup()
|
||||
|
@@ -41,14 +41,16 @@ local function setup()
|
||||
end
|
||||
|
||||
return {
|
||||
Id = "tellajoke",
|
||||
Name = "Tell A Joke",
|
||||
Version = "1.0.0",
|
||||
CompatVersion = "1.0.0",
|
||||
VendorId = "theqtcompany",
|
||||
Vendor = "The Qt Company",
|
||||
Category = "Fun",
|
||||
Description = "This plugin adds an action that tells a joke.",
|
||||
Dependencies = {
|
||||
{ Name = "Lua", Version = "14.0.0" },
|
||||
{ Id = "lua", Version = "14.0.0" },
|
||||
},
|
||||
setup = setup,
|
||||
} --[[@as QtcPlugin]]
|
||||
|
@@ -109,18 +109,18 @@ bool OptionsParser::checkForTestOptions()
|
||||
});
|
||||
} else {
|
||||
QStringList args = m_currentArg.split(QLatin1Char(','));
|
||||
const QString pluginName = args.takeFirst();
|
||||
if (PluginSpec *spec = m_pmPrivate->pluginByName(pluginName)) {
|
||||
const QString pluginId = args.takeFirst();
|
||||
if (PluginSpec *spec = m_pmPrivate->pluginById(pluginId.toLower())) {
|
||||
if (m_pmPrivate->containsTestSpec(spec)) {
|
||||
if (m_errorString)
|
||||
*m_errorString = Tr::tr("The plugin \"%1\" is specified twice for testing.").arg(pluginName);
|
||||
*m_errorString = Tr::tr("The plugin \"%1\" is specified twice for testing.").arg(pluginId);
|
||||
m_hasError = true;
|
||||
} else {
|
||||
m_pmPrivate->testSpecs.emplace_back(spec, args);
|
||||
}
|
||||
} else {
|
||||
if (m_errorString)
|
||||
*m_errorString = Tr::tr("The plugin \"%1\" does not exist.").arg(pluginName);
|
||||
*m_errorString = Tr::tr("The plugin \"%1\" does not exist.").arg(pluginId);
|
||||
m_hasError = true;
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ bool OptionsParser::checkForTestOptions()
|
||||
return true;
|
||||
} else if (m_currentArg == QLatin1String(NOTEST_OPTION)) {
|
||||
if (nextToken(RequiredToken)) {
|
||||
if (PluginSpec *spec = m_pmPrivate->pluginByName(m_currentArg)) {
|
||||
if (PluginSpec *spec = m_pmPrivate->pluginById(m_currentArg.toLower())) {
|
||||
if (!m_pmPrivate->containsTestSpec(spec)) {
|
||||
if (m_errorString)
|
||||
*m_errorString = Tr::tr("The plugin \"%1\" is not tested.").arg(m_currentArg);
|
||||
@@ -179,7 +179,7 @@ bool OptionsParser::checkForLoadOption()
|
||||
spec->setForceEnabled(true);
|
||||
m_isDependencyRefreshNeeded = true;
|
||||
} else {
|
||||
PluginSpec *spec = m_pmPrivate->pluginByName(m_currentArg);
|
||||
PluginSpec *spec = m_pmPrivate->pluginById(m_currentArg.toLower());
|
||||
if (!spec) {
|
||||
if (m_errorString)
|
||||
*m_errorString = Tr::tr("The plugin \"%1\" does not exist.").arg(m_currentArg);
|
||||
@@ -204,7 +204,7 @@ bool OptionsParser::checkForNoLoadOption()
|
||||
spec->setForceDisabled(true);
|
||||
m_isDependencyRefreshNeeded = true;
|
||||
} else {
|
||||
PluginSpec *spec = m_pmPrivate->pluginByName(m_currentArg);
|
||||
PluginSpec *spec = m_pmPrivate->pluginById(m_currentArg.toLower());
|
||||
if (!spec) {
|
||||
if (m_errorString)
|
||||
*m_errorString = Tr::tr("The plugin \"%1\" does not exist.").arg(m_currentArg);
|
||||
|
@@ -43,10 +43,12 @@ class PluginDetailsViewPrivate
|
||||
public:
|
||||
PluginDetailsViewPrivate(PluginDetailsView *detailsView)
|
||||
: q(detailsView)
|
||||
, id(createContentsLabel())
|
||||
, name(createContentsLabel())
|
||||
, version(createContentsLabel())
|
||||
, compatVersion(createContentsLabel())
|
||||
, vendor(createContentsLabel())
|
||||
, vendorId(createContentsLabel())
|
||||
, component(createContentsLabel())
|
||||
, url(createContentsLabel())
|
||||
, documentationUrl(createContentsLabel())
|
||||
@@ -62,10 +64,12 @@ public:
|
||||
|
||||
// clang-format off
|
||||
Form {
|
||||
Tr::tr("ID:"), id, br,
|
||||
Tr::tr("Name:"), name, br,
|
||||
Tr::tr("Version:"), version, br,
|
||||
Tr::tr("Compatibility version:"), compatVersion, br,
|
||||
Tr::tr("Vendor:"), vendor, br,
|
||||
Tr::tr("VendorId:"), vendorId, br,
|
||||
Tr::tr("Group:"), component, br,
|
||||
Tr::tr("URL:"), url, br,
|
||||
Tr::tr("Documentation:"), documentationUrl, br,
|
||||
@@ -83,10 +87,12 @@ public:
|
||||
|
||||
PluginDetailsView *q = nullptr;
|
||||
|
||||
QLabel *id = nullptr;
|
||||
QLabel *name = nullptr;
|
||||
QLabel *version = nullptr;
|
||||
QLabel *compatVersion = nullptr;
|
||||
QLabel *vendor = nullptr;
|
||||
QLabel *vendorId = nullptr;
|
||||
QLabel *component = nullptr;
|
||||
QLabel *url = nullptr;
|
||||
QLabel *documentationUrl = nullptr;
|
||||
@@ -140,6 +146,7 @@ PluginDetailsView::~PluginDetailsView()
|
||||
*/
|
||||
void PluginDetailsView::update(PluginSpec *spec)
|
||||
{
|
||||
d->id->setText(spec->id());
|
||||
d->name->setText(spec->name());
|
||||
const QString revision = spec->revision();
|
||||
const QString versionString = spec->version()
|
||||
@@ -147,6 +154,7 @@ void PluginDetailsView::update(PluginSpec *spec)
|
||||
d->version->setText(versionString);
|
||||
d->compatVersion->setText(spec->compatVersion());
|
||||
d->vendor->setText(spec->vendor());
|
||||
d->vendorId->setText(spec->vendorId());
|
||||
d->component->setText(spec->category().isEmpty() ? Tr::tr("None") : spec->category());
|
||||
const auto toHtmlLink = [](const QString &url) {
|
||||
return QString::fromLatin1("<a href=\"%1\">%1</a>").arg(url);
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include "pluginmanager.h"
|
||||
#include "pluginspec.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/layoutbuilder.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -79,7 +80,8 @@ PluginErrorOverview::PluginErrorOverview(QWidget *parent)
|
||||
for (PluginSpec *spec : PluginManager::plugins()) {
|
||||
// only show errors on startup if plugin is enabled.
|
||||
if (spec->hasError() && spec->isEffectivelyEnabled()) {
|
||||
QListWidgetItem *item = new QListWidgetItem(spec->name());
|
||||
const QString name = spec->displayName();
|
||||
QListWidgetItem *item = new QListWidgetItem(name);
|
||||
item->setData(Qt::UserRole, QVariant::fromValue(spec));
|
||||
pluginList->addItem(item);
|
||||
}
|
||||
|
@@ -772,9 +772,15 @@ void PluginManager::formatPluginOptions(QTextStream &str, int optionIndentation,
|
||||
for (PluginSpec *ps : std::as_const(d->pluginSpecs)) {
|
||||
const PluginSpec::PluginArgumentDescriptions pargs = ps->argumentDescriptions();
|
||||
if (!pargs.empty()) {
|
||||
str << "\nPlugin: " << ps->name() << '\n';
|
||||
str << "\nPlugin: " << ps->id() << '\n';
|
||||
for (const PluginArgumentDescription &pad : pargs)
|
||||
formatOption(str, pad.name, pad.parameter, pad.description, optionIndentation, descriptionIndentation);
|
||||
formatOption(
|
||||
str,
|
||||
pad.name,
|
||||
pad.parameter,
|
||||
pad.description,
|
||||
optionIndentation,
|
||||
descriptionIndentation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1006,18 +1012,24 @@ void PluginManagerPrivate::writeSettings()
|
||||
settings->setValueWithDefault(C_FORCEENABLED_PLUGINS, tempForceEnabledPlugins);
|
||||
}
|
||||
|
||||
static inline QStringList toLower(const QStringList &list)
|
||||
{
|
||||
return Utils::transform(list, [](const QString &s) { return s.toLower(); });
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
void PluginManagerPrivate::readSettings()
|
||||
{
|
||||
if (globalSettings) {
|
||||
defaultDisabledPlugins = globalSettings->value(C_IGNORED_PLUGINS).toStringList();
|
||||
defaultEnabledPlugins = globalSettings->value(C_FORCEENABLED_PLUGINS).toStringList();
|
||||
defaultDisabledPlugins = toLower(globalSettings->value(C_IGNORED_PLUGINS).toStringList());
|
||||
defaultEnabledPlugins = toLower(
|
||||
globalSettings->value(C_FORCEENABLED_PLUGINS).toStringList());
|
||||
}
|
||||
if (settings) {
|
||||
disabledPlugins = settings->value(C_IGNORED_PLUGINS).toStringList();
|
||||
forceEnabledPlugins = settings->value(C_FORCEENABLED_PLUGINS).toStringList();
|
||||
disabledPlugins = toLower(settings->value(C_IGNORED_PLUGINS).toStringList());
|
||||
forceEnabledPlugins = toLower(settings->value(C_FORCEENABLED_PLUGINS).toStringList());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1053,7 +1065,7 @@ void PluginManagerPrivate::checkForDuplicatePlugins()
|
||||
{
|
||||
QHash<QString, PluginSpec *> seen;
|
||||
for (PluginSpec *spec : pluginSpecs) {
|
||||
if (PluginSpec *other = seen.value(spec->name())) {
|
||||
if (PluginSpec *other = seen.value(spec->id())) {
|
||||
// Plugin with same name already there. We do not know, which version is the right one,
|
||||
// keep it simple and fail both (if enabled).
|
||||
if (spec->isEffectivelyEnabled() && other->isEffectivelyEnabled()) {
|
||||
@@ -1063,7 +1075,8 @@ void PluginManagerPrivate::checkForDuplicatePlugins()
|
||||
other->setError(error);
|
||||
}
|
||||
} else {
|
||||
seen.insert(spec->name(), spec);
|
||||
if (!spec->id().isEmpty())
|
||||
seen.insert(spec->id(), spec);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1551,15 +1564,15 @@ public:
|
||||
+ ".lock";
|
||||
}
|
||||
|
||||
static std::optional<QString> lockedPluginName(PluginManagerPrivate *pm)
|
||||
static std::optional<QString> lockedPluginId(PluginManagerPrivate *pm)
|
||||
{
|
||||
const QString lockFilePath = LockFile::filePath(pm);
|
||||
if (QFileInfo::exists(lockFilePath)) {
|
||||
QFile f(lockFilePath);
|
||||
if (f.open(QIODevice::ReadOnly)) {
|
||||
const auto pluginName = QString::fromUtf8(f.readLine()).trimmed();
|
||||
const auto pluginId = QString::fromUtf8(f.readLine()).trimmed();
|
||||
f.close();
|
||||
return pluginName;
|
||||
return pluginId;
|
||||
} else {
|
||||
qCDebug(pluginLog) << "Lock file" << lockFilePath << "exists but is not readable";
|
||||
}
|
||||
@@ -1591,9 +1604,9 @@ void PluginManagerPrivate::checkForProblematicPlugins()
|
||||
{
|
||||
if (!enableCrashCheck)
|
||||
return;
|
||||
const std::optional<QString> pluginName = LockFile::lockedPluginName(this);
|
||||
if (pluginName) {
|
||||
PluginSpec *spec = pluginByName(*pluginName);
|
||||
const std::optional<QString> pluginId = LockFile::lockedPluginId(this);
|
||||
if (pluginId) {
|
||||
PluginSpec *spec = pluginById(*pluginId);
|
||||
if (spec && !spec->isRequired()) {
|
||||
const QSet<PluginSpec *> dependents = PluginManager::pluginsRequiringPlugin(spec);
|
||||
auto dependentsNames = Utils::transform<QStringList>(dependents, &PluginSpec::name);
|
||||
@@ -1763,16 +1776,16 @@ void PluginManagerPrivate::addPlugins(const PluginSpecs &specs)
|
||||
for (PluginSpec *spec : specs) {
|
||||
// defaultDisabledPlugins and defaultEnabledPlugins from install settings
|
||||
// is used to override the defaults read from the plugin spec
|
||||
if (spec->isEnabledByDefault() && defaultDisabledPlugins.contains(spec->name())) {
|
||||
if (spec->isEnabledByDefault() && defaultDisabledPlugins.contains(spec->id())) {
|
||||
spec->setEnabledByDefault(false);
|
||||
spec->setEnabledBySettings(false);
|
||||
} else if (!spec->isEnabledByDefault() && defaultEnabledPlugins.contains(spec->name())) {
|
||||
} else if (!spec->isEnabledByDefault() && defaultEnabledPlugins.contains(spec->id())) {
|
||||
spec->setEnabledByDefault(true);
|
||||
spec->setEnabledBySettings(true);
|
||||
}
|
||||
if (!spec->isEnabledByDefault() && forceEnabledPlugins.contains(spec->name()))
|
||||
if (!spec->isEnabledByDefault() && forceEnabledPlugins.contains(spec->id()))
|
||||
spec->setEnabledBySettings(true);
|
||||
if (spec->isEnabledByDefault() && disabledPlugins.contains(spec->name()))
|
||||
if (spec->isEnabledByDefault() && disabledPlugins.contains(spec->id()))
|
||||
spec->setEnabledBySettings(false);
|
||||
|
||||
pluginCategories[spec->category()].append(spec);
|
||||
@@ -1838,10 +1851,9 @@ PluginSpec *PluginManagerPrivate::pluginForOption(const QString &option, bool *r
|
||||
// Look in the plugins for an option
|
||||
*requiresArgument = false;
|
||||
for (PluginSpec *spec : std::as_const(pluginSpecs)) {
|
||||
PluginArgumentDescription match = Utils::findOrDefault(spec->argumentDescriptions(),
|
||||
[option](PluginArgumentDescription pad) {
|
||||
return pad.name == option;
|
||||
});
|
||||
PluginArgumentDescription match = Utils::findOrDefault(
|
||||
spec->argumentDescriptions(),
|
||||
[option](PluginArgumentDescription pad) { return pad.name == option; });
|
||||
if (!match.name.isEmpty()) {
|
||||
*requiresArgument = !match.parameter.isEmpty();
|
||||
return spec;
|
||||
@@ -1850,9 +1862,10 @@ PluginSpec *PluginManagerPrivate::pluginForOption(const QString &option, bool *r
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PluginSpec *PluginManagerPrivate::pluginByName(const QString &name) const
|
||||
PluginSpec *PluginManagerPrivate::pluginById(const QString &id) const
|
||||
{
|
||||
return Utils::findOrDefault(pluginSpecs, [name](PluginSpec *spec) { return spec->name() == name; });
|
||||
QTC_CHECK(id.isLower()); // Plugin ids are always lower case. So the id argument should be too.
|
||||
return Utils::findOrDefault(pluginSpecs, [id](PluginSpec *spec) { return spec->id() == id; });
|
||||
}
|
||||
|
||||
void PluginManagerPrivate::increaseProfilingVerbosity()
|
||||
|
@@ -117,7 +117,7 @@ public:
|
||||
|
||||
// Look in argument descriptions of the specs for the option.
|
||||
PluginSpec *pluginForOption(const QString &option, bool *requiresArgument) const;
|
||||
PluginSpec *pluginByName(const QString &name) const;
|
||||
PluginSpec *pluginById(const QString &id) const;
|
||||
|
||||
static void addTestCreator(IPlugin *plugin, const std::function<QObject *()> &testCreator);
|
||||
|
||||
|
@@ -139,7 +139,7 @@ namespace ExtensionSystem {
|
||||
*/
|
||||
size_t qHash(const PluginDependency &value)
|
||||
{
|
||||
return qHash(value.name);
|
||||
return qHash(value.id);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -147,7 +147,7 @@ size_t qHash(const PluginDependency &value)
|
||||
*/
|
||||
bool PluginDependency::operator==(const PluginDependency &other) const
|
||||
{
|
||||
return name == other.name && version == other.version && type == other.type;
|
||||
return id == other.id && version == other.version && type == other.type;
|
||||
}
|
||||
|
||||
static QString typeString(PluginDependency::Type type)
|
||||
@@ -168,7 +168,7 @@ static QString typeString(PluginDependency::Type type)
|
||||
*/
|
||||
QString PluginDependency::toString() const
|
||||
{
|
||||
return name + " (" + version + typeString(type) + ")";
|
||||
return id + " (" + version + typeString(type) + ")";
|
||||
}
|
||||
|
||||
namespace Internal {
|
||||
@@ -186,9 +186,11 @@ class PluginSpecPrivate
|
||||
public:
|
||||
ExtensionSystem::PerformanceData performanceData;
|
||||
|
||||
QString id;
|
||||
QString name;
|
||||
QString version;
|
||||
QString compatVersion;
|
||||
QString vendorId;
|
||||
QString vendor;
|
||||
QString category;
|
||||
QString description;
|
||||
@@ -254,6 +256,26 @@ QString PluginSpec::name() const
|
||||
return d->name;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the plugin display name. This is valid after the PluginSpec::Read
|
||||
state is reached.
|
||||
*/
|
||||
QString PluginSpec::id() const
|
||||
{
|
||||
return d->id;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns either name(), or id() if name() is empty. If both are empty, returns "<unknown>".
|
||||
*/
|
||||
QString PluginSpec::displayName() const
|
||||
{
|
||||
return Utils::findOr(
|
||||
QStringList{name(), id(), filePath().fileName()},
|
||||
"<Unknown>",
|
||||
std::not_fn(&QString::isEmpty));
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the plugin version. This is valid after the PluginSpec::Read state
|
||||
is reached.
|
||||
@@ -281,6 +303,15 @@ QString PluginSpec::vendor() const
|
||||
return d->vendor;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the display name of the plugins vendor. This is valid after the PluginSpec::Read
|
||||
state is reached.
|
||||
*/
|
||||
QString PluginSpec::vendorId() const
|
||||
{
|
||||
return d->vendorId;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the plugin copyright. This is valid after the PluginSpec::Read
|
||||
state is reached.
|
||||
@@ -576,7 +607,7 @@ QString PluginSpec::errorString() const
|
||||
*/
|
||||
bool PluginSpec::provides(PluginSpec *spec, const PluginDependency &dependency) const
|
||||
{
|
||||
if (QString::compare(dependency.name, spec->name(), Qt::CaseInsensitive) != 0)
|
||||
if (QString::compare(dependency.id, spec->id(), Qt::CaseInsensitive) != 0)
|
||||
return false;
|
||||
|
||||
return (versionCompare(spec->version(), dependency.version) >= 0)
|
||||
@@ -674,6 +705,7 @@ PluginSpecs PluginSpec::enableDependenciesIndirectly(bool enableTestDependencies
|
||||
namespace {
|
||||
const char PLUGIN_METADATA[] = "MetaData";
|
||||
const char PLUGIN_NAME[] = "Name";
|
||||
const char PLUGIN_ID[] = "Id";
|
||||
const char PLUGIN_VERSION[] = "Version";
|
||||
const char PLUGIN_COMPATVERSION[] = "CompatVersion";
|
||||
const char PLUGIN_REQUIRED[] = "Required";
|
||||
@@ -682,6 +714,7 @@ namespace {
|
||||
const char PLUGIN_DEPRECATED[] = "Deprecated";
|
||||
const char PLUGIN_SOFTLOADABLE[] = "SoftLoadable";
|
||||
const char VENDOR[] = "Vendor";
|
||||
const char VENDOR_ID[] = "VendorId";
|
||||
const char COPYRIGHT[] = "Copyright";
|
||||
const char LICENSE[] = "License";
|
||||
const char DESCRIPTION[] = "Description";
|
||||
@@ -691,7 +724,7 @@ namespace {
|
||||
const char CATEGORY[] = "Category";
|
||||
const char PLATFORM[] = "Platform";
|
||||
const char DEPENDENCIES[] = "Dependencies";
|
||||
const char DEPENDENCY_NAME[] = "Name";
|
||||
const char DEPENDENCY_ID[] = "Id";
|
||||
const char DEPENDENCY_VERSION[] = "Version";
|
||||
const char DEPENDENCY_TYPE[] = "Type";
|
||||
const char DEPENDENCY_TYPE_SOFT[] = "optional";
|
||||
@@ -807,108 +840,145 @@ expected_str<void> CppPluginSpec::readMetaData(const QJsonObject &pluginMetaData
|
||||
return PluginSpec::readMetaData(value.toObject());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct Invert
|
||||
{
|
||||
T &value;
|
||||
Invert(T &value)
|
||||
: value(value)
|
||||
{}
|
||||
Invert &operator=(const T &other)
|
||||
{
|
||||
value = !other;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T>
|
||||
using copy_assign_t = decltype(std::declval<T &>() = std::declval<const T &>());
|
||||
|
||||
Utils::expected_str<void> PluginSpecPrivate::readMetaData(const QJsonObject &data)
|
||||
{
|
||||
metaData = data;
|
||||
|
||||
QJsonValue value = metaData.value(QLatin1String(PLUGIN_NAME));
|
||||
auto assign = [&data](QString &member, const char *fieldName) -> expected_str<void> {
|
||||
QJsonValue value = data.value(QLatin1String(fieldName));
|
||||
if (value.isUndefined())
|
||||
return reportError(msgValueMissing(PLUGIN_NAME));
|
||||
return make_unexpected(msgValueMissing(fieldName));
|
||||
if (!value.isString())
|
||||
return reportError(msgValueIsNotAString(PLUGIN_NAME));
|
||||
name = value.toString();
|
||||
return make_unexpected(msgValueIsNotAString(fieldName));
|
||||
member = value.toString();
|
||||
return {};
|
||||
};
|
||||
|
||||
value = metaData.value(QLatin1String(PLUGIN_VERSION));
|
||||
auto assignOr =
|
||||
[&data](auto &&member, const char *fieldName, auto &&defaultValue) -> expected_str<void> {
|
||||
QJsonValue value = data.value(QLatin1String(fieldName));
|
||||
if (value.isUndefined())
|
||||
return reportError(msgValueMissing(PLUGIN_VERSION));
|
||||
member = defaultValue;
|
||||
else {
|
||||
constexpr bool isBool = std::is_assignable<decltype(member), bool>::value;
|
||||
constexpr bool isString = std::is_assignable<decltype(member), QString>::value;
|
||||
|
||||
static_assert(isString || isBool, "Unsupported type");
|
||||
|
||||
if constexpr (isString) {
|
||||
if (!value.isString())
|
||||
return reportError(msgValueIsNotAString(PLUGIN_VERSION));
|
||||
version = value.toString();
|
||||
return make_unexpected(msgValueIsNotAString(fieldName));
|
||||
member = value.toString();
|
||||
} else if constexpr (isBool) {
|
||||
if (!value.isBool())
|
||||
return make_unexpected(msgValueIsNotABool(fieldName));
|
||||
member = value.toBool();
|
||||
}
|
||||
}
|
||||
return {};
|
||||
};
|
||||
|
||||
auto assignMultiLine = [&data](QString &member, const char *fieldName) -> expected_str<void> {
|
||||
QJsonValue value = data.value(QLatin1String(fieldName));
|
||||
if (value.isUndefined())
|
||||
return {};
|
||||
if (!readMultiLineString(value, &member))
|
||||
return make_unexpected(msgValueIsNotAMultilineString(fieldName));
|
||||
return {};
|
||||
};
|
||||
|
||||
if (auto r = assign(id, PLUGIN_ID); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
if (!id.isLower())
|
||||
return reportError(::ExtensionSystem::Tr::tr("Plugin id \"%1\" must be lowercase").arg(id));
|
||||
|
||||
if (auto r = assignOr(name, PLUGIN_NAME, id); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
if (auto r = assign(version, PLUGIN_VERSION); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
if (!PluginSpec::isValidVersion(version))
|
||||
return reportError(msgInvalidFormat(PLUGIN_VERSION, version));
|
||||
|
||||
value = metaData.value(QLatin1String(PLUGIN_COMPATVERSION));
|
||||
if (!value.isUndefined() && !value.isString())
|
||||
return reportError(msgValueIsNotAString(PLUGIN_COMPATVERSION));
|
||||
compatVersion = value.toString(version);
|
||||
if (!value.isUndefined() && !PluginSpec::isValidVersion(compatVersion))
|
||||
if (auto r = assignOr(compatVersion, PLUGIN_COMPATVERSION, version); !r.has_value())
|
||||
return reportError(r.error());
|
||||
if (!PluginSpec::isValidVersion(compatVersion))
|
||||
return reportError(msgInvalidFormat(PLUGIN_COMPATVERSION, compatVersion));
|
||||
|
||||
value = metaData.value(QLatin1String(PLUGIN_REQUIRED));
|
||||
if (!value.isUndefined() && !value.isBool())
|
||||
return reportError(msgValueIsNotABool(PLUGIN_REQUIRED));
|
||||
required = value.toBool(false);
|
||||
if (auto r = assignOr(required, PLUGIN_REQUIRED, false); !r.has_value())
|
||||
return reportError(r.error());
|
||||
qCDebug(pluginLog) << "required =" << required;
|
||||
|
||||
value = metaData.value(QLatin1String(PLUGIN_EXPERIMENTAL));
|
||||
if (!value.isUndefined() && !value.isBool())
|
||||
return reportError(msgValueIsNotABool(PLUGIN_EXPERIMENTAL));
|
||||
experimental = value.toBool(false);
|
||||
if (auto r = assignOr(experimental, PLUGIN_EXPERIMENTAL, false); !r.has_value())
|
||||
return reportError(r.error());
|
||||
qCDebug(pluginLog) << "experimental =" << experimental;
|
||||
|
||||
value = metaData.value(QLatin1String(PLUGIN_DEPRECATED));
|
||||
if (!value.isUndefined() && !value.isBool())
|
||||
return reportError(msgValueIsNotABool(PLUGIN_DEPRECATED));
|
||||
deprecated = value.toBool(false);
|
||||
if (auto r = assignOr(deprecated, PLUGIN_DEPRECATED, false); !r.has_value())
|
||||
return reportError(r.error());
|
||||
qCDebug(pluginLog) << "deprecated =" << deprecated;
|
||||
|
||||
value = metaData.value(QLatin1String(PLUGIN_DISABLED_BY_DEFAULT));
|
||||
if (!value.isUndefined() && !value.isBool())
|
||||
return reportError(msgValueIsNotABool(PLUGIN_DISABLED_BY_DEFAULT));
|
||||
enabledByDefault = !value.toBool(experimental || deprecated);
|
||||
qCDebug(pluginLog) << "enabledByDefault =" << enabledByDefault;
|
||||
if (auto r
|
||||
= assignOr(Invert(enabledByDefault), PLUGIN_DISABLED_BY_DEFAULT, experimental || deprecated);
|
||||
!r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
qCDebug(pluginLog) << "enabledByDefault =" << enabledByDefault;
|
||||
enabledBySettings = enabledByDefault;
|
||||
|
||||
value = metaData.value(QLatin1String(PLUGIN_SOFTLOADABLE));
|
||||
if (!value.isUndefined() && !value.isBool())
|
||||
return reportError(msgValueIsNotABool(PLUGIN_SOFTLOADABLE));
|
||||
softLoadable = value.toBool(false);
|
||||
if (auto r = assignOr(softLoadable, PLUGIN_SOFTLOADABLE, false); !r.has_value())
|
||||
return reportError(r.error());
|
||||
qCDebug(pluginLog) << "softLoadable =" << softLoadable;
|
||||
|
||||
value = metaData.value(QLatin1String(VENDOR));
|
||||
if (!value.isUndefined() && !value.isString())
|
||||
return reportError(msgValueIsNotAString(VENDOR));
|
||||
vendor = value.toString();
|
||||
if (auto r = assign(vendorId, VENDOR_ID); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value(QLatin1String(COPYRIGHT));
|
||||
if (!value.isUndefined() && !value.isString())
|
||||
return reportError(msgValueIsNotAString(COPYRIGHT));
|
||||
copyright = value.toString();
|
||||
if (auto r = assignOr(vendor, VENDOR, vendorId); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value(QLatin1String(DESCRIPTION));
|
||||
if (!value.isUndefined() && !readMultiLineString(value, &description))
|
||||
return reportError(msgValueIsNotAString(DESCRIPTION));
|
||||
if (auto r = assignOr(copyright, COPYRIGHT, QString{}); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value(QLatin1String(LONGDESCRIPTION));
|
||||
if (!value.isUndefined() && !readMultiLineString(value, &longDescription))
|
||||
return reportError(msgValueIsNotAString(LONGDESCRIPTION));
|
||||
if (auto r = assignMultiLine(description, DESCRIPTION); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value(QLatin1String(URL));
|
||||
if (!value.isUndefined() && !value.isString())
|
||||
return reportError(msgValueIsNotAString(URL));
|
||||
url = value.toString();
|
||||
if (auto r = assignMultiLine(longDescription, LONGDESCRIPTION); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value(QLatin1String(DOCUMENTATIONURL));
|
||||
if (!value.isUndefined() && !value.isString())
|
||||
return reportError(msgValueIsNotAString(DOCUMENTATIONURL));
|
||||
documentationUrl = value.toString();
|
||||
if (auto r = assignOr(url, URL, QString{}); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value(QLatin1String(CATEGORY));
|
||||
if (!value.isUndefined() && !value.isString())
|
||||
return reportError(msgValueIsNotAString(CATEGORY));
|
||||
category = value.toString();
|
||||
if (auto r = assignOr(documentationUrl, DOCUMENTATIONURL, QString{}); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value(QLatin1String(LICENSE));
|
||||
if (!value.isUndefined() && !readMultiLineString(value, &license))
|
||||
return reportError(msgValueIsNotAMultilineString(LICENSE));
|
||||
if (auto r = assignOr(category, CATEGORY, QString{}); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value("Revision");
|
||||
if (!value.isUndefined() && !value.isString())
|
||||
return reportError(msgValueIsNotAString("Revision"));
|
||||
revision = value.toString();
|
||||
if (auto r = assignMultiLine(license, LICENSE); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
value = metaData.value(QLatin1String(PLATFORM));
|
||||
if (auto r = assignOr(revision, "Revision", QString{}); !r.has_value())
|
||||
return reportError(r.error());
|
||||
|
||||
QJsonValue value = metaData.value(QLatin1String(PLATFORM));
|
||||
if (!value.isUndefined() && !value.isString())
|
||||
return reportError(msgValueIsNotAString(PLATFORM));
|
||||
const QString platformSpec = value.toString().trimmed();
|
||||
@@ -930,18 +1000,16 @@ Utils::expected_str<void> PluginSpecPrivate::readMetaData(const QJsonObject &dat
|
||||
return reportError(msgValueIsNotAObjectArray(DEPENDENCIES));
|
||||
QJsonObject dependencyObject = v.toObject();
|
||||
PluginDependency dep;
|
||||
value = dependencyObject.value(QLatin1String(DEPENDENCY_NAME));
|
||||
value = dependencyObject.value(QLatin1String(DEPENDENCY_ID));
|
||||
if (value.isUndefined()) {
|
||||
return reportError(
|
||||
::ExtensionSystem::Tr::tr("Dependency: %1")
|
||||
.arg(msgValueMissing(DEPENDENCY_NAME)));
|
||||
::ExtensionSystem::Tr::tr("Dependency: %1").arg(msgValueMissing(DEPENDENCY_ID)));
|
||||
}
|
||||
if (!value.isString()) {
|
||||
return reportError(
|
||||
::ExtensionSystem::Tr::tr("Dependency: %1")
|
||||
.arg(msgValueIsNotAString(DEPENDENCY_NAME)));
|
||||
return reportError(::ExtensionSystem::Tr::tr("Dependency: %1")
|
||||
.arg(msgValueIsNotAString(DEPENDENCY_ID)));
|
||||
}
|
||||
dep.name = value.toString();
|
||||
dep.id = value.toString();
|
||||
value = dependencyObject.value(QLatin1String(DEPENDENCY_VERSION));
|
||||
if (!value.isUndefined() && !value.isString()) {
|
||||
return reportError(
|
||||
@@ -1098,7 +1166,7 @@ bool PluginSpec::resolveDependencies(const PluginSpecs &specs)
|
||||
if (dependency.type == PluginDependency::Required) {
|
||||
const QString error = ::ExtensionSystem::Tr::tr(
|
||||
"Could not resolve dependency '%1(%2)'")
|
||||
.arg(dependency.name, dependency.version);
|
||||
.arg(dependency.id, dependency.version);
|
||||
if (hasError())
|
||||
setError(errorString() + '\n' + error);
|
||||
else
|
||||
|
@@ -39,13 +39,13 @@ struct EXTENSIONSYSTEM_EXPORT PluginDependency
|
||||
enum Type { Required, Optional, Test };
|
||||
|
||||
PluginDependency() : type(Required) {}
|
||||
PluginDependency(const QString &name, const QString &version, Type type = Required)
|
||||
: name(name)
|
||||
PluginDependency(const QString &id, const QString &version, Type type = Required)
|
||||
: id(id)
|
||||
, version(version)
|
||||
, type(type)
|
||||
{}
|
||||
|
||||
QString name;
|
||||
QString id;
|
||||
QString version;
|
||||
Type type;
|
||||
bool operator==(const PluginDependency &other) const;
|
||||
@@ -96,9 +96,11 @@ public:
|
||||
|
||||
// information read from the plugin, valid after 'Read' state is reached
|
||||
virtual QString name() const;
|
||||
virtual QString id() const;
|
||||
virtual QString version() const;
|
||||
virtual QString compatVersion() const;
|
||||
virtual QString vendor() const;
|
||||
virtual QString vendorId() const;
|
||||
virtual QString copyright() const;
|
||||
virtual QString license() const;
|
||||
virtual QString description() const;
|
||||
@@ -109,6 +111,8 @@ public:
|
||||
virtual QString revision() const;
|
||||
virtual QRegularExpression platformSpecification() const;
|
||||
|
||||
virtual QString displayName() const;
|
||||
|
||||
virtual bool isAvailableForHostPlatform() const;
|
||||
virtual bool isRequired() const;
|
||||
virtual bool isExperimental() const;
|
||||
|
@@ -96,24 +96,29 @@ public:
|
||||
QVariant data(int column, int role) const override
|
||||
{
|
||||
switch (column) {
|
||||
case NameColumn:
|
||||
case NameColumn: {
|
||||
const QString displayName = m_spec->displayName();
|
||||
if (role == Qt::DisplayRole) {
|
||||
if (m_spec->isDeprecated()) {
|
||||
//: %1 is a plugin name
|
||||
return Tr::tr("%1 (deprecated)").arg(m_spec->name());
|
||||
}
|
||||
//: %1 is a plugin name
|
||||
return m_spec->isExperimental() ? Tr::tr("%1 (experimental)").arg(m_spec->name())
|
||||
: m_spec->name();
|
||||
QStringList decoration;
|
||||
if (m_spec->isDeprecated())
|
||||
decoration.append(Tr::tr("deprecated"));
|
||||
if (m_spec->isExperimental())
|
||||
decoration.append(Tr::tr("experimental"));
|
||||
|
||||
if (decoration.isEmpty())
|
||||
return displayName;
|
||||
return QString::fromLatin1("%1 (%2)")
|
||||
.arg(displayName, decoration.join(QLatin1Char(',')));
|
||||
}
|
||||
if (role == SortRole)
|
||||
return m_spec->name();
|
||||
return displayName;
|
||||
if (role == Qt::ToolTipRole) {
|
||||
QString toolTip;
|
||||
if (!m_spec->isAvailableForHostPlatform())
|
||||
toolTip = Tr::tr("Path: %1\nPlugin is not available on this platform.");
|
||||
else if (m_spec->isEnabledIndirectly())
|
||||
toolTip = Tr::tr("Path: %1\nPlugin is enabled as dependency of an enabled plugin.");
|
||||
toolTip = Tr::tr(
|
||||
"Path: %1\nPlugin is enabled as dependency of an enabled plugin.");
|
||||
else if (m_spec->isForceEnabled())
|
||||
toolTip = Tr::tr("Path: %1\nPlugin is enabled by command line argument.");
|
||||
else if (m_spec->isForceDisabled())
|
||||
@@ -130,6 +135,7 @@ public:
|
||||
return i;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case LoadedColumn:
|
||||
if (!m_spec->isAvailableForHostPlatform()) {
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "android",
|
||||
"Name" : "Android",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "kdenecessitas",
|
||||
"Vendor" : "KDE Necessitas",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"Id" : "appstatisticsmonitor",
|
||||
"Name" : "AppStatisticsMonitor",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"DisabledByDefault" : ${APPSTATISTICSMONITOR_DISABLEDBYDEFAULT},
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "autotest",
|
||||
"Name" : "AutoTest",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "autotoolsprojectmanager",
|
||||
"Name" : "AutotoolsProjectManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"VendorId" : "openismusgmbh",
|
||||
"Vendor" : "Openismus GmbH",
|
||||
"Copyright" : "(C) 2016 Openismus GmbH, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"Id" : "axivion",
|
||||
"Name" : "Axivion",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Revision" : "${QTC_PLUGIN_REVISION}",
|
||||
"Experimental" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "baremetal",
|
||||
"Name" : "BareMetal",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"VendorId" : "timsander",
|
||||
"Vendor" : "Tim Sander",
|
||||
"Copyright" : "(C) 2016 Tim Sander, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "bazaar",
|
||||
"Name" : "Bazaar",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "huguesdelorme",
|
||||
"Vendor" : "Hugues Delorme",
|
||||
"Copyright" : "(C) 2016 Hugues Delorme, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "beautifier",
|
||||
"Name" : "Beautifier",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"VendorId" : "lorenzhaas",
|
||||
"Vendor" : "Lorenz Haas",
|
||||
"Copyright" : "(C) 2017 Lorenz Haas, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "bineditor",
|
||||
"Name" : "BinEditor",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "boot2qt",
|
||||
"Name" : "Boot2Qt",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "clangcodemodel",
|
||||
"Name" : "ClangCodeModel",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "clangformat",
|
||||
"Name" : "ClangFormat",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "clangtools",
|
||||
"Name" : "ClangTools",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "classview",
|
||||
"Name" : "ClassView",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) 2016 Denis Mingulov, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"Id" : "clearcase",
|
||||
"Name" : "ClearCase",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"Platform" : "^(Linux|Windows)",
|
||||
"VendorId" : "audiocodes",
|
||||
"Vendor" : "AudioCodes",
|
||||
"Copyright" : "(C) 2016 AudioCodes Ltd., (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "cmakeprojectmanager",
|
||||
"Name" : "CMakeProjectManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "coco",
|
||||
"Name" : "Coco",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "compilationdatabaseprojectmanager",
|
||||
"Name" : "CompilationDatabaseProjectManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"Id" : "compilerexplorer",
|
||||
"Name" : "CompilerExplorer",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"SoftLoadable" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "conan",
|
||||
"Name" : "Conan",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "jochenseemann",
|
||||
"Vendor" : "Jochen Seemann",
|
||||
"Copyright" : "(C) 2018 Jochen Seemann, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "copilot",
|
||||
"Name" : "Copilot",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "core",
|
||||
"Name" : "Core",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Required" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -92,6 +92,7 @@ signals:
|
||||
|
||||
private:
|
||||
LogCategoryRegistry() = default;
|
||||
~LogCategoryRegistry() { QLoggingCategory::installFilter(s_oldFilter); }
|
||||
|
||||
void onFilter(QLoggingCategory *category)
|
||||
{
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "codepaster",
|
||||
"Name" : "CodePaster",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "cppcheck",
|
||||
"Name" : "Cppcheck",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"VendorId" : "sergeymorozov",
|
||||
"Vendor" : "Sergey Morozov",
|
||||
"Copyright" : "(C) 2018 Sergey Morozov, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "cppeditor",
|
||||
"Name" : "CppEditor",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "ctfvisualizer",
|
||||
"Name" : "CtfVisualizer",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Vendor" : "KDAB Group, www.kdab.com",
|
||||
"VendorId" : "kdab",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com",
|
||||
"License" : [ "Commercial Usage",
|
||||
"",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "cvs",
|
||||
"Name" : "CVS",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "debugger",
|
||||
"Name" : "Debugger",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "designer",
|
||||
"Name" : "Designer",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "diffeditor",
|
||||
"Name" : "DiffEditor",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "docker",
|
||||
"Name" : "Docker",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "effectcomposer",
|
||||
"Name" : "EffectComposer",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
@@ -13,4 +15,3 @@
|
||||
"DisabledByDefault" : true,
|
||||
${IDE_PLUGIN_DEPENDENCIES}
|
||||
}
|
||||
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"Id" : "emacskeys",
|
||||
"Name" : "EmacsKeys",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"SoftLoadable" : true,
|
||||
"VendorId" : "nsf",
|
||||
"Vendor" : "nsf",
|
||||
"Copyright" : "(C) 2016 nsf <no.smile.face@gmail.com>, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "extensionmanager",
|
||||
"Name" : "ExtensionManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -226,7 +226,7 @@ public:
|
||||
|
||||
const ItemType itemType = current.data(RoleItemType).value<ItemType>();
|
||||
const bool isPack = itemType == ItemTypePack;
|
||||
const bool isRemotePlugin = !(isPack || pluginSpecForName(name));
|
||||
const bool isRemotePlugin = !(isPack || pluginSpecForId(current.data(RoleId).toString()));
|
||||
installButton->setVisible(isRemotePlugin && !pluginData.empty());
|
||||
if (installButton->isVisible())
|
||||
installButton->setToolTip(pluginData.constFirst().second);
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
}.attachTo(this);
|
||||
|
||||
connect(m_switch, &QCheckBox::clicked, this, [this](bool checked) {
|
||||
ExtensionSystem::PluginSpec *spec = pluginSpecForName(m_pluginName);
|
||||
ExtensionSystem::PluginSpec *spec = pluginSpecForId(m_pluginId);
|
||||
if (spec == nullptr)
|
||||
return;
|
||||
const bool doIt = m_pluginView.data().setPluginsEnabled({spec}, checked);
|
||||
@@ -290,16 +290,16 @@ public:
|
||||
update();
|
||||
}
|
||||
|
||||
void setPluginName(const QString &name)
|
||||
void setPluginId(const QString &id)
|
||||
{
|
||||
m_pluginName = name;
|
||||
m_pluginId = id;
|
||||
update();
|
||||
}
|
||||
|
||||
private:
|
||||
void update()
|
||||
{
|
||||
const ExtensionSystem::PluginSpec *spec = pluginSpecForName(m_pluginName);
|
||||
const ExtensionSystem::PluginSpec *spec = pluginSpecForId(m_pluginId);
|
||||
setVisible(spec != nullptr);
|
||||
if (spec == nullptr)
|
||||
return;
|
||||
@@ -322,7 +322,7 @@ private:
|
||||
InfoLabel *m_label;
|
||||
Switch *m_switch;
|
||||
QAbstractButton *m_restartButton;
|
||||
QString m_pluginName;
|
||||
QString m_pluginId;
|
||||
ExtensionSystem::PluginView m_pluginView{this};
|
||||
};
|
||||
|
||||
@@ -583,9 +583,9 @@ void ExtensionManagerWidget::updateView(const QModelIndex ¤t)
|
||||
if (!showContent)
|
||||
return;
|
||||
|
||||
m_currentItemName = current.data().toString();
|
||||
m_currentItemName = current.data(RoleName).toString();
|
||||
const bool isPack = current.data(RoleItemType) == ItemTypePack;
|
||||
m_pluginStatus->setPluginName(isPack ? QString() : m_currentItemName);
|
||||
m_pluginStatus->setPluginId(isPack ? QString() : current.data(RoleId).toString());
|
||||
m_currentItemPlugins = current.data(RolePlugins).value<PluginsData>();
|
||||
|
||||
auto toContentParagraph = [](const QString &text) {
|
||||
|
@@ -220,7 +220,7 @@ public:
|
||||
x += iconBgSizeSmall.width() + ExPaddingGapL;
|
||||
y += ExPaddingGapL;
|
||||
const QRect itemNameR(x, y, middleColumnW, itemNameTF.lineHeight());
|
||||
const QString itemName = index.data().toString();
|
||||
const QString itemName = index.data(RoleName).toString();
|
||||
|
||||
const QSize checkmarkS(12, 12);
|
||||
const QRect checkmarkR(x + middleColumnW - checkmarkS.width(), y,
|
||||
@@ -714,7 +714,7 @@ QPixmap itemIcon(const QModelIndex &index, Size size)
|
||||
pixmap.setDevicePixelRatio(dpr);
|
||||
const QRect iconBgR(QPoint(), pixmap.deviceIndependentSize().toSize());
|
||||
|
||||
const PluginSpec *ps = pluginSpecForName(index.data(RoleName).toString());
|
||||
const PluginSpec *ps = pluginSpecForId(index.data(RoleId).toString());
|
||||
const bool isEnabled = ps == nullptr || ps->isEffectivelyEnabled();
|
||||
const QGradientStops gradientStops = {
|
||||
{0, creatorColor(isEnabled ? Theme::Token_Gradient01_Start
|
||||
|
@@ -21,6 +21,8 @@
|
||||
#include <QStandardItemModel>
|
||||
#include <QVersionNumber>
|
||||
|
||||
#include <functional>
|
||||
|
||||
using namespace ExtensionSystem;
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
@@ -31,7 +33,7 @@ Q_LOGGING_CATEGORY(modelLog, "qtc.extensionmanager.model", QtWarningMsg)
|
||||
|
||||
struct Dependency
|
||||
{
|
||||
QString name;
|
||||
QString id;
|
||||
QString version;
|
||||
};
|
||||
using Dependencies = QList<Dependency>;
|
||||
@@ -41,6 +43,7 @@ struct Plugin
|
||||
QString copyright;
|
||||
Dependencies dependencies;
|
||||
bool isInternal = false;
|
||||
QString id;
|
||||
QString name;
|
||||
QString packageUrl;
|
||||
QString vendor;
|
||||
@@ -68,6 +71,7 @@ struct Extension {
|
||||
QStringList tags;
|
||||
ItemType type = ItemTypePack;
|
||||
QString vendor;
|
||||
QString vendorId;
|
||||
QString version;
|
||||
};
|
||||
using Extensions = QList<Extension>;
|
||||
@@ -80,7 +84,7 @@ static const Dependencies dependenciesFromJson(const QJsonObject &obj)
|
||||
const QJsonObject dependencyObj = dependencyVal.toObject();
|
||||
const QJsonObject metaDataObj = dependencyObj.value("meta_data").toObject();
|
||||
dependencies.append({
|
||||
.name = metaDataObj.value("Name").toString(),
|
||||
.id = metaDataObj.value("Id").toString(),
|
||||
.version = metaDataObj.value("Version").toString(),
|
||||
});
|
||||
}
|
||||
@@ -96,6 +100,7 @@ static Plugin pluginFromJson(const QJsonObject &obj)
|
||||
.copyright = metaDataObj.value("Copyright").toString(),
|
||||
.dependencies = dependenciesFromJson(metaDataObj),
|
||||
.isInternal = obj.value("is_internal").toBool(false),
|
||||
.id = metaDataObj.value("Id").toString(),
|
||||
.name = metaDataObj.value("Name").toString(),
|
||||
.packageUrl = obj.value("url").toString(),
|
||||
.vendor = metaDataObj.value("Vendor").toString(),
|
||||
@@ -182,6 +187,7 @@ static Extension extensionFromJson(const QJsonObject &obj)
|
||||
.tags = tags,
|
||||
.type = obj.value("is_pack").toBool(true) ? ItemTypePack : ItemTypeExtension,
|
||||
.vendor = obj.value("vendor").toString(),
|
||||
.vendorId = obj.value("vendor_id").toString(),
|
||||
.version = obj.value("version").toString(),
|
||||
};
|
||||
|
||||
@@ -204,16 +210,17 @@ static Extensions parseExtensionsRepoReply(const QByteArray &jsonData)
|
||||
|
||||
static Extension extensionFromPluginSpec(const PluginSpec *pluginSpec)
|
||||
{
|
||||
const Dependencies dependencies = transform(pluginSpec->dependencies(),
|
||||
[](const PluginDependency &pd) -> Dependency {
|
||||
const Dependencies dependencies
|
||||
= transform(pluginSpec->dependencies(), [](const PluginDependency &pd) -> Dependency {
|
||||
return {
|
||||
.name = pd.name,
|
||||
.id = pd.id,
|
||||
.version = pd.version,
|
||||
};
|
||||
});
|
||||
const Plugin plugin = {
|
||||
.copyright = pluginSpec->copyright(),
|
||||
.dependencies = dependencies,
|
||||
.id = pluginSpec->id(),
|
||||
.name = pluginSpec->name(),
|
||||
.packageUrl = {},
|
||||
.vendor = pluginSpec->vendor(),
|
||||
@@ -243,7 +250,7 @@ static Extension extensionFromPluginSpec(const PluginSpec *pluginSpec)
|
||||
.compatVersion = pluginSpec->compatVersion(),
|
||||
.copyright = pluginSpec->copyright(),
|
||||
.description = description,
|
||||
.id = {},
|
||||
.id = pluginSpec->id(),
|
||||
.license = pluginSpec->license(),
|
||||
.name = pluginSpec->name(),
|
||||
.platforms = platforms,
|
||||
@@ -251,6 +258,7 @@ static Extension extensionFromPluginSpec(const PluginSpec *pluginSpec)
|
||||
.tags = {},
|
||||
.type = ItemTypeExtension,
|
||||
.vendor = pluginSpec->vendor(),
|
||||
.vendorId = pluginSpec->vendorId(),
|
||||
.version = pluginSpec->version(),
|
||||
};
|
||||
return extension;
|
||||
@@ -302,8 +310,8 @@ static QStringList dependenciesFromExtension(const Extension &extension)
|
||||
QStringList dependencies;
|
||||
for (const Plugin &plugin : extension.plugins) {
|
||||
for (const Dependency &dependency : plugin.dependencies) {
|
||||
const QString withVersion = QString::fromLatin1("%1 (%2)").arg(dependency.name)
|
||||
.arg(dependency.version);
|
||||
const QString withVersion
|
||||
= QString::fromLatin1("%1 (%2)").arg(dependency.id).arg(dependency.version);
|
||||
dependencies.append(withVersion);
|
||||
}
|
||||
}
|
||||
@@ -317,7 +325,10 @@ static QVariant dataFromExtension(const Extension &extension, int role)
|
||||
switch (role) {
|
||||
case Qt::DisplayRole:
|
||||
case RoleName:
|
||||
return extension.name;
|
||||
return Utils::findOr(
|
||||
QStringList{extension.name, extension.id},
|
||||
"No name found",
|
||||
std::not_fn(&QString::isEmpty));
|
||||
case RoleCompatVersion:
|
||||
return extension.compatVersion;
|
||||
case RoleCopyright:
|
||||
@@ -345,7 +356,7 @@ static QVariant dataFromExtension(const Extension &extension, int role)
|
||||
case RolePlugins: {
|
||||
PluginsData plugins;
|
||||
for (const Plugin &plugin : extension.plugins)
|
||||
plugins.append(qMakePair(plugin.name, plugin.packageUrl));
|
||||
plugins.append(qMakePair(plugin.id, plugin.packageUrl));
|
||||
return QVariant::fromValue(plugins);
|
||||
}
|
||||
case RoleSize:
|
||||
@@ -356,6 +367,8 @@ static QVariant dataFromExtension(const Extension &extension, int role)
|
||||
return !extension.vendor.isEmpty() ? extension.vendor : QVariant();
|
||||
case RoleVersion:
|
||||
return !extension.version.isEmpty() ? extension.version : QVariant();
|
||||
case RoleVendorId:
|
||||
return extension.vendorId;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -367,7 +380,7 @@ ExtensionState extensionState(const QModelIndex &index)
|
||||
if (index.data(RoleItemType) != ItemTypeExtension)
|
||||
return None;
|
||||
|
||||
const PluginSpec *ps = pluginSpecForName(index.data(RoleName).toString());
|
||||
const PluginSpec *ps = pluginSpecForId(index.data(RoleId).toString());
|
||||
if (!ps)
|
||||
return NotInstalled;
|
||||
|
||||
@@ -398,9 +411,9 @@ QVariant ExtensionsModel::data(const QModelIndex &index, int role) const
|
||||
const QVariant extensionData = dataFromExtension(extension, role);
|
||||
// If data is unavailable, retrieve it from the first contained plugin
|
||||
if (extensionData.isNull() && !extension.plugins.isEmpty()) {
|
||||
const QString firstPluginName = extension.plugins.constFirst().name;
|
||||
const Extension firstPluginExtension =
|
||||
findOrDefault(d->extensions, Utils::equal(&Extension::name, firstPluginName));
|
||||
const QString firstPluginId = extension.plugins.constFirst().id;
|
||||
const Extension firstPluginExtension
|
||||
= findOrDefault(d->extensions, Utils::equal(&Extension::id, firstPluginId));
|
||||
if (firstPluginExtension.name.isEmpty())
|
||||
return {};
|
||||
return dataFromExtension(firstPluginExtension, role);
|
||||
@@ -416,9 +429,9 @@ void ExtensionsModel::setExtensionsJson(const QByteArray &json)
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
PluginSpec *pluginSpecForName(const QString &pluginName)
|
||||
PluginSpec *pluginSpecForId(const QString &pluginId)
|
||||
{
|
||||
return findOrDefault(PluginManager::plugins(), equal(&PluginSpec::name, pluginName));
|
||||
return findOrDefault(PluginManager::plugins(), equal(&PluginSpec::id, pluginId));
|
||||
}
|
||||
|
||||
} // ExtensionManager::Internal
|
||||
|
@@ -50,6 +50,7 @@ enum Role {
|
||||
RoleSize,
|
||||
RoleTags,
|
||||
RoleVendor,
|
||||
RoleVendorId,
|
||||
RoleVersion,
|
||||
};
|
||||
|
||||
@@ -68,7 +69,7 @@ private:
|
||||
class ExtensionsModelPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
ExtensionSystem::PluginSpec *pluginSpecForName(const QString &pluginName);
|
||||
ExtensionSystem::PluginSpec *pluginSpecForId(const QString &pluginId);
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
QObject *createExtensionsModelTest();
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "fakevim",
|
||||
"Name" : "FakeVim",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "fossil",
|
||||
"Name" : "Fossil",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"VendorId" : "arturshepilko",
|
||||
"Vendor" : "Artur Shepilko",
|
||||
"Copyright" : "(C) 2018 Artur Shepilko",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "genericprojectmanager",
|
||||
"Name" : "GenericProjectManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "git",
|
||||
"Name" : "Git",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "gitlab",
|
||||
"Name" : "GitLab",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "glsleditor",
|
||||
"Name" : "GLSLEditor",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "haskell",
|
||||
"Name" : "Haskell",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"VendorId" : "eikeziller",
|
||||
"Vendor" : "Eike Ziller",
|
||||
"Copyright" : "(C) Eike Ziller",
|
||||
"License" : "MIT",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "helloworld",
|
||||
"Name" : "HelloWorld",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "help",
|
||||
"Name" : "Help",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "imageviewer",
|
||||
"Name" : "ImageViewer",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "incredibuild",
|
||||
"Name" : "IncrediBuild",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Platform" : "^(Linux|Windows)",
|
||||
"VendorId" : "incredibuild",
|
||||
"Vendor" : "IncrediBuild",
|
||||
"Copyright" : "(C) IncrediBuild",
|
||||
"Category" : "Build Systems",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "insight",
|
||||
"Name" : "Insight",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Revision" : "${QTC_PLUGIN_REVISION}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "ios",
|
||||
"Name" : "Ios",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Platform" : "OS X.*",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "languageclient",
|
||||
"Name" : "Language Client",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"Id" : "lualanguageclient",
|
||||
"Name" : "Lua Language Client",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"LuaCompatibleVersion" : "14.0.0",
|
||||
"DisabledByDefault" : true,
|
||||
"SoftLoadable" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"Id" : "lua",
|
||||
"Name" : "Lua",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"LuaCompatibleVersion" : "14.0.0",
|
||||
"DisabledByDefault" : true,
|
||||
"SoftLoadable" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -95,14 +95,14 @@ ExtensionSystem::IPlugin *LuaPluginSpec::plugin() const
|
||||
|
||||
bool LuaPluginSpec::provides(PluginSpec *spec, const PluginDependency &dependency) const
|
||||
{
|
||||
if (QString::compare(dependency.name, spec->name(), Qt::CaseInsensitive) != 0)
|
||||
if (QString::compare(dependency.id, spec->id(), Qt::CaseInsensitive) != 0)
|
||||
return false;
|
||||
|
||||
const QString luaCompatibleVersion = spec->metaData().value("LuaCompatibleVersion").toString();
|
||||
|
||||
if (luaCompatibleVersion.isEmpty()) {
|
||||
qCWarning(luaPluginSpecLog)
|
||||
<< "The plugin" << spec->name()
|
||||
<< "The plugin" << spec->id()
|
||||
<< "does not specify a \"LuaCompatibleVersion\", but the lua plugin" << name()
|
||||
<< "requires it.";
|
||||
return false;
|
||||
|
@@ -9,10 +9,12 @@ PluginSpec = {}
|
||||
Qtc = {}
|
||||
|
||||
---@class (exact) QtcPlugin
|
||||
---@field Name string The name of the plugin.
|
||||
---@field Id string The id of the plugin.
|
||||
---@field Name string? The name of the plugin. ( Default: `Id` )
|
||||
---@field Version string The version of the plugin. (`major.minor.patch`)
|
||||
---@field CompatVersion string The lowest previous version of the plugin that this one is compatible to. (`major.minor.patch`)
|
||||
---@field Vendor string The vendor of the plugin.
|
||||
---@field VendorId string
|
||||
---@field Vendor string? The display name of the vendor of the plugin. ( Default: `VendorId` )
|
||||
---@field Category string The category of the plugin.
|
||||
---@field Dependencies? QtcPluginDependency[] The dependencies of the plugin.
|
||||
---@field Description? string A short one line description of the plugin.
|
||||
@@ -33,7 +35,7 @@ Qtc = {}
|
||||
QtcPlugin = {}
|
||||
|
||||
---@class QtcPluginDependency
|
||||
---@field Name string The name of the dependency.
|
||||
---@field Id string The name of the dependency.
|
||||
---@field Version string The version of the dependency. (`major.minor.patch`)
|
||||
---@field Required? "required"|"optional"|"test" Whether the dependency is required or not. (Default: "required")
|
||||
QtcPluginDependency = {}
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "macros",
|
||||
"Name" : "Macros",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "marketplace",
|
||||
"Name" : "Marketplace",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "mcusupport",
|
||||
"Name" : "McuSupport",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "mercurial",
|
||||
"Name" : "Mercurial",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "brianmcgillion",
|
||||
"Vendor" : "Brian McGillion",
|
||||
"Copyright" : "(C) 2016 Brian McGillion, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "mesonprojectmanager",
|
||||
"Name" : "MesonProjectManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "laboratory of plasma physics",
|
||||
"Vendor" : "Laboratory of Plasma Physics",
|
||||
"Experimental" : true,
|
||||
"DisabledByDefault" : true,
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "modeleditor",
|
||||
"Name" : "ModelEditor",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "jochenbecher",
|
||||
"Vendor" : "Jochen Becher",
|
||||
"Copyright" : "(C) 2017 Jochen Becher, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "nim",
|
||||
"Name" : "Nim",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "filippocucchetto",
|
||||
"Vendor" : "Filippo Cucchetto",
|
||||
"Copyright" : "(C) 2017 Filippo Cucchetto, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"Id" : "perforce",
|
||||
"Name" : "Perforce",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"DisabledByDefault" : true,
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "perfprofiler",
|
||||
"Name" : "PerfProfiler",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "projectexplorer",
|
||||
"Name" : "Project Explorer",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "python",
|
||||
"Name" : "Python",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qbsprojectmanager",
|
||||
"Name" : "QbsProjectManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmakeprojectmanager",
|
||||
"Name" : "QmakeProjectManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmldesigner",
|
||||
"Name" : "QmlDesigner",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmldesignerbase",
|
||||
"Name" : "QmlDesignerBase",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmldesignerlite",
|
||||
"Name" : "QmlDesignerLite",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmljseditor",
|
||||
"Name" : "QmlJSEditor",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmljstools",
|
||||
"Name" : "QmlJSTools",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmlpreview",
|
||||
"Name" : "QmlPreview",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmlprofiler",
|
||||
"Name" : "QmlProfiler",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qmlprojectmanager",
|
||||
"Name" : "QmlProjectManager",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qnx",
|
||||
"Name" : "Qnx",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "blackberry",
|
||||
"Vendor" : "BlackBerry",
|
||||
"Copyright" : "(C) 2017 BlackBerry, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"Id" : "qtapplicationmanagerintegration",
|
||||
"Name" : "QtApplicationManagerIntegration",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"Experimental" : true,
|
||||
"Revision" : "${QTC_PLUGIN_REVISION}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) 2020 Luxoft Sweden AB, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Id" : "qtsupport",
|
||||
"Name" : "QtSupport",
|
||||
"Version" : "${IDE_VERSION}",
|
||||
"CompatVersion" : "${IDE_VERSION_COMPAT}",
|
||||
"VendorId" : "theqtcompany",
|
||||
"Vendor" : "The Qt Company Ltd",
|
||||
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
|
||||
"License" : [ "Commercial Usage",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user