Remove old/unused code

This commit is contained in:
Konstantinos Sideris 2018-04-28 13:16:37 +03:00
parent 3f80725c33
commit bee9278a1a
4 changed files with 9 additions and 89 deletions

View file

@ -31,7 +31,6 @@
#include <QtConcurrent>
#include <mtx/errors.hpp>
#include "Deserializable.h"
#include "MatrixClient.h"
MatrixClient::MatrixClient(QString server, QObject *parent)
@ -559,16 +558,16 @@ MatrixClient::getOwnCommunities() noexcept
auto data = reply->readAll();
auto json = QJsonDocument::fromJson(data).object();
try {
QList<QString> response;
for (auto group : json["groups"].toArray())
response.append(group.toString());
emit getOwnCommunitiesResponse(response);
} catch (DeserializationException &e) {
qWarning() << "Own communities:" << e.what();
if (!json.contains("groups")) {
qWarning() << "failed to parse own communities. 'groups' key not found";
return;
}
QList<QString> response;
for (auto group : json["groups"].toArray())
response.append(group.toString());
emit getOwnCommunitiesResponse(response);
});
}