forked from ondra/colnod-connector
fix for Qt 5.9
This commit is contained in:
parent
62343bb0b8
commit
ce060a425f
@ -43,7 +43,7 @@ void Entity::fromJSON(const QJsonObject &json) {
|
||||
QJsonObject Entity::toJSON() const {
|
||||
QJsonObject json;
|
||||
|
||||
json.value("id") = id.toString(QUuid::WithoutBraces);
|
||||
json.value("id") = id.toString();
|
||||
json.value("name") = name;
|
||||
json.value("description") = description;
|
||||
json.value("lastUpdate") = lastUpdate;
|
||||
|
||||
@ -70,6 +70,10 @@ void RequestManager::getRequest(QString endpoint)
|
||||
qDebug() << authHeader;
|
||||
request.setRawHeader("Authorization", authHeader.toLocal8Bit());
|
||||
//request.setRawHeader("User-Agent", "curl/7.65.3");
|
||||
//request.setRawHeader("Accept", "*/*");
|
||||
//request.setRawHeader("Accept-Encoding", "*");
|
||||
// request.setRawHeader("Accept-Language", "*");
|
||||
|
||||
QNetworkReply* reply = manager->post(request, QByteArray());
|
||||
|
||||
//
|
||||
|
||||
@ -11,7 +11,7 @@ QString Subject::getEmail() const {
|
||||
void Subject::fromJSON(const QJsonObject &json) {
|
||||
Entity::fromJSON(json);
|
||||
|
||||
attributes = json["attributes"]["items"].toObject();
|
||||
//attributes = json["attributes"]["items"].toObject();
|
||||
|
||||
attributes = json.value("attributes").toObject().value("items").toObject();
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ QJsonObject Token::toJSON() const {
|
||||
json.value("timeToLive") = timeToLive;
|
||||
json.value("authErrors") = authErrors;
|
||||
json.value("flags") = QJsonArray::fromStringList(flags.toList());
|
||||
json.value("subjectId") = subjectId.toString(QUuid::WithoutBraces);
|
||||
json.value("subjectId") = subjectId.toString();
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user