Skip to content

Commit 5d41f66

Browse files
committed
Fix deprecated warnings in qcustomplot
1 parent 9bd3b70 commit 5d41f66

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

thirdparty/qcustomplot/qcustomplot.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,10 @@ QCPPaintBufferPixmap::~QCPPaintBufferPixmap()
678678
QCPPainter *QCPPaintBufferPixmap::startPainting()
679679
{
680680
QCPPainter *result = new QCPPainter(&mBuffer);
681-
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
682-
result->setRenderHint(QPainter::HighQualityAntialiasing);
681+
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
682+
result->setRenderHint(QPainter::Antialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem
683+
#else
684+
result->setRenderHint(QPainter::HighQualityAntialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem
683685
#endif
684686
return result;
685687
}
@@ -15488,7 +15490,9 @@ void QCustomPlot::paintEvent(QPaintEvent *event)
1548815490
QCPPainter painter(this);
1548915491
if (painter.isActive())
1549015492
{
15491-
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
15493+
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
15494+
painter.setRenderHint(QPainter::Antialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem
15495+
#else
1549215496
painter.setRenderHint(QPainter::HighQualityAntialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem
1549315497
#endif
1549415498
if (mBackgroundBrush.style() != Qt::NoBrush)

0 commit comments

Comments
 (0)