forked from qt-creator/qt-creator
Android: Make the device watcher process terminate on shutdown
Terminate on IPlugin::aboutToShutdown instead of QCoreApplication::aboutToQuit. If needed synchronously. Added "ADB device watcher started" logging. Fixes: QTCREATORBUG-27118 Change-Id: I483659b018c74d179b64a5a4f17cc2c27c9598a8 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -160,6 +160,19 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa
|
||||
return true;
|
||||
}
|
||||
|
||||
AndroidPlugin::ShutdownFlag AndroidPlugin::aboutToShutdown()
|
||||
{
|
||||
AndroidDeviceManager *dm = AndroidDeviceManager::instance();
|
||||
const IPlugin::ShutdownFlag sf = dm->devicesShutdownFlag();
|
||||
|
||||
if (sf == AsynchronousShutdown)
|
||||
connect(dm, &AndroidDeviceManager::devicesWatcherShutdownFinished,
|
||||
this, &ExtensionSystem::IPlugin::asynchronousShutdownFinished);
|
||||
|
||||
dm->shutdownDevicesWatcher();
|
||||
return sf;
|
||||
}
|
||||
|
||||
void AndroidPlugin::kitsRestored()
|
||||
{
|
||||
const bool qtForAndroidInstalled
|
||||
|
||||
Reference in New Issue
Block a user