Routing the received biddings to the model. Just debug outputs there yet.
This commit is contained in:
@ -194,6 +194,7 @@ void ServerCommunicator::onPostReplyFailure(const PostRequestTypes type,
|
||||
const QString errorString) {
|
||||
const QString message =
|
||||
QString("Request of type %1 returned: %2").arg(QString::number(type), errorString);
|
||||
// NEXT improve error message to the UI;
|
||||
m_core->displayStatusMessage(message);
|
||||
}
|
||||
|
||||
@ -215,15 +216,9 @@ void ServerCommunicator::currentBiddingRoundChangedReply(const QJsonDocument jso
|
||||
void ServerCommunicator::currentBiddingsReply(const QJsonDocument jsonDoc) {
|
||||
qCritical() << "currentBiddingsReply:" << jsonDoc;
|
||||
|
||||
// NEXT extract biddings from jsonDoc
|
||||
const int roundNumber = 0;
|
||||
const bidding dummyBidding{.userId = QUuid(),
|
||||
.biddingRound = 0,
|
||||
.amount = 123,
|
||||
.depotWishOne = "one",
|
||||
.depotWishTwo = "two"};
|
||||
const QList<bidding> biddings{dummyBidding};
|
||||
emit biddingsChanged(roundNumber, biddings);
|
||||
const QList<bidding> biddings = JsonParser::extractBiddings(jsonDoc);
|
||||
|
||||
emit biddingsChanged(biddings);
|
||||
}
|
||||
|
||||
void ServerCommunicator::onlineUserAccountReply(const QJsonDocument jsonDoc) {
|
||||
|
||||
@ -44,7 +44,7 @@ class ServerCommunicator : public QObject {
|
||||
void deleteRequestFailure(const QString errorString);
|
||||
|
||||
void currentBiddingRoundChanged(int round, bool isRunning);
|
||||
void biddingsChanged(int round, QList<bidding> biddings);
|
||||
void biddingsChanged(QList<bidding> biddings);
|
||||
void onlineUserAccountReceived(const QString mailAddress,
|
||||
const QString uuid,
|
||||
const QString accessToken);
|
||||
|
||||
Reference in New Issue
Block a user