forked from qt-creator/qt-creator
PluginManager: Avoid using sender()
Change-Id: I30df454a9bab9896ec39a03d7d261fc47fbd7b7e Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -1411,18 +1411,6 @@ void PluginManagerPrivate::shutdown()
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
void PluginManagerPrivate::asyncShutdownFinished()
|
||||
{
|
||||
auto *plugin = qobject_cast<IPlugin *>(sender());
|
||||
Q_ASSERT(plugin);
|
||||
asynchronousPlugins.remove(plugin->pluginSpec());
|
||||
if (asynchronousPlugins.isEmpty())
|
||||
shutdownEventLoop->exit();
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
@@ -1645,8 +1633,11 @@ void PluginManagerPrivate::loadPlugin(PluginSpec *spec, PluginSpec::State destSt
|
||||
profilingReport(">stop", spec);
|
||||
if (spec->d->stop() == IPlugin::AsynchronousShutdown) {
|
||||
asynchronousPlugins << spec;
|
||||
connect(spec->plugin(), &IPlugin::asynchronousShutdownFinished,
|
||||
this, &PluginManagerPrivate::asyncShutdownFinished);
|
||||
connect(spec->plugin(), &IPlugin::asynchronousShutdownFinished, this, [this, spec] {
|
||||
asynchronousPlugins.remove(spec);
|
||||
if (asynchronousPlugins.isEmpty())
|
||||
shutdownEventLoop->exit();
|
||||
});
|
||||
}
|
||||
profilingReport("<stop", spec);
|
||||
break;
|
||||
|
@@ -160,7 +160,6 @@ private:
|
||||
PluginManager *q;
|
||||
|
||||
void nextDelayedInitialize();
|
||||
void asyncShutdownFinished();
|
||||
|
||||
void readPluginPaths();
|
||||
bool loadQueue(PluginSpec *spec,
|
||||
|
Reference in New Issue
Block a user