summaryrefslogtreecommitdiff
path: root/ui/qt/qcustomplot.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2015-02-17 18:11:01 -0800
committerGerald Combs <gerald@wireshark.org>2015-02-18 02:14:59 +0000
commitb3f3d669e5f3c1f04d7d6c771da8604e25a71eec (patch)
treee59bb914aa3e7591527fad7d67e8e416a34cf6f8 /ui/qt/qcustomplot.cpp
parenta5aab2432104fa1c057e4beda37f51b465ae5b9e (diff)
downloadwireshark-b3f3d669e5f3c1f04d7d6c771da8604e25a71eec.tar.gz
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 <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/qcustomplot.cpp')
-rw-r--r--ui/qt/qcustomplot.cpp6
1 files changed, 3 insertions, 3 deletions
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);