forked from qt-creator/qt-creator
restart qmlls after a build
Slightly related to QTCREATORBUG-24428 about resetting the codemodel after build so it can find the generated *.qmltypes from the buildfolder: Restart qmlls clients after builds to force qmlls to re-scan the build folder (and eventually find new qmldir, qmltypes, QML modules, etc generated by the CMake scripts during the build). Task-number: QTCREATORBUG-24428 Change-Id: I568401050586358ac085cf2c30236a5a0a91a944 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include <languageclient/languageclientinterface.h>
|
||||
#include <languageclient/languageclientmanager.h>
|
||||
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
|
||||
#include <texteditor/textdocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
|
||||
@@ -68,6 +70,12 @@ QmllsClient::QmllsClient(StdIOClientInterface *interface)
|
||||
: Client(interface)
|
||||
{
|
||||
setSnippetsGroup(QmlJSEditor::Constants::QML_SNIPPETS_GROUP_ID);
|
||||
|
||||
connect(
|
||||
ProjectExplorer::BuildManager::instance(),
|
||||
&ProjectExplorer::BuildManager::buildQueueFinished,
|
||||
this,
|
||||
[this]() { LanguageClientManager::restartClient(this); });
|
||||
}
|
||||
|
||||
QmllsClient::~QmllsClient()
|
||||
|
Reference in New Issue
Block a user