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.
This commit is contained in:
Roland Knall 2022-07-13 16:22:28 -05:00
parent 32a4a08683
commit 06cd84a6e9
3 changed files with 5 additions and 12 deletions

View File

@ -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

View File

@ -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):

View File

@ -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
*/