OS/2 fix.
This commit is contained in:
parent
0dfaef3a12
commit
b44292311e
@ -119,12 +119,12 @@ bool StandardServiceRoot::deleteViaGui() {
|
|||||||
// TODO: todo
|
// TODO: todo
|
||||||
|
|
||||||
// Remove all feeds.
|
// Remove all feeds.
|
||||||
if (!QSqlQuery(connection).exec(QSL("DELETE FROM Feeds WHERE account_id = %1;").arg(accountId()))) {
|
if (!QSqlQuery(connection).exec(QString("DELETE FROM Feeds WHERE account_id = %1;").arg(accountId()))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all categories.
|
// Remove all categories.
|
||||||
if (!QSqlQuery(connection).exec(QSL("DELETE FROM Categories WHERE account_id = %1;").arg(accountId()))) {
|
if (!QSqlQuery(connection).exec(QString("DELETE FROM Categories WHERE account_id = %1;").arg(accountId()))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,7 +376,7 @@ void StandardServiceRoot::loadFromDatabase(){
|
|||||||
QSqlQuery query_feeds(database);
|
QSqlQuery query_feeds(database);
|
||||||
query_feeds.setForwardOnly(true);
|
query_feeds.setForwardOnly(true);
|
||||||
|
|
||||||
if (!query_feeds.exec(QSL("SELECT * FROM Feeds WHERE account_id = %1;").arg(accountId())) || query_feeds.lastError().isValid()) {
|
if (!query_feeds.exec(QString("SELECT * FROM Feeds WHERE account_id = %1;").arg(accountId())) || query_feeds.lastError().isValid()) {
|
||||||
qFatal("Query for obtaining feeds failed. Error message: '%s'.",
|
qFatal("Query for obtaining feeds failed. Error message: '%s'.",
|
||||||
qPrintable(query_feeds.lastError().text()));
|
qPrintable(query_feeds.lastError().text()));
|
||||||
}
|
}
|
||||||
|
@ -68,14 +68,14 @@ LoginResult TtRssNetworkFactory::login() {
|
|||||||
json["user"] = m_username;
|
json["user"] = m_username;
|
||||||
json["password"] = m_password;
|
json["password"] = m_password;
|
||||||
|
|
||||||
QByteArray result;
|
QByteArray result_raw;
|
||||||
NetworkResult res = NetworkFactory::uploadData(m_url, DOWNLOAD_TIMEOUT, QtJson::serialize(json), CONTENT_TYPE, result);
|
NetworkResult res = NetworkFactory::uploadData(m_url, DOWNLOAD_TIMEOUT, QtJson::serialize(json), CONTENT_TYPE, result_raw);
|
||||||
|
|
||||||
if (res.first != QNetworkReply::NoError) {
|
if (res.first != QNetworkReply::NoError) {
|
||||||
return LoginResult(res.first, TtRssLoginResponse());
|
return LoginResult(res.first, TtRssLoginResponse());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LoginResult result(res.first, TtRssLoginResponse(QString::fromUtf8(result)));
|
LoginResult result(res.first, TtRssLoginResponse(QString::fromUtf8(result_raw)));
|
||||||
m_session_Id = result.second.sessionId();
|
m_session_Id = result.second.sessionId();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user