forked from qt-creator/qt-creator
QmlDesigner: Don't scan for fonts if resource path is not valid
For some reason captureiconmode puppet is launched at QDS shutdown, with empty resource path. This caused the entire drive to be searched for fonts to register, making the puppet linger for up to a minute after the shutdown. Fixes: QDS-6482 Change-Id: I0f1fa4b6f5646c76d93f5820dae029033e1543a3 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -1576,6 +1576,9 @@ void NodeInstanceServer::setupState(qint32 stateInstanceId)
|
||||
|
||||
void NodeInstanceServer::registerFonts(const QUrl &resourceUrl) const
|
||||
{
|
||||
if (!resourceUrl.isValid())
|
||||
return;
|
||||
|
||||
// Autoregister all fonts found inside the project
|
||||
QDirIterator it {QFileInfo(resourceUrl.toLocalFile()).absoluteFilePath(),
|
||||
{"*.ttf", "*.otf"}, QDir::Files, QDirIterator::Subdirectories};
|
||||
|
Reference in New Issue
Block a user