QmlDesigner: Update for change in QDir::relativeFilePath()

Change-Id: If90cba32aeca2349921870e30bd62d45a4a55e45
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Robert Loehning
2015-09-01 12:15:29 +02:00
parent 169556db2f
commit f8fa24d901

View File

@@ -383,7 +383,7 @@ public:
// should probably try to make it relatve to some import path, not to the document path // should probably try to make it relatve to some import path, not to the document path
QString relativeDir = dir.relativeFilePath(path); QString relativeDir = dir.relativeFilePath(path);
QString name = relativeDir.replace(QLatin1Char('/'), QLatin1Char('.')); QString name = relativeDir.replace(QLatin1Char('/'), QLatin1Char('.'));
if (!name.isEmpty()) if (!name.isEmpty() && name != QLatin1String("."))
typeName.prepend(name + QLatin1Char('.')); typeName.prepend(name + QLatin1Char('.'));
} else if (importInfo.isValid() && importInfo.type() == ImportType::QrcDirectory) { } else if (importInfo.isValid() && importInfo.type() == ImportType::QrcDirectory) {
QString path = QrcParser::normalizedQrcDirectoryPath(importInfo.path()); QString path = QrcParser::normalizedQrcDirectoryPath(importInfo.path());