Details
-
Bug
-
Status: Closed
-
P1: Critical
-
Resolution: Done
-
6.3.0 RC
-
None
-
-
c5b1321711 (qt/tqtc-qmlcompilerplus/6.2) 37fd49d236 (qt/qtdeclarative/6.3) 37fd49d236 (qt/tqtc-qtdeclarative/6.3)
Description
Qt quick compiler produces an error in C++ compilation with this QML code:
import QtQuick 6
Item {
height: !(parent && parent.visible) ? 100 : 0
}
Generated C++:
// generate_UNot
r2_1 = !aotContext->engine->fromVariant<bool>();
Error:
error: no matching member function for call to 'fromVariant' r2_1 = !aotContext->engine->fromVariant<bool>(); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /Applications/Qt/6.3.0/macos/lib/QtQml.framework/Headers/qjsengine.h:117:14: note: candidate function template not viable: requires single argument 'value', but no arguments were provided inline T fromVariant(const QVariant &value) ^ 1 error generated.
Looks like the conversion between an object and a boolean property into bool causes the problem.
Attachments
Issue Links
- relates to
-
QTBUG-102281 qmlcachegen generates invalid code
-
- Closed
-