Remove some references to Qt4.

Change-Id: I50f5abafb8adf18a5407427f7feb260301df45cc
Reviewed-on: https://code.wireshark.org/review/26771
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Gerald Combs 2018-04-05 18:00:16 -07:00 committed by Anders Broman
parent 5fd4659164
commit 0cb3176ab7
9 changed files with 16 additions and 77 deletions

View File

@ -2,7 +2,7 @@ Installing Wireshark on FreeBSD/OpenBSD/NetBSD/DragonFly BSD
======================================================================== ========================================================================
1. Extra packages required 1. Extra packages required
2. Compiling Wireshark 2. Compiling Wireshark
3. Berkeley Packet Filter (BPF) requirement 3. Berkeley Packet Filter (BPF) requirement
4. Running Wireshark as a non-root user 4. Running Wireshark as a non-root user
@ -16,23 +16,19 @@ The easiest way to install these is by using your operating system's
ports or packages system. If you prefer to build from source, the programs ports or packages system. If you prefer to build from source, the programs
can be found at the following sites: can be found at the following sites:
glib 2.16 or later: glib 2.32 or later:
ftp.gnome.org:/pub/gnome/sources/glib/ ftp.gnome.org:/pub/gnome/sources/glib/
http://ftp.gnome.org/pub/gnome/sources/glib/ http://ftp.gnome.org/pub/gnome/sources/glib/
pkgconfig: pkgconfig:
http://pkgconfig.freedesktop.org/releases/ http://pkgconfig.freedesktop.org/releases/
python 2.5 or later: python 2.7 or later, including Python 3:
https://www.python.org/downloads/source/ https://www.python.org/downloads/source/
If you want to use the Wireshark GUI, install one or both of these toolkits: If you want to use the Wireshark GUI, install one or both of these toolkits:
gtk+ 2.12 or later: Qt 5.2 or later:
ftp.gnome.org:/pub/gnome/sources/gtk+/
http://ftp.gnome.org/pub/gnome/sources/gtk+/
Qt 4.7 or later:
http://download.qt-project.org/official_releases/qt/ http://download.qt-project.org/official_releases/qt/

View File

@ -409,14 +409,11 @@ 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 requires mininum versions of each of the libraries it uses, in Wireshark requires mininum versions of each of the libraries it uses, in
particular GLib 2.22.0, Qt 4.8.0, and GTK+ 2.12.0 or newer. If you particular GLib 2.32.0 and Qt 5.2.0 or newer. If you require a mechanism
require a mechanism that is available only in a newer version of a that is available only in a newer version of a library then use its
library then use its version detection macros, e.g. "#if version detection macros, e.g. "#if GLIB_CHECK_VERSION(...)" and "#if
GLIB_CHECK_VERSION(...)", "#if QT_VERSION_CHECK(...)", and "#if QT_VERSION_CHECK(...)" to conditionally compile code using that
GTK_CHECK_VERSION(...)" to conditionally compile code using that mechanism.
mechanism. If you're using GTK_CHECK_VERSION be aware that GTK+ will be
removed in a future release. Adding new features to the GTK+ UI is
discouraged.
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

@ -86,8 +86,7 @@ must be set appropriately.
=== Qt === Qt
The Qt library is used to build the UI for Wireshark and is used to provide a The Qt library is used to build the UI for Wireshark and is used to provide a
platform independent UI. Wireshark can be built with Qt 4.7.0 or later, but we platform independent UI. Wireshark can be built with Qt 5.2 or later.
recommend using Qt5.
For more information on the Qt libraries, see <<ChUIQt>>. For more information on the Qt libraries, see <<ChUIQt>>.

View File

@ -98,14 +98,6 @@ File "..\..\wireshark-qt-release\Qt5Gui.dll"
File "..\..\wireshark-qt-release\Qt5Widgets.dll" File "..\..\wireshark-qt-release\Qt5Widgets.dll"
File "..\..\wireshark-qt-release\Qt5PrintSupport.dll" File "..\..\wireshark-qt-release\Qt5PrintSupport.dll"
File /r "..\..\wireshark-qt-release\platforms" File /r "..\..\wireshark-qt-release\platforms"
"@
} else {
# Assume Qt 4
$nsisCommands += @"
File "..\..\wireshark-qt-release\QtCore4.dll"
File "..\..\wireshark-qt-release\QtGui4.dll"
"@ "@
} }
@ -126,4 +118,4 @@ Set-Content $FilePath @"
# #
"@ "@
Add-Content $FilePath $nsisCommands Add-Content $FilePath $nsisCommands

View File

@ -179,28 +179,6 @@ try {
</Fragment> </Fragment>
"@ "@
} else {
# Assume Qt 4
$wixComponents += @"
<Fragment>
<DirectoryRef Id=`"INSTALLFOLDER`">
<Component Id=`"cmpQt4Core_dll`" Guid=`"*`">
<File Id=`"filQt4Core_dll`" KeyPath=`"yes`" Source=`"`$(var.WiresharkQt.Dir)\QtCore4.dll`" />
</Component>
<Component Id=`"cmpQt4Gui_dll`" Guid=`"*`">
<File Id=`"filQt4Gui_dll`" KeyPath=`"yes`" Source=`"`$(var.WiresharkQt.Dir)\QtGui4.dll`" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id=`"CG.QtDependencies`">
<ComponentRef Id=`"cmpQt4Core_dll`" />
<ComponentRef Id=`"cmpQt4Gui_dll`" />
</ComponentGroup>
</Fragment>
"@
} }
$wixComponents += @" $wixComponents += @"

View File

@ -589,24 +589,13 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
# Define compatibility macros for Qt 4.8
if(QT_VERSION EQUAL 4)
add_definitions(-DQ_NULLPTR=NULL)
endif()
SET(CMAKE_AUTOMOC TRUE) SET(CMAKE_AUTOMOC TRUE)
if(CMAKE_VERSION VERSION_LESS "3.0.2") if(CMAKE_VERSION VERSION_LESS "3.0.2")
# AUTOUIC and AUTORCC are not supported in CMAKE 2.8.x # AUTOUIC and AUTORCC are not supported in CMAKE 2.8.x
if (QT_VERSION EQUAL 5) QT5_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS})
QT5_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS}) QT5_ADD_RESOURCES(WIRESHARK_QT_QRC_SRC ${WIRESHARK_QT_QRC})
QT5_ADD_RESOURCES(WIRESHARK_QT_QRC_SRC ${WIRESHARK_QT_QRC}) QT5_WRAP_UI(WIRESHARK_QT_UI_SRC ${WIRESHARK_QT_UI})
QT5_WRAP_UI(WIRESHARK_QT_UI_SRC ${WIRESHARK_QT_UI})
else()
QT4_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS})
QT4_ADD_RESOURCES(WIRESHARK_QT_QRC_SRC ${WIRESHARK_QT_QRC})
QT4_WRAP_UI(WIRESHARK_QT_UI_SRC ${WIRESHARK_QT_UI})
endif()
else() else()
SET(CMAKE_AUTOUIC TRUE) SET(CMAKE_AUTOUIC TRUE)
SET(CMAKE_AUTORCC TRUE) SET(CMAKE_AUTORCC TRUE)
@ -616,11 +605,7 @@ else()
# Add .qrc files to library dependencies for AUTORCC. # Add .qrc files to library dependencies for AUTORCC.
set(WIRESHARK_QT_QRC_SRC ${WIRESHARK_QT_QRC}) set(WIRESHARK_QT_QRC_SRC ${WIRESHARK_QT_QRC})
if (QT_VERSION EQUAL 5) QT5_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS})
QT5_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS})
else()
QT4_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS})
endif()
endif() endif()
add_custom_target( add_custom_target(

View File

@ -27,11 +27,6 @@ if HAVE_SPEEXDSP
AM_CPPFLAGS += $(SPEEXDSP_CFLAGS) AM_CPPFLAGS += $(SPEEXDSP_CFLAGS)
endif endif
# Define compatibility macros for Qt 4.8
if HAVE_QT_VERSION_4
AM_CPPFLAGS += -DQ_NULLPTR=NULL
endif
noinst_LIBRARIES = libqtui.a noinst_LIBRARIES = libqtui.a
include Makefile_custom.common include Makefile_custom.common

View File

@ -1836,9 +1836,6 @@ void MainWindow::on_actionNewDisplayFilterExpression_triggered()
main_ui_->filterExpressionFrame->addExpression(df_combo_box_->lineEdit()->text()); main_ui_->filterExpressionFrame->addExpression(df_combo_box_->lineEdit()->text());
} }
// On Qt4 + macOS with unifiedTitleAndToolBarOnMac set it's possible to make
// the main window obnoxiously wide.
void MainWindow::displayFilterButtonClicked() void MainWindow::displayFilterButtonClicked()
{ {
QAction *dfb_action = qobject_cast<QAction*>(sender()); QAction *dfb_action = qobject_cast<QAction*>(sender());

View File

@ -150,7 +150,7 @@ TapParameterDialog *RpcServiceResponseTimeDialog::createDceRpcSrtDialog(QWidget
// dcerpc,srt,<uuid>,<major version>.<minor version>[,<filter>] // dcerpc,srt,<uuid>,<major version>.<minor version>[,<filter>]
QStringList args_l = QString(opt_arg).split(','); QStringList args_l = QString(opt_arg).split(',');
if (args_l.length() > 1) { if (args_l.length() > 1) {
// Alas, QUuid requires Qt 4.8. // XXX Switch to QUuid.
unsigned d1, d2, d3, d4_0, d4_1, d4_2, d4_3, d4_4, d4_5, d4_6, d4_7; unsigned d1, d2, d3, d4_0, d4_1, d4_2, d4_3, d4_4, d4_5, d4_6, d4_7;
if(sscanf(args_l[0].toUtf8().constData(), if(sscanf(args_l[0].toUtf8().constData(),
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",