mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-06 20:33:38 +01:00
OS/2 fix.
This commit is contained in:
parent
0dfaef3a12
commit
b44292311e
@ -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()));
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user