qt: don't declare dp_ratio for Qt < 5.1

this avoids warnings about unused variables

Change-Id: I0ee033f90c1387615ffc167161e53f4293d89763
Reviewed-on: https://code.wireshark.org/review/15195
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
This commit is contained in:
Martin Kaiser 2016-04-30 16:42:08 +02:00
parent deb687b376
commit 90eea14044
2 changed files with 2 additions and 2 deletions

View File

@ -193,9 +193,9 @@ bool OverlayScrollBar::eventFilter(QObject *watched, QEvent *event)
ret = true;
if (!marked_packet_img_.isNull()) {
qreal dp_ratio = 1.0;
QRect groove_rect = grooveRect();
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
qreal dp_ratio = 1.0;
dp_ratio = devicePixelRatio();
groove_rect.setTopLeft(groove_rect.topLeft() * dp_ratio);
groove_rect.setSize(groove_rect.size() * dp_ratio);

View File

@ -1519,8 +1519,8 @@ void PacketList::drawFarOverlay()
if (!prefs.gui_packet_list_show_minimap) return;
QSize groove_size = overlay_sb_->grooveRect().size();
qreal dp_ratio = 1.0;
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
qreal dp_ratio = 1.0;
dp_ratio = overlay_sb_->devicePixelRatio();
groove_size *= dp_ratio;
#endif