Fix comp.
This commit is contained in:
parent
75626b1496
commit
65153f8f54
@ -82,9 +82,9 @@ TtRssLoginResponse TtRssNetworkFactory::login() {
|
||||
}
|
||||
|
||||
QJsonObject json;
|
||||
json["op"] = "login";
|
||||
json["user"] = m_username;
|
||||
json["password"] = m_password;
|
||||
json.insert(QSL("op"), QJsonValue(QSL("login")));
|
||||
json.insert(QSL("user"), QJsonValue(m_username));
|
||||
json.insert(QSL("password"), QJsonValue(m_password));
|
||||
|
||||
QByteArray result_raw;
|
||||
NetworkResult network_reply = NetworkFactory::performNetworkOperation(m_url, qApp->settings()->value(GROUP(Feeds),
|
||||
@ -110,8 +110,8 @@ TtRssResponse TtRssNetworkFactory::logout() {
|
||||
if (!m_sessionId.isEmpty()) {
|
||||
|
||||
QJsonObject json;
|
||||
json["op"] = "logout";
|
||||
json["sid"] = m_sessionId;
|
||||
json.insert(QSL("op"), QJsonValue(QSL("logout")));
|
||||
json.insert(QSL("sid"), QJsonValue(m_sessionId));
|
||||
|
||||
QByteArray result_raw;
|
||||
NetworkResult network_reply = NetworkFactory::performNetworkOperation(m_url, qApp->settings()->value(GROUP(Feeds),
|
||||
@ -141,9 +141,9 @@ TtRssResponse TtRssNetworkFactory::logout() {
|
||||
|
||||
TtRssGetFeedsCategoriesResponse TtRssNetworkFactory::getFeedsCategories() {
|
||||
QJsonObject json;
|
||||
json["op"] = "getFeedTree";
|
||||
json["sid"] = m_sessionId;
|
||||
json["include_empty"] = true;
|
||||
json.insert(QSL("op"), QJsonValue(QSL("getFeedTree")));
|
||||
json.insert(QSL("sid"), QJsonValue(m_sessionId));
|
||||
json.insert(QSL("include_empty"), QJsonValue(true));
|
||||
|
||||
const int timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt();
|
||||
QByteArray result_raw;
|
||||
@ -156,7 +156,7 @@ TtRssGetFeedsCategoriesResponse TtRssNetworkFactory::getFeedsCategories() {
|
||||
if (result.isNotLoggedIn()) {
|
||||
// We are not logged in.
|
||||
login();
|
||||
json["sid"] = m_sessionId;
|
||||
json.insert(QSL("sid"), QJsonValue(m_sessionId));
|
||||
|
||||
network_reply = NetworkFactory::performNetworkOperation(m_url, timeout, QJsonDocument(json).toJson(QJsonDocument::Compact), CONTENT_TYPE, result_raw,
|
||||
QNetworkAccessManager::PostOperation,
|
||||
@ -197,7 +197,7 @@ TtRssGetHeadlinesResponse TtRssNetworkFactory::getHeadlines(int feed_id, int lim
|
||||
if (result.isNotLoggedIn()) {
|
||||
// We are not logged in.
|
||||
login();
|
||||
json["sid"] = m_sessionId;
|
||||
json.insert(QSL("sid"), QJsonValue(m_sessionId));
|
||||
|
||||
network_reply = NetworkFactory::performNetworkOperation(m_url, timeout, QJsonDocument(json).toJson(QJsonDocument::Compact), CONTENT_TYPE, result_raw,
|
||||
QNetworkAccessManager::PostOperation,
|
||||
|
Loading…
x
Reference in New Issue
Block a user