Qt: Bump our minimum Qt version from 5.2. to 5.3.

Change-Id: Id6b39125a56b95b94d6a0bb6436bf7b2d131f924
Reviewed-on: https://code.wireshark.org/review/35385
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 2019-12-09 16:38:33 -08:00 committed by Anders Broman
parent 50713161c3
commit 14e4759b56
5 changed files with 2 additions and 16 deletions

View File

@ -1233,8 +1233,8 @@ if(GNUTLS_FOUND AND NOT GNUTLS_VERSION VERSION_LESS "3.4.0")
endif()
if (QT_FOUND)
if (Qt5Widgets_VERSION VERSION_LESS 5.2)
message(FATAL_ERROR "Qt 5.2 or later is required.")
if (Qt5Widgets_VERSION VERSION_LESS 5.3)
message(FATAL_ERROR "Qt 5.3 or later is required.")
endif()
if (Qt5Widgets_VERSION VERSION_GREATER 5.6
AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang"))

View File

@ -252,9 +252,6 @@ void FollowStreamDialog::findText(bool go_back)
{
if (ui->leFind->text().isEmpty()) return;
/* Version check due to find on teStreamContent. Expects regex since 5.3
* https://doc.qt.io/qt-5/qplaintextedit.html#find-1 */
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
bool found;
if (use_regex_find_) {
QRegExp regex(ui->leFind->text());
@ -262,9 +259,6 @@ void FollowStreamDialog::findText(bool go_back)
} else {
found = ui->teStreamContent->find(ui->leFind->text());
}
#else
bool found = ui->teStreamContent->find(ui->leFind->text());
#endif
if (found) {
ui->teStreamContent->setFocus();

View File

@ -223,7 +223,6 @@ void ShowPacketBytesDialog::findText(bool go_back)
{
if (ui->leFind->text().isEmpty()) return;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
bool found;
if (use_regex_find_) {
QRegExp regex(ui->leFind->text());
@ -231,9 +230,6 @@ void ShowPacketBytesDialog::findText(bool go_back)
} else {
found = ui->tePacketBytes->find(ui->leFind->text());
}
#else
bool found = ui->tePacketBytes->find(ui->leFind->text());
#endif
if (found) {
ui->tePacketBytes->setFocus();

View File

@ -22,7 +22,6 @@ void FindLineEdit::contextMenuEvent(QContextMenuEvent *event)
/* This version check is implemented, because using this function leads to using
* a regular expression for search in follow_stream_dialog.cpp as well as
* show_packet_bytes_dialog.cpp. Both instances are not compatible with < 5.3 */
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
QAction *action;
menu->addSeparator();
@ -36,7 +35,6 @@ void FindLineEdit::contextMenuEvent(QContextMenuEvent *event)
action->setCheckable(true);
action->setChecked(use_regex_);
connect(action, &QAction::triggered, this, &FindLineEdit::setUseRegex);
#endif
menu->exec(event->globalPos());
delete menu;

View File

@ -49,9 +49,7 @@ class OsbProxyStyle : public QProxyStyle
// wonky, however.
virtual int styleHint(StyleHint hint, const QStyleOption *option = NULL, const QWidget *widget = NULL, QStyleHintReturn *returnData = NULL) const {
#if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
if (hint == SH_ScrollBar_Transient) return false;
#endif
return QProxyStyle::styleHint(hint, option, widget, returnData);
}