Make sure we can compile without QtMultimedia.
authorGerald Combs <gerald@wireshark.org>
Thu, 8 Oct 2015 21:56:06 +0000 (14:56 -0700)
committerGerald Combs <gerald@wireshark.org>
Fri, 9 Oct 2015 22:34:30 +0000 (22:34 +0000)
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>
ui/qt/rtp_player_dialog.cpp
ui/qt/rtp_player_dialog.h

index 1b485df86b429e137d1a80731e12ddb18885964b..9e0977820e77d055596de6d53955aabef6549430 100644 (file)
@@ -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>
 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();
index a218cede1b7ddee0a7ae73267fef2a3ed6afea80..6c9cc64aa0c9a5d6a0aac925f1da7f3187329404 100644 (file)
@@ -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