diff options
-rw-r--r-- | src/pdfquick/qquickpdfdocument.cpp | 7 | ||||
-rw-r--r-- | tests/auto/pdfquick/multipageview/BLACKLIST | 5 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/pdfquick/qquickpdfdocument.cpp b/src/pdfquick/qquickpdfdocument.cpp index 368725a8e..5564a7474 100644 --- a/src/pdfquick/qquickpdfdocument.cpp +++ b/src/pdfquick/qquickpdfdocument.cpp @@ -8,6 +8,7 @@ #include <QtQml/qqmlcontext.h> #include <QtQml/qqmlengine.h> #include <QtQuick/qquickitem.h> +#include <QtQml/qqmlfile.h> QT_BEGIN_NAMESPACE @@ -41,9 +42,9 @@ void QQuickPdfDocument::classBegin() { m_doc = static_cast<QPdfDocument *>(qmlExtendedObject(this)); Q_ASSERT(m_doc); - connect(m_doc, &QPdfDocument::passwordChanged, this, [this]() { - if (resolvedSource().isValid() && resolvedSource().isLocalFile()) - m_doc->load(resolvedSource().path()); + connect(m_doc, &QPdfDocument::passwordChanged, this, [this]() -> void { + if (resolvedSource().isValid()) + m_doc->load(QQmlFile::urlToLocalFileOrQrc(resolvedSource())); }); connect(m_doc, &QPdfDocument::statusChanged, this, [this] (QPdfDocument::Status status) { emit errorChanged(); diff --git a/tests/auto/pdfquick/multipageview/BLACKLIST b/tests/auto/pdfquick/multipageview/BLACKLIST index cfdd7e2e5..9012902f6 100644 --- a/tests/auto/pdfquick/multipageview/BLACKLIST +++ b/tests/auto/pdfquick/multipageview/BLACKLIST @@ -1,8 +1,3 @@ -# QTBUG-106072 -[password] -windows -android - # QTBUG-111306 [navigation:click links and go back, twice] android |