mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
Extract method
This commit is contained in:
@ -466,18 +466,8 @@ void ComicVineDialog::getComicsInfo(QList<QPair<ComicDB, QString>> matchingInfo,
|
||||
|
||||
setLoadingMessage(tr("Retrieving tags for : %1").arg(p.first.getFileName()));
|
||||
}
|
||||
QString connectionName = "";
|
||||
{
|
||||
QSqlDatabase db = DataBaseManagement::loadDatabase(databasePath);
|
||||
db.open();
|
||||
db.transaction();
|
||||
foreach (ComicDB comic, comics) {
|
||||
DBHelper::update(&(comic.info), db);
|
||||
}
|
||||
db.commit();
|
||||
connectionName = db.connectionName();
|
||||
}
|
||||
QSqlDatabase::removeDatabase(connectionName);
|
||||
|
||||
DBHelper::updateComicsInfo(comics, databasePath);
|
||||
|
||||
emit accepted();
|
||||
}
|
||||
|
Reference in New Issue
Block a user