summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-10-19 12:27:11 +0200
committerAnders Broman <a.broman58@gmail.com>2016-10-20 05:03:07 +0000
commit9c3d81adde2d901a18fb0dc5a5dc2220f76cd920 (patch)
treecebcb733c078e2fce37acdecbd99713d71629dc0
parentd38ed8e55f7df9b34b9a7859ff54dde726f2feb0 (diff)
downloadwireshark-9c3d81adde2d901a18fb0dc5a5dc2220f76cd920.tar.gz
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>
-rw-r--r--CMakeLists.txt2
-rw-r--r--configure.ac35
-rw-r--r--doc/README.developer9
-rw-r--r--ui/qt/font_color_preferences_frame.cpp6
-rw-r--r--ui/qt/proto_tree.cpp4
-rw-r--r--ui/qt/qt_ui_utils.cpp4
-rw-r--r--ui/qt/stock_icon.cpp4
7 files changed, 8 insertions, 56 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef5f4e8c53..9786ff4bf7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -772,7 +772,7 @@ if(BUILD_wireshark)
set(QT_VERSION 5)
else()
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)
endif()
endif()
diff --git a/configure.ac b/configure.ac
index 5a0cede700..9805e38f44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1237,7 +1237,7 @@ GTK2_MIN_VERSION=2.12.0
AC_SUBST(GTK2_MIN_VERSION)
GTK3_MIN_VERSION=3.0.0
AC_SUBST(GTK3_MIN_VERSION)
-QT_MIN_VERSION=4.7.0
+QT_MIN_VERSION=4.8.0
AC_SUBST(QT_MIN_VERSION)
# 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.
@@ -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
# force all programs to be built with GTK+ or Qt.
#
-# Release dates for GTK+ versions:
-# https://en.wikipedia.org/wiki/GTK+#Releases
-# 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
+# For a list of library versions and their support across different platforms,
+# see https://wiki.wireshark.org/Development/Support_library_version_tracking
have_qt=no
have_gtk=no
diff --git a/doc/README.developer b/doc/README.developer
index 76adcb7f0f..774e41e973 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -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.
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
-newer. If a Glib/GTK+/Qt mechanism is available only in Glib/GTK+/Qt
-versions newer than 2.16/2.12/4.7 then use "#if GLIB_CHECK_VERSION(...)",
-"#if GTK_CHECK_VERSION(...)" or "#if QT_VERSION_CHECK(...)" to conditionally
-compile code using that mechanism.
+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 newer Glib/GTK+/Qt
+versions then use "#if GLIB_CHECK_VERSION(...)", "#if GTK_CHECK_VERSION(...)" or
+"#if QT_VERSION_CHECK(...)" to conditionally compile code using that mechanism.
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
diff --git a/ui/qt/font_color_preferences_frame.cpp b/ui/qt/font_color_preferences_frame.cpp
index ca9686a91a..7f90510ad7 100644
--- a/ui/qt/font_color_preferences_frame.cpp
+++ b/ui/qt/font_color_preferences_frame.cpp
@@ -81,15 +81,9 @@ void FontColorPreferencesFrame::updateWidgets()
{
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(
cur_font_.family() + " " + cur_font_.styleName() + " " +
QString::number(cur_font_.pointSizeF(), 'f', 1));
-#endif
ui->fontSampleLineEdit->setFont(cur_font_);
QString line_edit_ss = QString("QLineEdit { margin-left: %1px; }").arg(margin);
diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp
index 1527172834..18f041a681 100644
--- a/ui/qt/proto_tree.cpp
+++ b/ui/qt/proto_tree.cpp
@@ -572,11 +572,7 @@ void ProtoTree::itemDoubleClick(QTreeWidgetItem *item, int) {
if (!fi || !fi->hfinfo) return;
if(fi->hfinfo->type == FT_FRAMENUM) {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
if (QApplication::queryKeyboardModifiers() & Qt::ShiftModifier) {
-#else
- if (QApplication::keyboardModifiers() & Qt::ShiftModifier) {
-#endif
emit openPacketInNewWindow(true);
} else {
emit goToPacket(fi->value.value.uinteger);
diff --git a/ui/qt/qt_ui_utils.cpp b/ui/qt/qt_ui_utils.cpp
index 071592cc21..a4ad8bda27 100644
--- a/ui/qt/qt_ui_utils.cpp
+++ b/ui/qt/qt_ui_utils.cpp
@@ -192,11 +192,7 @@ QString html_escape(const QString plain_string) {
void smooth_font_size(QFont &font) {
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());
-#endif
if (size_list.size() < 2) return;
diff --git a/ui/qt/stock_icon.cpp b/ui/qt/stock_icon.cpp
index ee7231593d..cc1da56564 100644
--- a/ui/qt/stock_icon.cpp
+++ b/ui/qt/stock_icon.cpp
@@ -75,18 +75,14 @@ StockIcon::StockIcon(const QString icon_name) :
// X11 only as per the QIcon documentation.
if (hasThemeIcon(icon_name)) {
QIcon theme_icon = fromTheme(icon_name);
-#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
swap(theme_icon);
-#endif
return;
}
// Is this is an icon we've manually mapped to a standard pixmap below?
if (icon_name_to_standard_pixmap_.contains(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);
-#endif
return;
}