From b3f3d669e5f3c1f04d7d6c771da8604e25a71eec Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 17 Feb 2015 18:11:01 -0800 Subject: Update Qt version checks. It looks like QPaintDevice::devicePixelRatio() was added in 5.1. Back out some debugging code. Change-Id: I40f19c0d7901ce95f587531983e5c6644daf64f4 Reviewed-on: https://code.wireshark.org/review/7226 Reviewed-by: Gerald Combs --- ui/qt/qcustomplot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/qt/qcustomplot.cpp') diff --git a/ui/qt/qcustomplot.cpp b/ui/qt/qcustomplot.cpp index 398bdacee0..1573f02920 100644 --- a/ui/qt/qcustomplot.cpp +++ b/ui/qt/qcustomplot.cpp @@ -6398,7 +6398,7 @@ void QCPAxisPainterPrivate::placeTickLabel(QCPPainter *painter, double position, CachedLabel *newCachedLabel = new CachedLabel; TickLabelData labelData = getTickLabelData(painter->font(), text); newCachedLabel->offset = getTickLabelDrawOffset(labelData)+labelData.rotatedTotalBounds.topLeft(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QSize clSize = labelData.rotatedTotalBounds.size(); clSize *= painter->device()->devicePixelRatio(); newCachedLabel->pixmap = QPixmap(clSize); @@ -9071,7 +9071,7 @@ QCustomPlot::QCustomPlot(QWidget *parent) : currentLocale.setNumberOptions(QLocale::OmitGroupSeparator); setLocale(currentLocale); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QSize pbSize = mPaintBuffer.size(); pbSize *= devicePixelRatio(); mPaintBuffer = QPixmap(pbSize); @@ -10697,7 +10697,7 @@ void QCustomPlot::paintEvent(QPaintEvent *event) void QCustomPlot::resizeEvent(QResizeEvent *event) { // resize and repaint the buffer: -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QSize pbSize = event->size(); pbSize *= devicePixelRatio(); mPaintBuffer = QPixmap(pbSize); -- cgit v1.2.1