- Notification *notification = new Notification();
- notification->setId(query.value(0).toString());
- notification->setSenderId(query.value(1).toString());
- notification->setTitle(query.value(2).toString());
- notification->setText(query.value(3).toString());
- m_notifications.append(notification);
+ result.append("{");
+ result.append("\"id\": \"" + query.value(0).toString() + "\",");
+ result.append("\"sender_id\": \"" + query.value(1).toString() + "\",");
+ result.append("\"sender_name\": \"" + query.value(2).toString() + "\",");
+ result.append("\"image_url\": \"" + query.value(3).toString() + "\",");
+ result.append("\"timestamp\": \"" + query.value(4).toString() + "\",");
+ result.append("\"text\": \"" + query.value(5).toString() + "\"");
+ result.append("},");