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:
parent
9baf5483e7
commit
03b12786cf
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user