We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a6d053 commit bbfa9f0Copy full SHA for bbfa9f0
CPPWebFramework/cwf/sqlquery.cpp
@@ -84,12 +84,14 @@ QJsonArray SqlQuery::toJson()
84
for(int i = 0; i < total; ++i)
85
{
86
QVariant var(record().value(i));
87
- if(var.type() == QVariant::Double)
88
- json[columns[i]] = var.toDouble();
+ if(var.type() == QVariant::Bool)
+ json[columns[i]] = var.toBool();
89
else if(var.type() == QVariant::Int)
90
json[columns[i]] = var.toInt();
91
- else if(var.type() == QVariant::Bool)
92
- json[columns[i]] = var.toBool();
+ else if(var.type() == QVariant::LongLong)
+ json[columns[i]] = var.toLongLong();
93
+ else if(var.type() == QVariant::Double)
94
+ json[columns[i]] = var.toDouble();
95
else
96
json[columns[i]] = var.toString();
97
}
0 commit comments