Added TYPE_ROLES when casting item values into JSON.
This commit is contained in:
@ -53,6 +53,8 @@ QByteArray JsonParser::itemValuesListToJson(const QList<ModelItemValues>& itemVa
|
||||
const QVariant value = itemValues.value(role);
|
||||
if (STRING_ROLES.contains(role)) {
|
||||
itemObject.insert(roleName, value.toString());
|
||||
} else if (TYPE_ROLES.contains(role)) {
|
||||
itemObject.insert(roleName, value.toString());
|
||||
} else if (INT_ROLES.contains(role)) {
|
||||
itemObject.insert(roleName, value.toInt());
|
||||
} else if (DOUBLE_ROLES.contains(role)) {
|
||||
@ -72,7 +74,7 @@ QByteArray JsonParser::itemValuesListToJson(const QList<ModelItemValues>& itemVa
|
||||
}
|
||||
|
||||
QByteArray JsonParser::toJsonDoc(const QHash<QString, QVariant>& values,
|
||||
const QString& objectName) {
|
||||
const QString& objectName) {
|
||||
QJsonDocument jsonDoc;
|
||||
QJsonObject rootObject;
|
||||
QJsonObject itemObject;
|
||||
|
||||
@ -164,7 +164,6 @@ void GenericCore::onLoginSuccessful() {
|
||||
|
||||
void GenericCore::onBiddingsChanged(const QList<bidding> biddings) {
|
||||
qInfo() << "onBiddingsChanged: biddings:" << biddings.count();
|
||||
// NEXT merge biddings into model
|
||||
m_mainModel->updateBiddings(biddings);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user