From 06cd84a6e9f8bd0807cca35595b94b07de254b07 Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Wed, 13 Jul 2022 16:22:28 -0500 Subject: [PATCH] Qt: Recommend 5.12 and enforce 5.10 In order to phase out older versions, we recommed 5.12 as a minimum Qt version going forward. Although build support for 5.10 and 5.11 is not being removed at this point, it might be for 4.x at a later time. --- CMakeLists.txt | 7 +++++-- ui/qt/models/atap_data_model.cpp | 4 ---- ui/qt/utils/qt_ui_utils.h | 6 ------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa231892cb..3ea7b9b327 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1382,8 +1382,11 @@ if(GNUTLS_FOUND) endif() if (QT_FOUND) - if (Qt${qtver}Widgets_VERSION VERSION_LESS 5.9) - message(FATAL_ERROR "Qt 5.9 or later is required.") + if (Qt${qtver}Widgets_VERSION VERSION_LESS 5.10) + message(FATAL_ERROR "Qt 5.12 or later is required.") + endif() + if (Qt${qtver}Widgets_VERSION VERSION_LESS 5.12) + message(WARNING "Wireshark can be build with this version of Qt, though 5.12 or higher is recommended.") endif() if(NOT DEFINED MOC_OPTIONS) # Squelch moc verbose "nothing to do" output diff --git a/ui/qt/models/atap_data_model.cpp b/ui/qt/models/atap_data_model.cpp index 73734d14b4..7890a1de20 100644 --- a/ui/qt/models/atap_data_model.cpp +++ b/ui/qt/models/atap_data_model.cpp @@ -32,11 +32,7 @@ static QString formatString(qlonglong value) { -#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) - return QString(format_size(value, FORMAT_SIZE_UNIT_NONE, FORMAT_SIZE_PREFIX_SI)); -#else return QLocale::system().formattedDataSize(value, QLocale::DataSizeSIFormat); -#endif } ATapDataModel::ATapDataModel(dataModelType type, int protoId, QString filter, QObject *parent): diff --git a/ui/qt/utils/qt_ui_utils.h b/ui/qt/utils/qt_ui_utils.h index 044b71d353..3e98fcac0e 100644 --- a/ui/qt/utils/qt_ui_utils.h +++ b/ui/qt/utils/qt_ui_utils.h @@ -45,12 +45,6 @@ struct epan_range; } #endif /* __cplusplus */ -// qsizetype was added in Qt 5.10.0 and is used in the Qt 6 API. -#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) -#include "include/ws_posix_compat.h" -typedef ssize_t qsizetype; -#endif - /* * Helper macro, to prevent old-style-cast warnings, when using GList in c++ code */