Skip to content

Commit 807b51d

Browse files
committed
Changed to non-hardcoded type for QJSValue
1 parent 769df9b commit 807b51d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/capi.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,8 @@ void packDataValue(QVariant_ *var, DataValue *value)
745745
break;
746746
case QMetaType::User:
747747
{
748-
if (qvar->userType() == 1034) {
748+
static const int qjstype = QVariant::fromValue(QJSValue()).userType();
749+
if (qvar->userType() == qjstype) {
749750
auto var = qvar->value<QJSValue>().toVariant();
750751
packDataValue(&var, value);
751752
}

0 commit comments

Comments
 (0)