Qt: fix compilation without pcap.
Change-Id: Ib8d21d63730ea6e18032b89ba0042ee7521645a8 Reviewed-on: https://code.wireshark.org/review/23078 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
35f9349396
commit
bc9bf64f8d
|
@ -21,8 +21,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
|
||||
#include <ui_compiled_filter_output.h>
|
||||
#include "compiled_filter_output.h"
|
||||
|
||||
|
@ -62,7 +60,9 @@ CompiledFilterOutput::CompiledFilterOutput(QWidget *parent, QStringList &intList
|
|||
#else
|
||||
pcap_compile_mtx = g_mutex_new();
|
||||
#endif
|
||||
#ifdef HAVE_LIBPCAP
|
||||
compileFilter();
|
||||
#endif
|
||||
}
|
||||
|
||||
CompiledFilterOutput::~CompiledFilterOutput()
|
||||
|
@ -77,6 +77,7 @@ CompiledFilterOutput::~CompiledFilterOutput()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void CompiledFilterOutput::compileFilter()
|
||||
{
|
||||
struct bpf_program fcode;
|
||||
|
@ -115,6 +116,7 @@ void CompiledFilterOutput::compileFilter()
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void CompiledFilterOutput::on_interfaceList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *)
|
||||
{
|
||||
|
@ -129,8 +131,6 @@ void CompiledFilterOutput::copyFilterText()
|
|||
wsApp->clipboard()->setText(ui->filterList->toPlainText());
|
||||
}
|
||||
|
||||
#endif /* HAVE_LIBPCAP */
|
||||
|
||||
//
|
||||
// Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
//
|
||||
|
|
|
@ -47,7 +47,9 @@ private:
|
|||
QHash<QString, QString> compile_results;
|
||||
QListWidget *interface_list_;
|
||||
QPushButton *copy_bt_;
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void compileFilter();
|
||||
#endif
|
||||
|
||||
public:
|
||||
explicit CompiledFilterOutput(QWidget *parent = 0, QStringList &intList = *new QStringList(), QString &filter = *new QString());
|
||||
|
|
|
@ -45,8 +45,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
|
||||
#include "ui/capture_ui_utils.h"
|
||||
|
||||
#include <ui/qt/models/path_chooser_delegate.h>
|
||||
|
@ -211,7 +209,9 @@ void ManageInterfacesDialog::updateWidgets()
|
|||
|
||||
void ManageInterfacesDialog::on_buttonBox_accepted()
|
||||
{
|
||||
#ifdef HAVE_LIBPCAP
|
||||
sourceModel->save();
|
||||
#endif
|
||||
#ifdef HAVE_PCAP_REMOTE
|
||||
remoteAccepted();
|
||||
#endif
|
||||
|
@ -220,6 +220,7 @@ void ManageInterfacesDialog::on_buttonBox_accepted()
|
|||
emit ifsChanged();
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void ManageInterfacesDialog::on_addPipe_clicked()
|
||||
{
|
||||
interface_t device;
|
||||
|
@ -241,6 +242,7 @@ void ManageInterfacesDialog::on_addPipe_clicked()
|
|||
device.if_info.type = IF_PIPE;
|
||||
|
||||
sourceModel->addDevice(&device);
|
||||
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
|
@ -254,6 +256,7 @@ void ManageInterfacesDialog::on_delPipe_clicked()
|
|||
sourceModel->deleteDevice( pipeProxyModel->mapToSource(selIndex) );
|
||||
updateWidgets();
|
||||
}
|
||||
#endif
|
||||
|
||||
void ManageInterfacesDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
|
@ -575,8 +578,6 @@ void ManageInterfacesDialog::setRemoteSettings(interface_t *iface)
|
|||
}
|
||||
#endif // HAVE_PCAP_REMOTE
|
||||
|
||||
#endif /* HAVE_LIBPCAP */
|
||||
|
||||
/*
|
||||
* Editor modelines
|
||||
*
|
||||
|
|
|
@ -73,8 +73,10 @@ private slots:
|
|||
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void on_addPipe_clicked();
|
||||
void on_delPipe_clicked();
|
||||
#endif
|
||||
|
||||
void onSelectionChanged(const QItemSelection &sel, const QItemSelection &desel);
|
||||
|
||||
|
|
Loading…
Reference in New Issue