Strict qt5.15 breaks poppler

This commit is contained in:
Luis Ángel San Martín 2021-10-23 17:11:50 +02:00
parent ab2de73285
commit 4bee296096
2 changed files with 12 additions and 3 deletions

View File

@ -775,7 +775,11 @@ void Viewer::mouseMoveEvent(QMouseEvent *event)
const QPixmap Viewer::pixmap()
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return content->pixmap();
#else
return content->pixmap(Qt::ReturnByValue);
#endif
}
void Viewer::magnifyingGlassSwitch()

View File

@ -36,9 +36,6 @@ defineTest(minQtVersion) {
error(YACReader requires Qt 5.15 or newer but $$[QT_VERSION] was detected)
}
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
DEFINES += QT_DEPRECATED_WARNINGS
# reduce log pollution
CONFIG += silent
@ -81,3 +78,11 @@ unix:!macx:!CONFIG(poppler):!CONFIG(pdfium):!CONFIG(no_pdf) {
macx:!CONFIG(pdfkit):!CONFIG(pdfium):!CONFIG(no_pdf) {
CONFIG += pdfkit
}
!CONFIG(poppler) {
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
} else {
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050900
}
DEFINES += QT_DEPRECATED_WARNINGS