SSH: Delete file system watcher right after use

It's only ever needed at startup, no need to keep it around after that.

Change-Id: Icc1ada71177d4f81b0b84cd3607a8a8b7af9cec2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Christian Kandeler
2018-12-13 16:36:53 +01:00
parent a5cf6f194d
commit d6b1e5653b

View File

@@ -169,7 +169,8 @@ SshConnection::SshConnection(const SshConnectionParameters &serverInfo, QObject
if (!QFileInfo::exists(d->socketFilePath())) if (!QFileInfo::exists(d->socketFilePath()))
return; return;
d->socketWatcher->disconnect(); d->socketWatcher->disconnect();
d->socketWatcher->removeDirectory(QFileInfo(d->socketFilePath()).path()); d->socketWatcher->deleteLater();
d->socketWatcher = nullptr;
d->socketWatcherTimer.disconnect(); d->socketWatcherTimer.disconnect();
d->socketWatcherTimer.stop(); d->socketWatcherTimer.stop();
emitConnected(); emitConnected();