From e68e2a3159ad153bc7eb1ae6cdbfa5fcf39ab21b Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 16 Nov 2021 11:43:55 +0100 Subject: [PATCH] QMake: fix gui thread lock Do not look up windows network paths in profile editor when looking for links under the cursor. The QFileInfo::exists check can take up to a minute here if this network path does not exists. Fixes: QTCREATORBUG-26579 Change-Id: I2648bc398e25bcc660f1161a187c4d92c3def28e Reviewed-by: Qt CI Bot Reviewed-by: Christian Stenger Reviewed-by: Eike Ziller --- src/plugins/qmakeprojectmanager/profileeditor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmakeprojectmanager/profileeditor.cpp b/src/plugins/qmakeprojectmanager/profileeditor.cpp index a3cc9528348..be1c5f9dd26 100644 --- a/src/plugins/qmakeprojectmanager/profileeditor.cpp +++ b/src/plugins/qmakeprojectmanager/profileeditor.cpp @@ -229,7 +229,10 @@ void ProFileEditorWidget::findLinkAt(const QTextCursor &cursor, QDir dir(textDocument()->filePath().toFileInfo().absolutePath()); QString fileName = dir.filePath(buffer); QFileInfo fi(fileName); - if (fi.exists()) { + if (Utils::HostOsInfo::isWindowsHost() && fileName.startsWith("//")) { + // Windows network paths are not supported here since checking for their existence can + // lock the gui thread. See: QTCREATORBUG-26579 + } else if (fi.exists()) { if (fi.isDir()) { QDir subDir(fi.absoluteFilePath()); QString subProject = subDir.filePath(subDir.dirName() + QLatin1String(".pro"));