Mercurial > hg > syntilista
diff src/main.cpp @ 248:4f947840c806
Oops, forgot to move slCheckAndReportSQLError() to util.cpp. Fixed.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 08 May 2018 13:21:17 +0300 |
parents | 43a5e09bb832 |
children | cfaf03d8d23e |
line wrap: on
line diff
--- a/src/main.cpp Tue May 08 13:18:58 2018 +0300 +++ b/src/main.cpp Tue May 08 13:21:17 2018 +0300 @@ -55,34 +55,6 @@ static const int nslSQLSchemaData = sizeof(slSQLSchemaData) / sizeof(slSQLSchemaData[0]); -// -// Check if an SQL error has occured (for given QSqlError) and -// report it to stdout if so. Return "false" if error has occured, -// true otherwise. -// -bool slCheckAndReportSQLError(const QString where, const QSqlError &err, bool report) -{ - if (err.isValid()) - { - // If an error has occured, log it - slLog("ERROR", - QStringLiteral("SQL %1: %2"). - arg(where).arg(err.text())); - return false; - } - else - { - // If no error, but event reporting requested, log it - if (report) - { - slLog("NOTE", - QStringLiteral("SQL OK %1").arg(where)); - } - return true; - } -} - - void SLPersonInfo::dump() { printf(