QmlDesigner: bug fix for components

QLibraryInfo::location(QLibraryInfo::ImportsPath) might miss the '/'
at the end.

Change-Id: I552cef7efce7644fad82247850d8853c72edd0ea
Reviewed-on: http://codereview.qt-project.org/5150
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Thomas Hartmann
2011-09-19 15:31:13 +02:00
committed by Eike Ziller
parent f184ced2e1
commit 95009e0a41

View File

@@ -804,7 +804,7 @@ static inline QString fixComponentPathForIncompatibleQt(const QString &component
if (componentPath.contains(importString)) {
int index = componentPath.indexOf(importString) + 8;
const QString relativeImportPath = componentPath.right(componentPath.length() - index);
QString fixedComponentPath = QLibraryInfo::location(QLibraryInfo::ImportsPath) + relativeImportPath;
QString fixedComponentPath = QLibraryInfo::location(QLibraryInfo::ImportsPath) + QLatin1Char('/') + relativeImportPath;
fixedComponentPath.replace(QLatin1Char('\\'), QLatin1Char('/'));
if (QFileInfo(fixedComponentPath).exists())
return fixedComponentPath;