Officially require Qt 4.8 or newer

Since v2.3.0rc0-1002-g1cd2255, Qt 4.8 became mandatory, reflect this in
the version requirements. This will not affect a lot of distributions
(RHEL and SLES only had Qt 4.6).

For a more complete list of supported platforms, see
https://wiki.wireshark.org/Development/Support_library_version_tracking

While at it, correct some other minimum versions in documentation.

Change-Id: I11f2dfba72c75429f6838404a81ed3b3dc302d5f
Reviewed-on: https://code.wireshark.org/review/18314
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Peter Wu 2016-10-19 12:27:11 +02:00 committed by Anders Broman
parent d38ed8e55f
commit 9c3d81adde
7 changed files with 8 additions and 56 deletions

View File

@ -772,7 +772,7 @@ if(BUILD_wireshark)
set(QT_VERSION 5) set(QT_VERSION 5)
else() else()
set(PACKAGELIST ${PACKAGELIST} Qt4) set(PACKAGELIST ${PACKAGELIST} Qt4)
set(Qt4_OPTIONS 4.7.1 REQUIRED QtCore QtGui) set(Qt4_OPTIONS 4.8 REQUIRED QtCore QtGui)
set(QT_VERSION 4) set(QT_VERSION 4)
endif() endif()
endif() endif()

View File

@ -1237,7 +1237,7 @@ GTK2_MIN_VERSION=2.12.0
AC_SUBST(GTK2_MIN_VERSION) AC_SUBST(GTK2_MIN_VERSION)
GTK3_MIN_VERSION=3.0.0 GTK3_MIN_VERSION=3.0.0
AC_SUBST(GTK3_MIN_VERSION) AC_SUBST(GTK3_MIN_VERSION)
QT_MIN_VERSION=4.7.0 QT_MIN_VERSION=4.8.0
AC_SUBST(QT_MIN_VERSION) AC_SUBST(QT_MIN_VERSION)
# GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or # GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
# GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later. # GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later.
@ -1249,37 +1249,8 @@ AC_SUBST(QT_MIN_VERSION)
# We don't add $GTK_LIBS or $Qt_LIBS to LIBS, because we don't want to # We don't add $GTK_LIBS or $Qt_LIBS to LIBS, because we don't want to
# force all programs to be built with GTK+ or Qt. # force all programs to be built with GTK+ or Qt.
# #
# Release dates for GTK+ versions: # For a list of library versions and their support across different platforms,
# https://en.wikipedia.org/wiki/GTK+#Releases # see https://wiki.wireshark.org/Development/Support_library_version_tracking
# 2.12.0: 14 Sep 2007
# 2.14.0: 04 Sep 2008
# 2.16.0: 13 Mar 2009
# 2.18.0: 23 Sep 2009
# 2.20.0: 23 Mar 2010
# 2.22.0: 23 Sep 2010
# 2.24.0: 30 Jan 2011
# 3.0.0: 10 Feb 2011
# 3.2.0: 25 Sep 2011
# 3.4.0: 26 Mar 2012
# 3.6.0: 24 Sep 2012
# 3.8.0: 25 Mar 2013
# 3.10.0: 23 Sep 2013
# 3.12.0: 25 Mar 2014
# 3.14.0: 30 Sep 2014
# 3.16.0: 22 Mar 2015
# 3.18.0 22 Sep 2015
#
# Release dates for Qt versions:
# https://en.wikipedia.org/wiki/List_of_Qt_releases
# 4.6.0: 01 Dec 2009
# 4.7.0: 21 Sep 2010
# 4.8.0: 15 Dec 2011
# 5.0.0: 19 Dec 2012
# 5.1.0: 03 Jul 2013
# 5.2.0: 12 Dec 2013
# 5.3.0: 20 May 2014
# 5.4.0: 10 Dec 2015
# 5.5.0: 01 Jul 2015
have_qt=no have_qt=no
have_gtk=no have_gtk=no

View File

@ -387,11 +387,10 @@ tmpnam is insecure and should not be used any more. Wireshark brings its
own mkstemp implementation for use on platforms that lack mkstemp. own mkstemp implementation for use on platforms that lack mkstemp.
Note: mkstemp does not accept NULL as a parameter. Note: mkstemp does not accept NULL as a parameter.
Wireshark supports platforms with GLib 2.16[.x]/GTK+ 2.12[.x]/Qt 4.7[.x] or Wireshark supports platforms with GLib 2.22[.x]/GTK+ 2.12[.x]/Qt 4.8[.x] or
newer. If a Glib/GTK+/Qt mechanism is available only in Glib/GTK+/Qt newer. If a Glib/GTK+/Qt mechanism is available only in newer Glib/GTK+/Qt
versions newer than 2.16/2.12/4.7 then use "#if GLIB_CHECK_VERSION(...)", versions then use "#if GLIB_CHECK_VERSION(...)", "#if GTK_CHECK_VERSION(...)" or
"#if GTK_CHECK_VERSION(...)" or "#if QT_VERSION_CHECK(...)" to conditionally "#if QT_VERSION_CHECK(...)" to conditionally compile code using that mechanism.
compile code using that mechanism.
When different code must be used on UN*X and Win32, use a #if or #ifdef When different code must be used on UN*X and Win32, use a #if or #ifdef
that tests _WIN32, not WIN32. Try to write code portably whenever that tests _WIN32, not WIN32. Try to write code portably whenever

View File

@ -81,15 +81,9 @@ void FontColorPreferencesFrame::updateWidgets()
{ {
int margin = style()->pixelMetric(QStyle::PM_LayoutLeftMargin); int margin = style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
#if QT_VERSION < QT_VERSION_CHECK(4, 8, 0)
ui->fontPushButton->setText(
cur_font_.family() + " " +
QString::number(cur_font_.pointSizeF(), 'f', 1));
#else
ui->fontPushButton->setText( ui->fontPushButton->setText(
cur_font_.family() + " " + cur_font_.styleName() + " " + cur_font_.family() + " " + cur_font_.styleName() + " " +
QString::number(cur_font_.pointSizeF(), 'f', 1)); QString::number(cur_font_.pointSizeF(), 'f', 1));
#endif
ui->fontSampleLineEdit->setFont(cur_font_); ui->fontSampleLineEdit->setFont(cur_font_);
QString line_edit_ss = QString("QLineEdit { margin-left: %1px; }").arg(margin); QString line_edit_ss = QString("QLineEdit { margin-left: %1px; }").arg(margin);

View File

@ -572,11 +572,7 @@ void ProtoTree::itemDoubleClick(QTreeWidgetItem *item, int) {
if (!fi || !fi->hfinfo) return; if (!fi || !fi->hfinfo) return;
if(fi->hfinfo->type == FT_FRAMENUM) { if(fi->hfinfo->type == FT_FRAMENUM) {
#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
if (QApplication::queryKeyboardModifiers() & Qt::ShiftModifier) { if (QApplication::queryKeyboardModifiers() & Qt::ShiftModifier) {
#else
if (QApplication::keyboardModifiers() & Qt::ShiftModifier) {
#endif
emit openPacketInNewWindow(true); emit openPacketInNewWindow(true);
} else { } else {
emit goToPacket(fi->value.value.uinteger); emit goToPacket(fi->value.value.uinteger);

View File

@ -192,11 +192,7 @@ QString html_escape(const QString plain_string) {
void smooth_font_size(QFont &font) { void smooth_font_size(QFont &font) {
QFontDatabase fdb; QFontDatabase fdb;
#if QT_VERSION < QT_VERSION_CHECK(4, 8, 0)
QList<int> size_list = fdb.smoothSizes(font.family(), "");
#else
QList<int> size_list = fdb.smoothSizes(font.family(), font.styleName()); QList<int> size_list = fdb.smoothSizes(font.family(), font.styleName());
#endif
if (size_list.size() < 2) return; if (size_list.size() < 2) return;

View File

@ -75,18 +75,14 @@ StockIcon::StockIcon(const QString icon_name) :
// X11 only as per the QIcon documentation. // X11 only as per the QIcon documentation.
if (hasThemeIcon(icon_name)) { if (hasThemeIcon(icon_name)) {
QIcon theme_icon = fromTheme(icon_name); QIcon theme_icon = fromTheme(icon_name);
#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
swap(theme_icon); swap(theme_icon);
#endif
return; return;
} }
// Is this is an icon we've manually mapped to a standard pixmap below? // Is this is an icon we've manually mapped to a standard pixmap below?
if (icon_name_to_standard_pixmap_.contains(icon_name)) { if (icon_name_to_standard_pixmap_.contains(icon_name)) {
QIcon standard_icon = wsApp->style()->standardIcon(icon_name_to_standard_pixmap_[icon_name]); QIcon standard_icon = wsApp->style()->standardIcon(icon_name_to_standard_pixmap_[icon_name]);
#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
swap(standard_icon); swap(standard_icon);
#endif
return; return;
} }