Library: eliminate QPainter warnings

There were many run-time warnings in YACReaderLibrary built in Debug
mode with hardware acceleration disabled and with ClassicComicsView
as the active comics view:
    QWidget::paintEngine: Should no longer be called
    QPainter::begin: Paint device returned engine == 0, type: 1

The ComicFlowWidgetSW::paintEvent() implementation now corresponds to
ComicFlowWidgetGL::paintEvent(), which has been fixed earlier.

QWidget::repaint() calls paintEvent() immediately.
PictureFlow::paintEvent() calls d->renderer->paint(). So the
d->renderer->paint() call in PictureFlow::updateMarks() was redundant.
This commit is contained in:
Igor Kushnir 2019-05-20 21:47:44 +03:00
parent 87a6645875
commit 92cf54980c
2 changed files with 1 additions and 2 deletions

View File

@ -105,7 +105,7 @@ void ComicFlowWidgetSW::keyPressEvent(QKeyEvent* event)
}
void ComicFlowWidgetSW::paintEvent(QPaintEvent *event)
{
flow->paintEvent(event);
ComicFlowWidget::paintEvent(event);
}
void ComicFlowWidgetSW::mousePressEvent(QMouseEvent* event)
{

View File

@ -1421,7 +1421,6 @@ void PictureFlow::markSlide(int index, YACReaderComicReadStatus readStatus)
void PictureFlow::updateMarks()
{
d->renderer->init();
d->renderer->paint();
repaint();
}