OS/2 fix.

This commit is contained in:
Martin Rotter 2015-12-03 19:50:21 +01:00
parent 0dfaef3a12
commit b44292311e
2 changed files with 6 additions and 6 deletions

View File

@ -119,12 +119,12 @@ bool StandardServiceRoot::deleteViaGui() {
// TODO: todo
// 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;
}
// 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;
}
@ -376,7 +376,7 @@ void StandardServiceRoot::loadFromDatabase(){
QSqlQuery query_feeds(database);
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'.",
qPrintable(query_feeds.lastError().text()));
}

View File

@ -68,14 +68,14 @@ LoginResult TtRssNetworkFactory::login() {
json["user"] = m_username;
json["password"] = m_password;
QByteArray result;
NetworkResult res = NetworkFactory::uploadData(m_url, DOWNLOAD_TIMEOUT, QtJson::serialize(json), CONTENT_TYPE, result);
QByteArray result_raw;
NetworkResult res = NetworkFactory::uploadData(m_url, DOWNLOAD_TIMEOUT, QtJson::serialize(json), CONTENT_TYPE, result_raw);
if (res.first != QNetworkReply::NoError) {
return LoginResult(res.first, TtRssLoginResponse());
}
else {
LoginResult result(res.first, TtRssLoginResponse(QString::fromUtf8(result)));
LoginResult result(res.first, TtRssLoginResponse(QString::fromUtf8(result_raw)));
m_session_Id = result.second.sessionId();
return result;
}