summaryrefslogtreecommitdiffstats
path: root/src/pdfquick
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-06-11 13:21:32 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-06-11 13:31:01 +0300
commit3cd4e0aa7961889eb06374885ed648f5b9bd85bc (patch)
tree6a089aedea155b1f1a74b553f4d1b57c70554a8f /src/pdfquick
parent6d029165d1593c514db08c34d6b08a00a4435d5e (diff)
parent38063a6332b9f948a0381763271e9a9ac7af0999 (diff)
Merge tag 'v6.2.9-lts' into tqtc/lts-6.2-opensource6.2.9
Qt 6.2.9-lts release Conflicts solved: dependencies.yaml examples/webenginewidgets/push-notifications/CMakeLists.txt Change-Id: I0127c2575369f6939df89f3301659470d481b9bf
Diffstat (limited to 'src/pdfquick')
-rw-r--r--src/pdfquick/CMakeLists.txt3
-rw-r--r--src/pdfquick/qquickpdfdocument.cpp6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/pdfquick/CMakeLists.txt b/src/pdfquick/CMakeLists.txt
index 112321015..560817446 100644
--- a/src/pdfquick/CMakeLists.txt
+++ b/src/pdfquick/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Qml Quick)
set(qml_files
diff --git a/src/pdfquick/qquickpdfdocument.cpp b/src/pdfquick/qquickpdfdocument.cpp
index 5564a7474..492c320d6 100644
--- a/src/pdfquick/qquickpdfdocument.cpp
+++ b/src/pdfquick/qquickpdfdocument.cpp
@@ -74,10 +74,8 @@ void QQuickPdfDocument::setSource(QUrl source)
emit sourceChanged();
const QQmlContext *context = qmlContext(this);
m_resolvedSource = context ? context->resolvedUrl(source) : source;
- if (source.scheme() == QLatin1String("qrc"))
- m_doc->load(QLatin1Char(':') + m_resolvedSource.path());
- else
- m_doc->load(m_resolvedSource.toLocalFile());
+ if (m_resolvedSource.isValid())
+ m_doc->load(QQmlFile::urlToLocalFileOrQrc(m_resolvedSource));
}
/*!