1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-31 19:45:31 +01:00

More descriptive sqlite errors

This commit is contained in:
David Sansome 2010-02-13 22:55:48 +00:00
parent 9baf5483e7
commit 03b12786cf

View File

@ -50,7 +50,7 @@ QSqlDatabase LibraryBackend::Connect() {
db = QSqlDatabase::addDatabase("QSQLITE", connection_id);
db.setDatabaseName(directory_ + "/" + kDatabaseName);
if (!db.open()) {
emit Error(db.lastError().text());
emit Error("LibraryBackend: " + db.lastError().text());
return db;
}
@ -72,7 +72,7 @@ QSqlDatabase LibraryBackend::Connect() {
bool LibraryBackend::CheckErrors(const QSqlError& error) {
if (error.isValid()) {
qDebug() << error;
emit Error(error.text());
emit Error("LibraryBackend: " + error.text());
return true;
}
return false;