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>
This commit is contained in:
parent
626c61c126
commit
5bdfb5c36b
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue