diff options
author | Zdeněk Žamberský <zzdevel@seznam.cz> | 2016-06-04 21:17:46 +0200 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-06-05 01:59:04 +0000 |
commit | b84b3f9f1d8577255a9d83c81277ebc53bcac68d (patch) | |
tree | a151464401ee4f037c472675801c74c0f0a95333 /ui/qt/main_window_slots.cpp | |
parent | bb246f5cc652aa96b43a57fec775865f4de9d6b4 (diff) |
Qt ui code: fix qreal type problems on ARM platform
fixing problems in qt ui code comming from the fact that qreal type is float on
ARM platform and double on other platforms, which causes build errors on ARM
(not all casts are probably strictly necessary)
Bug: 12483
Change-Id: Ife5e6d3649a7ee1ad4e7eadffe9f4484ff2718de
Reviewed-on: https://code.wireshark.org/review/15723
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r-- | ui/qt/main_window_slots.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index d7e6130aa4..dae326c065 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -2254,9 +2254,9 @@ void MainWindow::zoomText() // Scale by 10%, rounding to nearest half point, minimum 1 point. // XXX Small sizes repeat. It might just be easier to create a map of multipliers. mono_font_ = QFont(wsApp->monospaceFont()); - qreal zoom_size = wsApp->monospaceFont().pointSize() * 2 * qPow(1.1, recent.gui_zoom_level); - zoom_size = qRound(zoom_size) / 2.0; - zoom_size = qMax(zoom_size, 1.0); + qreal zoom_size = wsApp->monospaceFont().pointSize() * 2 * qPow(qreal(1.1), recent.gui_zoom_level); + zoom_size = qRound(zoom_size) / qreal(2.0); + zoom_size = qMax(zoom_size, qreal(1.0)); mono_font_.setPointSizeF(zoom_size); emit monospaceFontChanged(mono_font_); } |