aboutsummaryrefslogtreecommitdiffstats
path: root/ui
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
parenta5aab2432104fa1c057e4beda37f51b465ae5b9e (diff)
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')
-rw-r--r--ui/qt/io_graph_dialog.cpp3
-rw-r--r--ui/qt/qcustomplot.cpp6
2 files changed, 3 insertions, 6 deletions
diff --git a/ui/qt/io_graph_dialog.cpp b/ui/qt/io_graph_dialog.cpp
index 972eb2921a..9aa5abbe56 100644
--- a/ui/qt/io_graph_dialog.cpp
+++ b/ui/qt/io_graph_dialog.cpp
@@ -183,7 +183,6 @@ static void io_graph_free_cb(void* p) {
} // extern "C"
-#include <QDebug>
Q_DECLARE_METATYPE(IOGraph *)
IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf) :
@@ -210,7 +209,6 @@ IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf) :
setWindowSubtitle(tr("IO Graphs"));
setAttribute(Qt::WA_DeleteOnClose, true);
QCustomPlot *iop = ui->ioPlot;
- qDebug() << "=iop" << iop->rect() << iop->geometry() << iop->devicePixelRatio();
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
save_bt->setText(tr("Save As..."));
@@ -261,7 +259,6 @@ IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf) :
iop->plotLayout()->insertRow(0);
iop->plotLayout()->addElement(0, 0, title);
title->setText(tr("Wireshark IO Graphs: %1").arg(cap_file_.fileTitle()));
- title->setAntialiased(false);
tracer_ = new QCPItemTracer(iop);
iop->addItem(tracer_);
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);