mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Fix crash caused by accessing the UI thread from a background thread.
ComicVineDialog was calling close from background, plus accepted is emmited from a background thread, so it needs a QueuedConnection.
This commit is contained in:
parent
26c2226032
commit
229afbc9a9
@ -111,6 +111,8 @@ void ComicVineDialog::doConnections()
|
||||
connect(selectVolumeWidget,SIGNAL(loadPage(QString,int)),this,SLOT(searchVolume(QString,int)));
|
||||
connect(selectComicWidget,SIGNAL(loadPage(QString,int)),this,SLOT(getVolumeComicsInfo(QString,int)));
|
||||
connect(sortVolumeComicsWidget,SIGNAL(loadPage(QString,int)),this,SLOT(getVolumeComicsInfo(QString,int)));
|
||||
|
||||
connect(this, SIGNAL(accepted()), this, SLOT(close()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void ComicVineDialog::goNext()
|
||||
@ -456,7 +458,6 @@ void ComicVineDialog::getComicsInfo(QList<QPair<ComicDB, QString> > & matchingIn
|
||||
db.close();
|
||||
QSqlDatabase::removeDatabase(db.connectionName());
|
||||
|
||||
close();
|
||||
emit accepted();
|
||||
}
|
||||
|
||||
@ -472,8 +473,7 @@ void ComicVineDialog::getComicInfo(const QString &comicId, int count, const QStr
|
||||
//TODO
|
||||
if(mode == SingleComic || currentIndex == (comics.count()-1))
|
||||
{
|
||||
close();
|
||||
emit accepted();
|
||||
emit accepted();
|
||||
} else
|
||||
{
|
||||
goToNextComic();
|
||||
@ -496,7 +496,6 @@ void ComicVineDialog::getComicInfo(const QString &comicId, int count, const QStr
|
||||
|
||||
if(mode == SingleComic || currentIndex == (comics.count()-1))
|
||||
{
|
||||
close();
|
||||
emit accepted();
|
||||
} else
|
||||
{
|
||||
@ -645,7 +644,6 @@ void ComicVineDialog::goToNextComic()
|
||||
{
|
||||
if(mode == SingleComic || currentIndex == (comics.count()-1))
|
||||
{
|
||||
close();
|
||||
emit accepted();
|
||||
return;
|
||||
}
|
||||
|
@ -1054,7 +1054,7 @@ void LibraryWindow::createConnections()
|
||||
connect(propertiesDialog,SIGNAL(accepted()),navigationController,SLOT(reselectCurrentSource()));
|
||||
|
||||
//comic vine
|
||||
connect(comicVineDialog,SIGNAL(accepted()),navigationController,SLOT(reselectCurrentSource()));
|
||||
connect(comicVineDialog,SIGNAL(accepted()),navigationController,SLOT(reselectCurrentSource()), Qt::QueuedConnection);
|
||||
|
||||
connect(updateLibraryAction,SIGNAL(triggered()),this,SLOT(updateLibrary()));
|
||||
connect(renameLibraryAction,SIGNAL(triggered()),this,SLOT(renameLibrary()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user