aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/sctp_graph_dialog.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-05-15 17:02:26 -0700
committerAnders Broman <a.broman58@gmail.com>2018-05-16 04:22:20 +0000
commit62999cc6776e2b94e5a888ce77d6452a1020c660 (patch)
tree5fb2f0ac932eb72277e45d59bc298f36c01347c1 /ui/qt/sctp_graph_dialog.cpp
parentd3427b8a65d926ae4c85d0ec730eaf1a574041c3 (diff)
Windows: Make sure more native dialogs handle HiDPI.
Add a WiresharkFileDialog class, which is a thin wrapper around a few QFileDialog functions that sets per-monitor v2 DPI awareness before showing native dialogs and resets the awareness context afterward. Use it where we call QFileDialog::getXXX. Change-Id: Ib711a70aa94b693a2515804a729f666ea7fbd673 Reviewed-on: https://code.wireshark.org/review/27568 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/sctp_graph_dialog.cpp')
-rw-r--r--ui/qt/sctp_graph_dialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/sctp_graph_dialog.cpp b/ui/qt/sctp_graph_dialog.cpp
index dff5fac56d..f3546e5330 100644
--- a/ui/qt/sctp_graph_dialog.cpp
+++ b/ui/qt/sctp_graph_dialog.cpp
@@ -20,10 +20,10 @@
#include "ui/tap-sctp-analysis.h"
-#include <QFileDialog>
#include <QMessageBox>
#include <ui/qt/widgets/qcustomplot.h>
+#include "ui/qt/widgets/wireshark_file_dialog.h"
#include "wireshark_application.h"
SCTPGraphDialog::SCTPGraphDialog(QWidget *parent, sctp_assoc_info_t *assoc, capture_file *cf, int dir) :
@@ -436,7 +436,7 @@ void SCTPGraphDialog::save_graph(QDialog *dlg, QCustomPlot *plot)
.arg(bmp_filter)
.arg(jpeg_filter);
- file_name = QFileDialog::getSaveFileName(dlg, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
+ file_name = WiresharkFileDialog::getSaveFileName(dlg, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
path.canonicalPath(), filter, &extension);
if (file_name.length() > 0) {