Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
6.4.1
Description
This bug results from QTBUG-108612.
QtWebEngine uses foreign types in form of:
namespace ForeignWebEngineCertificateErrorNamespace { Q_NAMESPACE QML_FOREIGN_NAMESPACE(QWebEngineCertificateError) QML_NAMED_ELEMENT(WebEngineCertificateError) QML_ADDED_IN_VERSION(1, 1) QML_EXTRA_VERSION(2, 0) }
which is used for example like:
var handleCertificateError = function(error) { if (deferError) error.defer() else if (acceptCertificate) error.acceptCertificate() else error.rejectCertificate() } view.certificateError.connect(handleCertificateError)
The issue that QWebEngineCertificateError has only a copy constructor , but it is used here as value type. This is not correct as value types should have a default constructor. We do not want to use anonymous qml elements as our classes need proper documentation, therefore qml elements have to stayed named.
Instead we would like to use a value type which is QML_UNCREATABLE which would mean it can not be used as a property and it does not have a default constructor.
property webEngineCertificateError myError
This way we have value proper semantic , with value not instanceable by user , passed (copied) in various signal handlers.
Attachments
Issue Links
- is required for
-
QTBUG-108612 Startup warnings "... You should not use it as a QML type"
- Closed
-
QTBUG-110795 [Reg? 6.2.7 -> 6.4.2] New warnings in QtWebEngineQuick
- Closed