mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Merge pull request #57 from vedgy/misc-code-fixes
Miscellaneous code fixes
This commit is contained in:
commit
ca34e99ec4
@ -260,6 +260,8 @@ PageLoader::PageLoader(QMutex * m):
|
|||||||
|
|
||||||
PageLoader::~PageLoader()
|
PageLoader::~PageLoader()
|
||||||
{
|
{
|
||||||
|
//TODO this destructor never runs. If it is ever called, it will hang, because
|
||||||
|
//the implementation is broken due to the absolutely endless loop in run().
|
||||||
mutex->lock();
|
mutex->lock();
|
||||||
condition.wakeOne();
|
condition.wakeOne();
|
||||||
mutex->unlock();
|
mutex->unlock();
|
||||||
@ -284,9 +286,11 @@ void PageLoader::generate(int index, QSize size,const QByteArray & rImage)
|
|||||||
start();
|
start();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
mutex->lock();
|
||||||
// already running, wake up whenever ready
|
// already running, wake up whenever ready
|
||||||
restart = true;
|
restart = true;
|
||||||
condition.wakeOne();
|
condition.wakeOne();
|
||||||
|
mutex->unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +318,7 @@ void PageLoader::run()
|
|||||||
|
|
||||||
// put to sleep
|
// put to sleep
|
||||||
mutex->lock();
|
mutex->lock();
|
||||||
if (!this->restart)
|
while (!this->restart)
|
||||||
condition.wait(mutex);
|
condition.wait(mutex);
|
||||||
restart = false;
|
restart = false;
|
||||||
mutex->unlock();
|
mutex->unlock();
|
||||||
|
@ -105,7 +105,7 @@ void ComicFlowWidgetSW::keyPressEvent(QKeyEvent* event)
|
|||||||
}
|
}
|
||||||
void ComicFlowWidgetSW::paintEvent(QPaintEvent *event)
|
void ComicFlowWidgetSW::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
flow->paintEvent(event);
|
ComicFlowWidget::paintEvent(event);
|
||||||
}
|
}
|
||||||
void ComicFlowWidgetSW::mousePressEvent(QMouseEvent* event)
|
void ComicFlowWidgetSW::mousePressEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
|
@ -1798,8 +1798,6 @@ void LibraryWindow::checkEmptyFolder()
|
|||||||
void LibraryWindow::openComic(const ComicDB &comic)
|
void LibraryWindow::openComic(const ComicDB &comic)
|
||||||
{
|
{
|
||||||
if(!importedCovers) {
|
if(!importedCovers) {
|
||||||
QList<ComicDB> siblings = comicsModel->getAllComics();
|
|
||||||
|
|
||||||
//TODO generate IDS for libraries...
|
//TODO generate IDS for libraries...
|
||||||
quint64 libraryId = libraries.getId(selectedLibrary->currentText());
|
quint64 libraryId = libraries.getId(selectedLibrary->currentText());
|
||||||
bool yacreaderFound = false;
|
bool yacreaderFound = false;
|
||||||
|
@ -1421,7 +1421,6 @@ void PictureFlow::markSlide(int index, YACReaderComicReadStatus readStatus)
|
|||||||
void PictureFlow::updateMarks()
|
void PictureFlow::updateMarks()
|
||||||
{
|
{
|
||||||
d->renderer->init();
|
d->renderer->init();
|
||||||
d->renderer->paint();
|
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user