forked from qt-creator/qt-creator
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:
committed by
Eike Ziller
parent
f184ced2e1
commit
95009e0a41
@@ -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;
|
||||
|
Reference in New Issue
Block a user