Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
7d0ec8910 (dev), 1baa7fc3e (dev), 3e619367b (dev)
Description
These functions don't seem to be compilable:
Q_INVOKABLE void push(QQmlV4Function *args); Q_INVOKABLE void pop(QQmlV4Function *args); Q_INVOKABLE void replace(QQmlV4Function *args);
Code
import QtQuick import QtQuick.Controls.Basic Window { width: 640 height: 480 visible: true StackView { id: stack } Component { id: comp Rectangle{} } function pushOne(): void { stack.push(comp) } function popOne(): void { stack.pop() } function popOneWithoutTransitions(): void { stack.pop(StackView.Immediate) } function popAll(): void { stack.pop(null) } }
Compiler output
Warning: main.qml:19:15: Could not compile function pushOne: Cannot generate efficient code for call to untyped JavaScript function [compiler] stack.push(comp) ^^^^ Warning: main.qml:23:15: Could not compile function popOne: Cannot generate efficient code for call to untyped JavaScript function [compiler] stack.pop() ^^^ Warning: main.qml:26:15: Could not compile function popOneWithoutTransitions: Cannot generate efficient code for call to untyped JavaScript function [compiler] stack.pop(StackView.Immediate) ^^^ Warning: main.qml:29:15: Could not compile function popAll: Cannot generate efficient code for call to untyped JavaScript function [compiler] stack.pop(null) ^^^
Attachments
Issue Links
- split from
-
QTBUG-105139 Remove usages of QQmlV4Function wherever possible
-
- Reported
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-112475 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
479798,31 | StackView: add strongly-typed push functions | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
486269,18 | StackView: add strongly-typed pop functions | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
487191,14 | StackView: add strongly-typed replace functions | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |