Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.4.0 FF
-
d3942c4af5 (qt/qtwebengine/dev)
Description
In qtwebengine/examples/pdf/pdfviewer we have
PdfScrollablePageView {
id: view
anchors.fill: parent
anchors.leftMargin: searchDrawer.position * searchDrawer.width
document: PdfDocument {
id: document
source: Qt.resolvedUrl(root.source)
onStatusChanged: if (status === PdfDocument.Error) errorDialog.open()
onPasswordRequired: {
passwordDialog.open()
passwordField.forceActiveFocus()
}
}
searchString: searchField.text
}
qmllint says
Warning: viewer.qml:240:34: Unqualified access onStatusChanged: if (status === PdfDocument.Error) errorDialog.open() ^^^^^^ Info: status is a member of a parent element You can qualify the access with its id to avoid this warning: onStatusChanged: if (view.status === PdfDocument.Error) errorDialog.open() ^^^^^
I would not call this unqualified access; if unqualified "onStatusChanged" makes sense, then accessing the same status property inside the signal handler function should also be unambiguous.
Anyway, PdfDocument has a status property; that's the one I am referring to, clearly. PdfScrollablePageView also has a status property (an alias, since PdfScrollablePageView is also implemented in QML), but qmllint should not get confused about it. The advice is misleading.
(I'm working with a few patches on top of dev branch in qtpdf, but I think you will see it the same without them)
Attachments
Issue Links
- relates to
-
QTBUG-100927 MessageDialog button enum is not exposed in a way that qmllint approves
-
- Closed
-