forked from qt-creator/qt-creator
ExtensionSystem: Some modernization
Mostly 'foreach'. Change-Id: I5390d03bb5cc37c3674b61cea6f5d22bae554ed2 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -170,7 +170,7 @@ bool OptionsParser::checkForLoadOption()
|
||||
return false;
|
||||
if (nextToken(RequiredToken)) {
|
||||
if (m_currentArg == QLatin1String("all")) {
|
||||
foreach (PluginSpec *spec, m_pmPrivate->pluginSpecs)
|
||||
for (PluginSpec *spec : qAsConst(m_pmPrivate->pluginSpecs))
|
||||
spec->d->setForceEnabled(true);
|
||||
m_isDependencyRefreshNeeded = true;
|
||||
} else {
|
||||
@@ -197,7 +197,7 @@ bool OptionsParser::checkForNoLoadOption()
|
||||
return false;
|
||||
if (nextToken(RequiredToken)) {
|
||||
if (m_currentArg == QLatin1String("all")) {
|
||||
foreach (PluginSpec *spec, m_pmPrivate->pluginSpecs)
|
||||
for (PluginSpec *spec : qAsConst(m_pmPrivate->pluginSpecs))
|
||||
spec->d->setForceDisabled(true);
|
||||
m_isDependencyRefreshNeeded = true;
|
||||
} else {
|
||||
@@ -210,7 +210,7 @@ bool OptionsParser::checkForNoLoadOption()
|
||||
} else {
|
||||
spec->d->setForceDisabled(true);
|
||||
// recursively disable all plugins that require this plugin
|
||||
foreach (PluginSpec *dependantSpec, PluginManager::pluginsRequiringPlugin(spec))
|
||||
for (PluginSpec *dependantSpec : PluginManager::pluginsRequiringPlugin(spec))
|
||||
dependantSpec->d->setForceDisabled(true);
|
||||
m_isDependencyRefreshNeeded = true;
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ PluginErrorOverview::PluginErrorOverview(QWidget *parent) :
|
||||
m_ui->setupUi(this);
|
||||
m_ui->buttonBox->addButton(tr("Continue"), QDialogButtonBox::AcceptRole);
|
||||
|
||||
foreach (PluginSpec *spec, PluginManager::plugins()) {
|
||||
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());
|
||||
|
@@ -359,11 +359,11 @@ const QStringList PluginManager::allErrors()
|
||||
/*!
|
||||
Returns all plugins that require \a spec to be loaded. Recurses into dependencies.
|
||||
*/
|
||||
QSet<PluginSpec *> PluginManager::pluginsRequiringPlugin(PluginSpec *spec)
|
||||
const QSet<PluginSpec *> PluginManager::pluginsRequiringPlugin(PluginSpec *spec)
|
||||
{
|
||||
QSet<PluginSpec *> dependingPlugins({spec});
|
||||
// recursively add plugins that depend on plugins that.... that depend on spec
|
||||
foreach (PluginSpec *spec, d->loadQueue()) {
|
||||
for (PluginSpec *spec : d->loadQueue()) {
|
||||
if (spec->requiresAny(dependingPlugins))
|
||||
dependingPlugins.insert(spec);
|
||||
}
|
||||
@@ -374,7 +374,7 @@ QSet<PluginSpec *> PluginManager::pluginsRequiringPlugin(PluginSpec *spec)
|
||||
/*!
|
||||
Returns all plugins that \a spec requires to be loaded. Recurses into dependencies.
|
||||
*/
|
||||
QSet<PluginSpec *> PluginManager::pluginsRequiredByPlugin(PluginSpec *spec)
|
||||
const QSet<PluginSpec *> PluginManager::pluginsRequiredByPlugin(PluginSpec *spec)
|
||||
{
|
||||
QSet<PluginSpec *> recursiveDependencies;
|
||||
recursiveDependencies.insert(spec);
|
||||
@@ -576,7 +576,7 @@ QString PluginManager::serializedArguments()
|
||||
{
|
||||
const QChar separator = QLatin1Char('|');
|
||||
QString rc;
|
||||
foreach (const PluginSpec *ps, plugins()) {
|
||||
for (const PluginSpec *ps : plugins()) {
|
||||
if (!ps->arguments().isEmpty()) {
|
||||
if (!rc.isEmpty())
|
||||
rc += separator;
|
||||
@@ -593,7 +593,7 @@ QString PluginManager::serializedArguments()
|
||||
if (!rc.isEmpty())
|
||||
rc += separator;
|
||||
rc += QLatin1String(argumentKeywordC);
|
||||
foreach (const QString &argument, d->arguments)
|
||||
for (const QString &argument : qAsConst(d->arguments))
|
||||
rc += separator + argument;
|
||||
}
|
||||
return rc;
|
||||
@@ -633,7 +633,7 @@ void PluginManager::remoteArguments(const QString &serializedArgument, QObject *
|
||||
const QStringList pwdValue = subList(serializedArguments, QLatin1String(pwdKeywordC));
|
||||
const QString workingDirectory = pwdValue.isEmpty() ? QString() : pwdValue.first();
|
||||
const QStringList arguments = subList(serializedArguments, QLatin1String(argumentKeywordC));
|
||||
foreach (const PluginSpec *ps, plugins()) {
|
||||
for (const PluginSpec *ps : plugins()) {
|
||||
if (ps->state() == PluginSpec::Running) {
|
||||
const QStringList pluginOptions = subList(serializedArguments, QLatin1Char(':') + ps->name());
|
||||
QObject *socketParent = ps->plugin()->remoteCommand(pluginOptions, workingDirectory,
|
||||
@@ -747,11 +747,11 @@ void PluginManager::formatOptions(QTextStream &str, int optionIndentation, int d
|
||||
void PluginManager::formatPluginOptions(QTextStream &str, int optionIndentation, int descriptionIndentation)
|
||||
{
|
||||
// Check plugins for options
|
||||
foreach (PluginSpec *ps, d->pluginSpecs) {
|
||||
for (PluginSpec *ps : qAsConst(d->pluginSpecs)) {
|
||||
const PluginSpec::PluginArgumentDescriptions pargs = ps->argumentDescriptions();
|
||||
if (!pargs.empty()) {
|
||||
str << "\nPlugin: " << ps->name() << '\n';
|
||||
foreach (PluginArgumentDescription pad, pargs)
|
||||
for (const PluginArgumentDescription &pad : pargs)
|
||||
formatOption(str, pad.name, pad.parameter, pad.description, optionIndentation, descriptionIndentation);
|
||||
}
|
||||
}
|
||||
@@ -762,7 +762,7 @@ void PluginManager::formatPluginOptions(QTextStream &str, int optionIndentation,
|
||||
*/
|
||||
void PluginManager::formatPluginVersions(QTextStream &str)
|
||||
{
|
||||
foreach (PluginSpec *ps, d->pluginSpecs)
|
||||
for (PluginSpec *ps : qAsConst(d->pluginSpecs))
|
||||
str << " " << ps->name() << ' ' << ps->version() << ' ' << ps->description() << '\n';
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ void PluginManagerPrivate::writeSettings()
|
||||
return;
|
||||
QStringList tempDisabledPlugins;
|
||||
QStringList tempForceEnabledPlugins;
|
||||
foreach (PluginSpec *spec, pluginSpecs) {
|
||||
for (PluginSpec *spec : qAsConst(pluginSpecs)) {
|
||||
if (spec->isEnabledByDefault() && !spec->isEnabledBySettings())
|
||||
tempDisabledPlugins.append(spec->name());
|
||||
if (!spec->isEnabledByDefault() && spec->isEnabledBySettings())
|
||||
@@ -923,10 +923,10 @@ void PluginManagerPrivate::stopAll()
|
||||
delete delayedInitializeTimer;
|
||||
delayedInitializeTimer = nullptr;
|
||||
}
|
||||
QVector<PluginSpec *> queue = loadQueue();
|
||||
foreach (PluginSpec *spec, queue) {
|
||||
|
||||
const QVector<PluginSpec *> queue = loadQueue();
|
||||
for (PluginSpec *spec : queue)
|
||||
loadPlugin(spec, PluginSpec::Stopped);
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1001,7 +1001,7 @@ static QStringList matchingTestFunctions(const QStringList &testFunctions,
|
||||
|
||||
const QRegExp regExp(testFunctionName, Qt::CaseSensitive, QRegExp::Wildcard);
|
||||
QStringList matchingFunctions;
|
||||
foreach (const QString &testFunction, testFunctions) {
|
||||
for (const QString &testFunction : testFunctions) {
|
||||
if (regExp.exactMatch(testFunction)) {
|
||||
// If the specified test data is invalid, the QTest framework will
|
||||
// print a reasonable error message for us.
|
||||
@@ -1058,7 +1058,7 @@ static TestPlan generateCompleteTestPlan(IPlugin *plugin, const QVector<QObject
|
||||
TestPlan testPlan;
|
||||
|
||||
testPlan.insert(plugin, testFunctions(plugin->metaObject()));
|
||||
foreach (QObject *testObject, testObjects) {
|
||||
for (QObject *testObject : testObjects) {
|
||||
const QStringList allFunctions = testFunctions(testObject->metaObject());
|
||||
testPlan.insert(testObject, allFunctions);
|
||||
}
|
||||
@@ -1096,7 +1096,7 @@ static TestPlan generateCustomTestPlan(IPlugin *plugin,
|
||||
|
||||
} else {
|
||||
// Add all matching test functions of all remaining test objects
|
||||
foreach (QObject *testObject, remainingTestObjectsOfPlugin) {
|
||||
for (QObject *testObject : qAsConst(remainingTestObjectsOfPlugin)) {
|
||||
const QStringList allFunctions = testFunctions(testObject->metaObject());
|
||||
const QStringList matchingFunctions = matchingTestFunctions(allFunctions,
|
||||
matchText);
|
||||
@@ -1119,7 +1119,7 @@ static TestPlan generateCustomTestPlan(IPlugin *plugin,
|
||||
out << "No test function or class matches \"" << matchText
|
||||
<< "\" in plugin \"" << plugin->metaObject()->className()
|
||||
<< "\".\nAvailable functions:\n";
|
||||
foreach (const QString &f, testFunctionsOfPluginObject)
|
||||
for (const QString &f : testFunctionsOfPluginObject)
|
||||
out << " " << f << '\n';
|
||||
out << endl;
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ void PluginManagerPrivate::startTests()
|
||||
}
|
||||
|
||||
int failedTests = 0;
|
||||
foreach (const PluginManagerPrivate::TestSpec &testSpec, testSpecs) {
|
||||
for (const TestSpec &testSpec : qAsConst(testSpecs)) {
|
||||
IPlugin *plugin = testSpec.pluginSpec->plugin();
|
||||
if (!plugin)
|
||||
continue; // plugin not loaded
|
||||
@@ -1227,15 +1227,15 @@ void PluginManagerPrivate::removeObject(QObject *obj)
|
||||
*/
|
||||
void PluginManagerPrivate::loadPlugins()
|
||||
{
|
||||
QVector<PluginSpec *> queue = loadQueue();
|
||||
const QVector<PluginSpec *> queue = loadQueue();
|
||||
Utils::setMimeStartupPhase(MimeStartupPhase::PluginsLoading);
|
||||
foreach (PluginSpec *spec, queue) {
|
||||
for (PluginSpec *spec : queue)
|
||||
loadPlugin(spec, PluginSpec::Loaded);
|
||||
}
|
||||
|
||||
Utils::setMimeStartupPhase(MimeStartupPhase::PluginsInitializing);
|
||||
foreach (PluginSpec *spec, queue) {
|
||||
for (PluginSpec *spec : queue)
|
||||
loadPlugin(spec, PluginSpec::Initialized);
|
||||
}
|
||||
|
||||
Utils::setMimeStartupPhase(MimeStartupPhase::PluginsDelayedInitializing);
|
||||
Utils::reverseForeach(queue, [this](PluginSpec *spec) {
|
||||
loadPlugin(spec, PluginSpec::Running);
|
||||
@@ -1291,10 +1291,10 @@ void PluginManagerPrivate::asyncShutdownFinished()
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
QVector<PluginSpec *> PluginManagerPrivate::loadQueue()
|
||||
const QVector<PluginSpec *> PluginManagerPrivate::loadQueue()
|
||||
{
|
||||
QVector<PluginSpec *> queue;
|
||||
foreach (PluginSpec *spec, pluginSpecs) {
|
||||
for (PluginSpec *spec : qAsConst(pluginSpecs)) {
|
||||
QVector<PluginSpec *> circularityCheckQueue;
|
||||
loadQueue(spec, queue, circularityCheckQueue);
|
||||
}
|
||||
@@ -1526,7 +1526,7 @@ void PluginManagerPrivate::setPluginPaths(const QStringList &paths)
|
||||
readPluginPaths();
|
||||
}
|
||||
|
||||
static QStringList pluginFiles(const QStringList &pluginPaths)
|
||||
static const QStringList pluginFiles(const QStringList &pluginPaths)
|
||||
{
|
||||
QStringList pluginFiles;
|
||||
QStringList searchPaths = pluginPaths;
|
||||
@@ -1553,7 +1553,7 @@ void PluginManagerPrivate::readPluginPaths()
|
||||
// default
|
||||
pluginCategories.insert(QString(), QVector<PluginSpec *>());
|
||||
|
||||
foreach (const QString &pluginFile, pluginFiles(pluginPaths)) {
|
||||
for (const QString &pluginFile : pluginFiles(pluginPaths)) {
|
||||
auto *spec = new PluginSpec;
|
||||
if (!spec->d->read(pluginFile)) { // not a Qt Creator plugin
|
||||
delete spec;
|
||||
@@ -1586,13 +1586,13 @@ void PluginManagerPrivate::readPluginPaths()
|
||||
|
||||
void PluginManagerPrivate::resolveDependencies()
|
||||
{
|
||||
foreach (PluginSpec *spec, pluginSpecs)
|
||||
for (PluginSpec *spec : qAsConst(pluginSpecs))
|
||||
spec->d->resolveDependencies(pluginSpecs);
|
||||
}
|
||||
|
||||
void PluginManagerPrivate::enableDependenciesIndirectly()
|
||||
{
|
||||
foreach (PluginSpec *spec, pluginSpecs)
|
||||
for (PluginSpec *spec : qAsConst(pluginSpecs))
|
||||
spec->d->enabledIndirectly = false;
|
||||
// cannot use reverse loadQueue here, because test dependencies can introduce circles
|
||||
QVector<PluginSpec *> queue = Utils::filtered(pluginSpecs, &PluginSpec::isEffectivelyEnabled);
|
||||
@@ -1607,7 +1607,7 @@ PluginSpec *PluginManagerPrivate::pluginForOption(const QString &option, bool *r
|
||||
{
|
||||
// Look in the plugins for an option
|
||||
*requiresArgument = false;
|
||||
foreach (PluginSpec *spec, pluginSpecs) {
|
||||
for (PluginSpec *spec : qAsConst(pluginSpecs)) {
|
||||
PluginArgumentDescription match = Utils::findOrDefault(spec->argumentDescriptions(),
|
||||
[option](PluginArgumentDescription pad) {
|
||||
return pad.name == option;
|
||||
|
@@ -62,8 +62,8 @@ public:
|
||||
template <typename T> static T *getObject()
|
||||
{
|
||||
QReadLocker lock(listLock());
|
||||
QVector<QObject *> all = allObjects();
|
||||
foreach (QObject *obj, all) {
|
||||
const QVector<QObject *> all = allObjects();
|
||||
for (QObject *obj : all) {
|
||||
if (T *result = qobject_cast<T *>(obj))
|
||||
return result;
|
||||
}
|
||||
@@ -72,8 +72,8 @@ public:
|
||||
template <typename T, typename Predicate> static T *getObject(Predicate predicate)
|
||||
{
|
||||
QReadLocker lock(listLock());
|
||||
QVector<QObject *> all = allObjects();
|
||||
foreach (QObject *obj, all) {
|
||||
const QVector<QObject *> all = allObjects();
|
||||
for (QObject *obj : all) {
|
||||
if (T *result = qobject_cast<T *>(obj))
|
||||
if (predicate(result))
|
||||
return result;
|
||||
@@ -94,8 +94,8 @@ public:
|
||||
static QHash<QString, QVector<PluginSpec *>> pluginCollections();
|
||||
static bool hasError();
|
||||
static const QStringList allErrors();
|
||||
static QSet<PluginSpec *> pluginsRequiringPlugin(PluginSpec *spec);
|
||||
static QSet<PluginSpec *> pluginsRequiredByPlugin(PluginSpec *spec);
|
||||
static const QSet<PluginSpec *> pluginsRequiringPlugin(PluginSpec *spec);
|
||||
static const QSet<PluginSpec *> pluginsRequiredByPlugin(PluginSpec *spec);
|
||||
static void checkForProblematicPlugins();
|
||||
|
||||
// Settings
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
void loadPlugins();
|
||||
void shutdown();
|
||||
void setPluginPaths(const QStringList &paths);
|
||||
QVector<ExtensionSystem::PluginSpec *> loadQueue();
|
||||
const QVector<ExtensionSystem::PluginSpec *> loadQueue();
|
||||
void loadPlugin(PluginSpec *spec, PluginSpec::State destState);
|
||||
void resolveDependencies();
|
||||
void enableDependenciesIndirectly();
|
||||
|
@@ -803,8 +803,8 @@ bool PluginSpecPrivate::readMetaData(const QJsonObject &pluginMetaData)
|
||||
if (!value.isUndefined() && !value.isArray())
|
||||
return reportError(msgValueIsNotAObjectArray(DEPENDENCIES));
|
||||
if (!value.isUndefined()) {
|
||||
QJsonArray array = value.toArray();
|
||||
foreach (const QJsonValue &v, array) {
|
||||
const QJsonArray array = value.toArray();
|
||||
for (const QJsonValue &v : array) {
|
||||
if (!v.isObject())
|
||||
return reportError(msgValueIsNotAObjectArray(DEPENDENCIES));
|
||||
QJsonObject dependencyObject = v.toObject();
|
||||
@@ -850,8 +850,8 @@ bool PluginSpecPrivate::readMetaData(const QJsonObject &pluginMetaData)
|
||||
if (!value.isUndefined() && !value.isArray())
|
||||
return reportError(msgValueIsNotAObjectArray(ARGUMENTS));
|
||||
if (!value.isUndefined()) {
|
||||
QJsonArray array = value.toArray();
|
||||
foreach (const QJsonValue &v, array) {
|
||||
const QJsonArray array = value.toArray();
|
||||
for (const QJsonValue &v : array) {
|
||||
if (!v.isObject())
|
||||
return reportError(msgValueIsNotAObjectArray(ARGUMENTS));
|
||||
QJsonObject argumentObject = v.toObject();
|
||||
@@ -946,7 +946,7 @@ bool PluginSpecPrivate::resolveDependencies(const QVector<PluginSpec *> &specs)
|
||||
return false;
|
||||
}
|
||||
QHash<PluginDependency, PluginSpec *> resolvedDependencies;
|
||||
foreach (const PluginDependency &dependency, dependencies) {
|
||||
for (const PluginDependency &dependency : qAsConst(dependencies)) {
|
||||
PluginSpec * const found = Utils::findOrDefault(specs, [&dependency](PluginSpec *spec) {
|
||||
return spec->provides(dependency.name, dependency.version);
|
||||
});
|
||||
|
@@ -218,12 +218,12 @@ public:
|
||||
class CollectionItem : public TreeItem
|
||||
{
|
||||
public:
|
||||
CollectionItem(const QString &name, QVector<PluginSpec *> plugins, PluginView *view)
|
||||
CollectionItem(const QString &name, const QVector<PluginSpec *> &plugins, PluginView *view)
|
||||
: m_name(name)
|
||||
, m_plugins(plugins)
|
||||
, m_view(view)
|
||||
{
|
||||
foreach (PluginSpec *spec, plugins)
|
||||
for (PluginSpec *spec : plugins)
|
||||
appendChild(new PluginItem(spec, view));
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
return PluginView::tr("Load on Startup");
|
||||
if (role == Qt::CheckStateRole || role == SortRole) {
|
||||
int checkedCount = 0;
|
||||
foreach (PluginSpec *spec, m_plugins) {
|
||||
for (PluginSpec *spec : m_plugins) {
|
||||
if (spec->isEnabledBySettings())
|
||||
++checkedCount;
|
||||
}
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
|
||||
public:
|
||||
QString m_name;
|
||||
QVector<PluginSpec *> m_plugins;
|
||||
const QVector<PluginSpec *> m_plugins;
|
||||
PluginView *m_view; // Not owned.
|
||||
};
|
||||
|
||||
@@ -437,7 +437,7 @@ void PluginView::updatePlugins()
|
||||
}
|
||||
Utils::sort(collections, &CollectionItem::m_name);
|
||||
|
||||
foreach (CollectionItem *collection, collections)
|
||||
for (CollectionItem *collection : qAsConst(collections))
|
||||
m_model->rootItem()->appendChild(collection);
|
||||
|
||||
emit m_model->layoutChanged();
|
||||
@@ -455,8 +455,8 @@ bool PluginView::setPluginsEnabled(const QSet<PluginSpec *> &plugins, bool enabl
|
||||
{
|
||||
QSet<PluginSpec *> additionalPlugins;
|
||||
if (enable) {
|
||||
foreach (PluginSpec *spec, plugins) {
|
||||
foreach (PluginSpec *other, PluginManager::pluginsRequiredByPlugin(spec)) {
|
||||
for (PluginSpec *spec : plugins) {
|
||||
for (PluginSpec *other : PluginManager::pluginsRequiredByPlugin(spec)) {
|
||||
if (!other->isEnabledBySettings())
|
||||
additionalPlugins.insert(other);
|
||||
}
|
||||
@@ -472,8 +472,8 @@ bool PluginView::setPluginsEnabled(const QSet<PluginSpec *> &plugins, bool enabl
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
foreach (PluginSpec *spec, plugins) {
|
||||
foreach (PluginSpec *other, PluginManager::pluginsRequiringPlugin(spec)) {
|
||||
for (PluginSpec *spec : plugins) {
|
||||
for (PluginSpec *other : PluginManager::pluginsRequiringPlugin(spec)) {
|
||||
if (other->isEnabledBySettings())
|
||||
additionalPlugins.insert(other);
|
||||
}
|
||||
@@ -490,8 +490,8 @@ bool PluginView::setPluginsEnabled(const QSet<PluginSpec *> &plugins, bool enabl
|
||||
}
|
||||
}
|
||||
|
||||
QSet<PluginSpec *> affectedPlugins = plugins + additionalPlugins;
|
||||
foreach (PluginSpec *spec, affectedPlugins) {
|
||||
const QSet<PluginSpec *> affectedPlugins = plugins + additionalPlugins;
|
||||
for (PluginSpec *spec : affectedPlugins) {
|
||||
PluginItem *item = m_model->findItemAtLevel<2>([spec](PluginItem *item) {
|
||||
return item->m_spec == spec;
|
||||
});
|
||||
|
@@ -44,7 +44,7 @@ bool MyPlugin1::initialize(const QStringList & /*arguments*/, QString *errorStri
|
||||
|
||||
bool found2 = false;
|
||||
bool found3 = false;
|
||||
foreach (QObject *object, ExtensionSystem::PluginManager::allObjects()) {
|
||||
for (QObject *object : ExtensionSystem::PluginManager::allObjects()) {
|
||||
if (object->objectName() == QLatin1String("MyPlugin2"))
|
||||
found2 = true;
|
||||
else if (object->objectName() == QLatin1String("MyPlugin3"))
|
||||
|
@@ -43,7 +43,7 @@ bool MyPlugin3::initialize(const QStringList & /*arguments*/, QString *errorStri
|
||||
ExtensionSystem::PluginManager::addObject(object1);
|
||||
|
||||
bool found2 = false;
|
||||
foreach (QObject *object, ExtensionSystem::PluginManager::allObjects()) {
|
||||
for (QObject *object : ExtensionSystem::PluginManager::allObjects()) {
|
||||
if (object->objectName() == QLatin1String("MyPlugin2"))
|
||||
found2 = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user