Added some error loggings.
This commit is contained in:
parent
b4982e5666
commit
31fdc92167
@ -29,6 +29,7 @@
|
||||
|
||||
#include <QPointer>
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlError>
|
||||
|
||||
|
||||
TtRssServiceEntryPoint::TtRssServiceEntryPoint(){
|
||||
@ -101,6 +102,9 @@ QList<ServiceRoot*> TtRssServiceEntryPoint::initializeSubtree() {
|
||||
roots.append(root);
|
||||
}
|
||||
}
|
||||
else {
|
||||
qWarning("TT-RSS: Getting list of activated accounts failed: '%s'.", qPrintable(query.lastError().text()));
|
||||
}
|
||||
|
||||
return roots;
|
||||
}
|
||||
|
@ -441,6 +441,9 @@ void TtRssServiceRoot::saveAccountDataToDatabase() {
|
||||
updateTitle();
|
||||
itemChanged(QList<RootItem*>() << this);
|
||||
}
|
||||
else {
|
||||
qWarning("TT-RSS: Updating account failed: '%s'.", qPrintable(query.lastError().text()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
// We are probably saving newly added account.
|
||||
@ -449,6 +452,7 @@ void TtRssServiceRoot::saveAccountDataToDatabase() {
|
||||
|
||||
// First obtain the ID, which can be assigned to this new account.
|
||||
if (!query.exec("SELECT max(id) FROM Accounts;") || !query.next()) {
|
||||
qWarning("TT-RSS: Getting max ID from Accounts table failed: '%s'.", qPrintable(query.lastError().text()));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -479,6 +483,9 @@ void TtRssServiceRoot::saveAccountDataToDatabase() {
|
||||
setAccountId(id_to_assign);
|
||||
updateTitle();
|
||||
}
|
||||
else {
|
||||
qWarning("TT-RSS: Saving of new account failed: '%s'.", qPrintable(query.lastError().text()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user