forked from qt-creator/qt-creator
Prevent DS from hanging when adding a signal handler
Fixes: QDS-6547 Change-Id: I28d73f88482f4b8eab8222420f0fd513b960c0b5 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -924,6 +924,10 @@ static QList<QmlDesigner::Import> generatePossibleFileImports(const QString &pat
|
||||
|
||||
std::function<void(const QString &)> checkDir;
|
||||
checkDir = [&](const QString &checkPath) {
|
||||
|
||||
if (QFileInfo(checkPath).isRoot())
|
||||
return;
|
||||
|
||||
const QStringList entries = QDir(checkPath).entryList(QDir::Dirs | QDir::NoDot | QDir::NoDotDot);
|
||||
const QString checkPathDelim = checkPath + delimeter;
|
||||
for (const QString &entry : entries) {
|
||||
@@ -1007,7 +1011,8 @@ void TextToModelMerger::setupPossibleImports(const QmlJS::Snapshot &snapshot, co
|
||||
|
||||
QList<QmlDesigner::Import> possibleImports = generatePossibleLibraryImports(filteredPossibleImportKeys);
|
||||
|
||||
possibleImports.append(generatePossibleFileImports(document()->path(), imports->all()));
|
||||
if (document()->fileName() != "<internal>")
|
||||
possibleImports.append(generatePossibleFileImports(document()->path(), imports->all()));
|
||||
|
||||
if (m_rewriterView->isAttached())
|
||||
m_rewriterView->model()->setPossibleImports(possibleImports);
|
||||
|
Reference in New Issue
Block a user