diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-10-08 14:56:06 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-10-09 22:34:30 +0000 |
commit | 5bdfb5c36be80511bf814fd6e999985edb75d81d (patch) | |
tree | 8fc7ca4578e89e8f27d87e69564d46e0388071af /ui | |
parent | 626c61c1266ae7b961810dc87c2f75ee409d7c7b (diff) |
Make sure we can compile without QtMultimedia.
Change-Id: I8db453a735956435fc6e2e4276961adb1f7ed11a
Reviewed-on: https://code.wireshark.org/review/10892
Petri-Dish: Gerald Combs <gerald@wireshark.org>
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/rtp_player_dialog.cpp | 26 | ||||
-rw-r--r-- | ui/qt/rtp_player_dialog.h | 17 |
2 files changed, 24 insertions, 19 deletions
diff --git a/ui/qt/rtp_player_dialog.cpp b/ui/qt/rtp_player_dialog.cpp index 1b485df86b..9e0977820e 100644 --- a/ui/qt/rtp_player_dialog.cpp +++ b/ui/qt/rtp_player_dialog.cpp @@ -32,7 +32,6 @@ #include "qcustomplot.h" #include "qt_ui_utils.h" #include "rtp_audio_stream.h" -#include "stock_icon.h" #include "tango_colors.h" #include <QAudio> @@ -43,8 +42,13 @@ Q_DECLARE_METATYPE(RtpAudioStream *) Q_DECLARE_METATYPE(QCPGraph *) +#else // QT_MULTIMEDIA_LIB + +#include <QPushButton> + #endif // QT_MULTIMEDIA_LIB +#include "stock_icon.h" #include "wireshark_application.h" // To do: @@ -159,6 +163,16 @@ RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf) : #endif // QT_MULTIMEDIA_LIB } +QPushButton *RtpPlayerDialog::addPlayerButton(QDialogButtonBox *button_box) +{ + if (!button_box) return NULL; + + QPushButton *player_button; + player_button = button_box->addButton(tr("Play Streams"), QDialogButtonBox::ApplyRole); + player_button->setIcon(StockIcon("media-playback-start")); + return player_button; +} + #ifdef QT_MULTIMEDIA_LIB RtpPlayerDialog::~RtpPlayerDialog() { @@ -294,16 +308,6 @@ void RtpPlayerDialog::addRtpStream(struct _rtp_stream_info *rtp_stream) // RTP_STREAM_DEBUG("adding stream %s to layout, %u packets, start %u", stream_key.toUtf8().constData(), rtp_stream->packet_count, rtp_stream->start_fd->num); } -QPushButton *RtpPlayerDialog::addPlayerButton(QDialogButtonBox *button_box) -{ - if (!button_box) return NULL; - - QPushButton *player_button; - player_button = button_box->addButton(tr("Play Streams"), QDialogButtonBox::ApplyRole); - player_button->setIcon(StockIcon("media-playback-start")); - return player_button; -} - void RtpPlayerDialog::showEvent(QShowEvent *) { QList<int> split_sizes = ui->splitter->sizes(); diff --git a/ui/qt/rtp_player_dialog.h b/ui/qt/rtp_player_dialog.h index a218cede1b..6c9cc64aa0 100644 --- a/ui/qt/rtp_player_dialog.h +++ b/ui/qt/rtp_player_dialog.h @@ -50,6 +50,14 @@ class RtpPlayerDialog : public WiresharkDialog public: explicit RtpPlayerDialog(QWidget &parent, CaptureFile &cf); + /** + * @brief Common routine to add a "Play call" button to a QDialogButtonBox. + * @param button_box Caller's QDialogButtonBox. + * @return The new "Play call" button. + */ + // XXX We might want to move this to qt_ui_utils. + static QPushButton *addPlayerButton(QDialogButtonBox *button_box); + #ifdef QT_MULTIMEDIA_LIB ~RtpPlayerDialog(); @@ -60,14 +68,6 @@ public: */ void addRtpStream(struct _rtp_stream_info *rtp_stream); - /** - * @brief Common routine to add a "Play call" button to a QDialogButtonBox. - * @param button_box Caller's QDialogButtonBox. - * @return The new "Play call" button. - */ - // XXX We might want to move this to qt_ui_utils. - static QPushButton *addPlayerButton(QDialogButtonBox *button_box); - public slots: signals: @@ -124,6 +124,7 @@ private: int getHoveredPacket(); #else // QT_MULTIMEDIA_LIB + private: Ui::RtpPlayerDialog *ui; #endif // QT_MULTIMEDIA_LIB |