diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp index 102e3851d04..1dc4716649c 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp @@ -693,7 +693,7 @@ static inline QString fixComponentPathForIncompatibleQt(const QString &component //plugin directories might contain the version number fixedPath.chop(4); fixedPath += QLatin1Char('/') + QFileInfo(componentPath).fileName(); - if (QFileInfo(fixedPath).exists()) + if (QFileInfo::exists(fixedPath)) return fixedPath; } } diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index a38a6b93aff..4cad2d08cc0 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -194,7 +194,8 @@ void PropertyEditorView::changeValue(const QString &name) if (qmlObjectNode.modelNode().metaInfo().propertyTypeName(propertyName) == "QUrl" || qmlObjectNode.modelNode().metaInfo().propertyTypeName(propertyName) == "url") { //turn absolute local file paths into relative paths QString filePath = castedValue.toUrl().toString(); - if (QFileInfo(filePath).exists() && QFileInfo(filePath).isAbsolute()) { + QFileInfo fi(filePath); + if (fi.exists() && fi.isAbsolute()) { QDir fileDir(QFileInfo(model()->fileUrl().toLocalFile()).absolutePath()); castedValue = QUrl(fileDir.relativeFilePath(filePath)); }