aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-07-17 12:43:30 -0700
committerGerald Combs <gerald@wireshark.org>2017-07-17 22:23:33 +0000
commit47c9cf8925123bbfc68fd5819816016e488da165 (patch)
tree800449695dc63eb59708a0468c16319e35586768 /ui
parent2ca2cc16b1c4710726ba82908e735f5b27a95184 (diff)
Qt: Simplify some version checks.
We require Qt5 at configure time on macOS, so we no longer need to exclude Qt4 + macOS in the code. Change-Id: I9e233f963526b0051bd846d171105c1d33d1c4cc Reviewed-on: https://code.wireshark.org/review/22677 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/progress_frame.cpp12
-rw-r--r--ui/qt/progress_frame.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/ui/qt/progress_frame.cpp b/ui/qt/progress_frame.cpp
index f16be1e447..a72c462d36 100644
--- a/ui/qt/progress_frame.cpp
+++ b/ui/qt/progress_frame.cpp
@@ -103,7 +103,7 @@ ProgressFrame::ProgressFrame(QWidget *parent) :
ui(new Ui::ProgressFrame)
, terminate_is_stop_(false)
, stop_flag_(NULL)
-#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
, show_timer_(-1)
, effect_(NULL)
, animation_(NULL)
@@ -143,7 +143,7 @@ ProgressFrame::ProgressFrame(QWidget *parent) :
"}"
);
-#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
effect_ = new QGraphicsOpacityEffect(this);
animation_ = new QPropertyAnimation(effect_, "opacity", this);
#endif
@@ -231,7 +231,7 @@ void ProgressFrame::setValue(int value)
emit valueChanged(value);
}
-#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
void ProgressFrame::timerEvent(QTimerEvent *event)
{
if (event->timerId() == show_timer_) {
@@ -255,7 +255,7 @@ void ProgressFrame::timerEvent(QTimerEvent *event)
void ProgressFrame::hide()
{
-#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
show_timer_ = -1;
#endif
emit setHidden();
@@ -274,7 +274,7 @@ void ProgressFrame::on_stopButton_clicked()
emit stopLoading();
}
-#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
const int show_delay_ = 500; // ms
#endif
@@ -289,7 +289,7 @@ void ProgressFrame::show(bool animate, bool terminate_is_stop, gboolean *stop_fl
ui->stopButton->hide();
}
-#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
if (animate) {
show_timer_ = startTimer(show_delay_);
} else {
diff --git a/ui/qt/progress_frame.h b/ui/qt/progress_frame.h
index b2816c64ca..c40f6c665b 100644
--- a/ui/qt/progress_frame.h
+++ b/ui/qt/progress_frame.h
@@ -75,7 +75,7 @@ signals:
void stopLoading();
protected:
-#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
void timerEvent(QTimerEvent *event);
#endif
@@ -87,7 +87,7 @@ private:
QString status_;
bool terminate_is_stop_;
gboolean *stop_flag_;
-#if !defined(Q_OS_MAC) || QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
int show_timer_;
QGraphicsOpacityEffect *effect_;
QPropertyAnimation *animation_;