Commit 2aeb5acb authored by Lukas Appelhans's avatar Lukas Appelhans

Proper error handling

parent 721176ae
......@@ -544,7 +544,9 @@ void SyncOperation::databaseProgressChanged(int progress)
void SyncOperation::databaseStatusChanged(AkabeiClient::DatabaseHandler::Status status)
{
if (status != AkabeiClient::DatabaseHandler::StatusFinished && status != AkabeiClient::DatabaseHandler::StatusUpToDate) {
if (status != AkabeiClient::DatabaseHandler::StatusFinished &&
status != AkabeiClient::DatabaseHandler::StatusUpToDate &&
status != AkabeiClient::DatabaseHandler::StatusError) {
return;
}
......@@ -556,6 +558,8 @@ void SyncOperation::databaseStatusChanged(AkabeiClient::DatabaseHandler::Status
QTextStream out(stdout);
if (status == AkabeiClient::DatabaseHandler::StatusUpToDate) {
out << i18n("%1 already up to date!", db->name()) << endl;
} else if (status == AkabeiClient::DatabaseHandler::StatusError) {
out << i18n("%1 could not be updated!", db->name()) << endl;
} else {
out << i18n("%1 updated!", db->name()) << endl;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment