diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-05-15 17:02:26 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-05-16 04:22:20 +0000 |
commit | 62999cc6776e2b94e5a888ce77d6452a1020c660 (patch) | |
tree | 5fb2f0ac932eb72277e45d59bc298f36c01347c1 /ui/qt/bluetooth_att_server_attributes_dialog.cpp | |
parent | d3427b8a65d926ae4c85d0ec730eaf1a574041c3 (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/bluetooth_att_server_attributes_dialog.cpp')
-rw-r--r-- | ui/qt/bluetooth_att_server_attributes_dialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/qt/bluetooth_att_server_attributes_dialog.cpp b/ui/qt/bluetooth_att_server_attributes_dialog.cpp index 721068593a..973c09d5ee 100644 --- a/ui/qt/bluetooth_att_server_attributes_dialog.cpp +++ b/ui/qt/bluetooth_att_server_attributes_dialog.cpp @@ -21,11 +21,12 @@ #include "ui/simple_dialog.h" +#include "ui/qt/widgets/wireshark_file_dialog.h" + #include <QClipboard> #include <QContextMenuEvent> #include <QPushButton> #include <QTreeWidget> -#include <QFileDialog> static const int column_number_handle = 0; static const int column_number_uuid = 1; @@ -356,7 +357,7 @@ void BluetoothAttServerAttributesDialog::on_actionSave_as_image_triggered() { QPixmap image; - QString fileName = QFileDialog::getSaveFileName(this, tr("Save Table Image"), + QString fileName = WiresharkFileDialog::getSaveFileName(this, tr("Save Table Image"), "att_server_attributes_table.png", tr("PNG Image (*.png)")); |