aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler')
-rw-r--r--src/qmlcompiler/qqmljsimportvisitor.cpp4
-rw-r--r--src/qmlcompiler/qqmljsresourcefilemapper.cpp2
-rw-r--r--src/qmlcompiler/qqmljsresourcefilemapper_p.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/qmlcompiler/qqmljsimportvisitor.cpp b/src/qmlcompiler/qqmljsimportvisitor.cpp
index e52a1c9a1e..4cf0be0f95 100644
--- a/src/qmlcompiler/qqmljsimportvisitor.cpp
+++ b/src/qmlcompiler/qqmljsimportvisitor.cpp
@@ -2300,10 +2300,10 @@ void QQmlJSImportVisitor::importFromQrc(const QString &path, const QString &pref
{
Q_ASSERT(path.startsWith(u':'));
if (const QQmlJSResourceFileMapper *mapper = m_importer->resourceFileMapper()) {
- const auto pathNoColon = path.mid(1);
+ const auto pathNoColon = QStringView(path).mid(1);
if (mapper->isFile(pathNoColon)) {
const auto entry = m_importer->resourceFileMapper()->entry(
- QQmlJSResourceFileMapper::resourceFileFilter(pathNoColon));
+ QQmlJSResourceFileMapper::resourceFileFilter(pathNoColon.toString()));
const auto scope = m_importer->importFile(entry.filePath);
const QString actualPrefix =
prefix.isEmpty() ? QFileInfo(entry.resourcePath).baseName() : prefix;
diff --git a/src/qmlcompiler/qqmljsresourcefilemapper.cpp b/src/qmlcompiler/qqmljsresourcefilemapper.cpp
index 4213902fb3..5872dedeb3 100644
--- a/src/qmlcompiler/qqmljsresourcefilemapper.cpp
+++ b/src/qmlcompiler/qqmljsresourcefilemapper.cpp
@@ -60,7 +60,7 @@ bool QQmlJSResourceFileMapper::isEmpty() const
return qrcPathToFileSystemPath.isEmpty();
}
-bool QQmlJSResourceFileMapper::isFile(const QString &resourcePath) const
+bool QQmlJSResourceFileMapper::isFile(QStringView resourcePath) const
{
for (const auto &entry : qrcPathToFileSystemPath) {
if (entry.resourcePath == resourcePath)
diff --git a/src/qmlcompiler/qqmljsresourcefilemapper_p.h b/src/qmlcompiler/qqmljsresourcefilemapper_p.h
index 16fb99e82e..d200a92d30 100644
--- a/src/qmlcompiler/qqmljsresourcefilemapper_p.h
+++ b/src/qmlcompiler/qqmljsresourcefilemapper_p.h
@@ -53,7 +53,7 @@ struct Q_QMLCOMPILER_EXPORT QQmlJSResourceFileMapper
QQmlJSResourceFileMapper(const QStringList &resourceFiles);
bool isEmpty() const;
- bool isFile(const QString &resourcePath) const;
+ bool isFile(QStringView resourcePath) const;
QList<Entry> filter(const Filter &filter) const;
QStringList filePaths(const Filter &filter) const;