diff --git a/projectmanagers/cmake/cmakeserver.cpp b/projectmanagers/cmake/cmakeserver.cpp --- a/projectmanagers/cmake/cmakeserver.cpp +++ b/projectmanagers/cmake/cmakeserver.cpp @@ -65,17 +65,16 @@ connect(&m_process, &QProcess::started, this, [this, path](){ //Once the process has started, wait for the file to be created, then connect to it - m_localSocket->connectToServer(path, QIODevice::ReadWrite); QTimer::singleShot(100, this, [this, path]() { - if (!m_localSocket->isOpen()) - m_localSocket->connectToServer(path, QIODevice::ReadWrite); + m_localSocket->connectToServer(path, QIODevice::ReadWrite); }); }); m_process.start(CMake::findExecutable(), {"-E", "server", "--experimental", "--pipe=" + path}); } CMakeServer::~CMakeServer() { + m_process.disconnect(); m_process.kill(); m_process.waitForFinished(); }