diff options
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/CMakeLists.txt | 36 | ||||
-rw-r--r-- | ui/qt/Makefile.am | 30 | ||||
-rw-r--r-- | ui/qt/about_dialog.cpp | 9 | ||||
-rw-r--r-- | ui/qt/capture_filter_syntax_worker.cpp | 10 | ||||
-rw-r--r-- | ui/qt/capture_interfaces_dialog.cpp | 4 | ||||
-rw-r--r-- | ui/qt/extcap_options_dialog.cpp | 4 | ||||
-rw-r--r-- | ui/qt/extcap_options_dialog.h | 4 | ||||
-rw-r--r-- | ui/qt/interface_frame.cpp | 12 | ||||
-rw-r--r-- | ui/qt/interface_frame.h | 2 | ||||
-rw-r--r-- | ui/qt/interface_toolbar.cpp | 2 | ||||
-rw-r--r-- | ui/qt/main_welcome.cpp | 4 | ||||
-rw-r--r-- | ui/qt/main_welcome.h | 4 | ||||
-rw-r--r-- | ui/qt/main_window.cpp | 6 | ||||
-rw-r--r-- | ui/qt/main_window.h | 2 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 4 | ||||
-rw-r--r-- | ui/qt/models/interface_tree_cache_model.cpp | 9 | ||||
-rw-r--r-- | ui/qt/models/interface_tree_model.cpp | 8 | ||||
-rw-r--r-- | ui/qt/models/interface_tree_model.h | 2 | ||||
-rw-r--r-- | ui/qt/splash_overlay.cpp | 7 | ||||
-rw-r--r-- | ui/qt/wireshark_application.cpp | 4 |
20 files changed, 28 insertions, 135 deletions
diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index 7b4a8439ed..ad09591e56 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -141,6 +141,10 @@ set(WIRESHARK_QT_HEADERS export_object_action.h export_object_dialog.h export_pdu_dialog.h + extcap_argument.h + extcap_argument_file.h + extcap_argument_multiselect.h + extcap_options_dialog.h file_set_dialog.h filter_action.h filter_dialog.h @@ -236,16 +240,6 @@ if(HAVE_PCAP_REMOTE) ) endif() -if(ENABLE_EXTCAP) - set(WIRESHARK_QT_HEADERS - ${WIRESHARK_QT_HEADERS} - extcap_argument.h - extcap_argument_file.h - extcap_argument_multiselect.h - extcap_options_dialog.h - ) -endif() - file(GLOB EXTRA_QT_HEADERS packet_list_record.h models/sparkline_delegate.h @@ -365,6 +359,10 @@ set(WIRESHARK_QT_SRC export_object_action.cpp export_object_dialog.cpp export_pdu_dialog.cpp + extcap_argument.cpp + extcap_argument_file.cpp + extcap_argument_multiselect.cpp + extcap_options_dialog.cpp file_set_dialog.cpp filter_action.cpp filter_dialog.cpp @@ -454,16 +452,6 @@ if(HAVE_PCAP_REMOTE) ) endif() -if(ENABLE_EXTCAP) - set(WIRESHARK_QT_SRC - ${WIRESHARK_QT_SRC} - extcap_argument.cpp - extcap_argument_file.cpp - extcap_argument_multiselect.cpp - extcap_options_dialog.cpp - ) -endif() - set(WIRESHARK_QT_TAP_SRC ${CMAKE_CURRENT_SOURCE_DIR}/expert_info_dialog.cpp ${CMAKE_CURRENT_SOURCE_DIR}/funnel_statistics.cpp @@ -508,6 +496,7 @@ set(WIRESHARK_QT_UI expert_info_dialog.ui export_object_dialog.ui export_pdu_dialog.ui + extcap_options_dialog.ui file_set_dialog.ui filter_dialog.ui filter_expression_frame.ui @@ -576,13 +565,6 @@ if(HAVE_PCAP_REMOTE) ) endif() -if(ENABLE_EXTCAP) - set(WIRESHARK_QT_UI - ${WIRESHARK_QT_UI} - extcap_options_dialog.ui - ) -endif() - set(WIRESHARK_QT_TS wireshark_de.ts wireshark_en.ts # lupdate -pluralonly diff --git a/ui/qt/Makefile.am b/ui/qt/Makefile.am index da04af33b8..419700ded5 100644 --- a/ui/qt/Makefile.am +++ b/ui/qt/Makefile.am @@ -57,6 +57,7 @@ NODIST_GENERATED_HEADER_FILES = \ ui_expert_info_dialog.h \ ui_export_object_dialog.h \ ui_export_pdu_dialog.h \ + ui_extcap_options_dialog.h \ ui_file_set_dialog.h \ ui_filter_dialog.h \ ui_filter_expression_frame.h \ @@ -120,6 +121,7 @@ NODIST_GENERATED_HEADER_FILES = \ ui_voip_calls_dialog.h \ ui_wireless_frame.h + # Generated C source files that we want in the distribution. GENERATED_C_FILES = @@ -271,6 +273,10 @@ MOC_HDRS = \ export_object_action.h \ export_object_dialog.h \ export_pdu_dialog.h \ + extcap_argument.h \ + extcap_argument_file.h \ + extcap_argument_multiselect.h \ + extcap_options_dialog.h \ file_set_dialog.h \ filter_action.h \ filter_dialog.h \ @@ -387,6 +393,7 @@ UI_FILES = \ expert_info_dialog.ui \ export_object_dialog.ui \ export_pdu_dialog.ui \ + extcap_options_dialog.ui \ file_set_dialog.ui \ filter_dialog.ui \ filter_expression_frame.ui \ @@ -608,6 +615,10 @@ WIRESHARK_QT_SRC = \ export_object_action.cpp \ export_object_dialog.cpp \ export_pdu_dialog.cpp \ + extcap_argument.cpp \ + extcap_argument_file.cpp \ + extcap_argument_multiselect.cpp \ + extcap_options_dialog.cpp \ file_set_dialog.cpp \ filter_action.cpp \ filter_dialog.cpp \ @@ -718,25 +729,6 @@ noinst_HEADERS = \ utils/tango_colors.h \ utils/variant_pointer.h -if HAVE_EXTCAP -NODIST_GENERATED_HEADER_FILES += \ - ui_extcap_options_dialog.h - -MOC_HDRS += \ - extcap_argument.h \ - extcap_argument_file.h \ - extcap_argument_multiselect.h \ - extcap_options_dialog.h - -UI_FILES += \ - extcap_options_dialog.ui - -WIRESHARK_QT_SRC += \ - extcap_argument.cpp \ - extcap_argument_file.cpp \ - extcap_argument_multiselect.cpp \ - extcap_options_dialog.cpp -endif wireshark-tap-register.c: $(WIRESHARK_QT_TAP_SRC) ../make-taps $(AM_V_GEN)../make-taps $@ $(filter %.cpp,$^) diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp index cd2c6ec536..3962636cab 100644 --- a/ui/qt/about_dialog.cpp +++ b/ui/qt/about_dialog.cpp @@ -41,9 +41,7 @@ #include "wsutil/copyright_info.h" #include "version_info.h" -#ifdef HAVE_EXTCAP #include "extcap.h" -#endif #include <ui/qt/utils/qt_ui_utils.h> #include <ui/qt/utils/variant_pointer.h> @@ -131,7 +129,6 @@ PluginListModel::PluginListModel(QObject * parent) : AStringListListModel(parent wslua_plugins_get_descriptions(plugins_add_description, &plugin_data); #endif -#ifdef HAVE_EXTCAP GHashTable * tools = extcap_loaded_interfaces(); if (tools && g_hash_table_size(tools) > 0) { GList * walker = g_list_first(g_hash_table_get_keys(tools)); @@ -144,7 +141,6 @@ PluginListModel::PluginListModel(QObject * parent) : AStringListListModel(parent walker = g_list_next(walker); } } -#endif typeNames_ << QString(""); foreach(QStringList row, plugin_data) @@ -241,15 +237,12 @@ FolderListModel::FolderListModel(QObject * parent): appendRow( QStringList() << "Global Lua Plugins" << get_plugins_dir() << "lua scripts"); #endif -#ifdef HAVE_EXTCAP /* Extcap */ QStringList extPaths = QString(get_extcap_dir()).split(G_SEARCHPATH_SEPARATOR_S); foreach(QString path, extPaths) appendRow( QStringList() << "Extcap path" << path.trimmed() << "Extcap Plugins search path"); -#endif - #ifdef HAVE_GEOIP /* GeoIP */ QStringList geoIpPaths = QString(geoip_db_get_paths()).split(G_SEARCHPATH_SEPARATOR_S); @@ -348,7 +341,7 @@ AboutDialog::AboutDialog(QWidget *parent) : /* Plugins */ -#if defined(HAVE_PLUGINS) || defined(HAVE_LUA) || defined(HAVE_EXTCAP) +#if defined(HAVE_PLUGINS) || defined(HAVE_LUA) PluginListModel * pluginModel = new PluginListModel(this); AStringListListSortFilterProxyModel * pluginFilterModel = new AStringListListSortFilterProxyModel(this); diff --git a/ui/qt/capture_filter_syntax_worker.cpp b/ui/qt/capture_filter_syntax_worker.cpp index b61f6dbbb4..be314a8edb 100644 --- a/ui/qt/capture_filter_syntax_worker.cpp +++ b/ui/qt/capture_filter_syntax_worker.cpp @@ -29,9 +29,7 @@ #include "capture_opts.h" #include "ui/capture_globals.h" #endif -#ifdef HAVE_EXTCAP #include "extcap.h" -#endif #include "capture_filter_syntax_worker.h" #include <ui/qt/widgets/syntax_line_edit.h> @@ -63,9 +61,7 @@ void CaptureFilterSyntaxWorker::start() { forever { QString filter; QSet<gint> active_dlts; -#ifdef HAVE_EXTCAP QSet<guint> active_extcap; -#endif struct bpf_program fcode; pcap_t *pd; int pc_err; @@ -93,9 +89,7 @@ void CaptureFilterSyntaxWorker::start() { device = &g_array_index(global_capture_opts.all_ifaces, interface_t, if_idx); if (device->selected) { -#ifdef HAVE_EXTCAP if (device->if_info.extcap == NULL || strlen(device->if_info.extcap) == 0) { -#endif if (device->active_dlt >= DLT_USER0 && device->active_dlt <= DLT_USER15) { // Capture filter for DLT_USER is unknown state = SyntaxLineEdit::Deprecated; @@ -103,11 +97,9 @@ void CaptureFilterSyntaxWorker::start() { } else { active_dlts.insert(device->active_dlt); } -#ifdef HAVE_EXTCAP } else { active_extcap.insert(if_idx); } -#endif } } @@ -142,7 +134,6 @@ void CaptureFilterSyntaxWorker::start() { if (state == SyntaxLineEdit::Invalid) break; } -#ifdef HAVE_EXTCAP // If it's already invalid, don't bother to check extcap if (state != SyntaxLineEdit::Invalid) { foreach (guint extcapif, active_extcap.toList()) { @@ -165,7 +156,6 @@ void CaptureFilterSyntaxWorker::start() { g_free (error); } } -#endif emit syntaxResult(filter, state, err_str); DEBUG_SYNTAX_CHECK("known", "idle"); diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index db82e82874..6e4939fb08 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -132,7 +132,6 @@ public: } setText(col_link_, linkname); -#ifdef HAVE_EXTCAP if (device->if_info.type == IF_EXTCAP) { /* extcap interfaces does not have this settings */ setApplicable(col_pmode_, false); @@ -142,7 +141,6 @@ public: setApplicable(col_buffer_, false); #endif } else { -#endif setApplicable(col_pmode_, true); setCheckState(col_pmode_, device->pmode ? Qt::Checked : Qt::Unchecked); @@ -151,9 +149,7 @@ public: #ifdef SHOW_BUFFER_COLUMN setText(col_buffer_, QString::number(device->buffer)); #endif -#ifdef HAVE_EXTCAP } -#endif setText(col_filter_, device->cfilter); #ifdef SHOW_MONITOR_COLUMN diff --git a/ui/qt/extcap_options_dialog.cpp b/ui/qt/extcap_options_dialog.cpp index 61d717a138..3e16efcaae 100644 --- a/ui/qt/extcap_options_dialog.cpp +++ b/ui/qt/extcap_options_dialog.cpp @@ -28,7 +28,6 @@ #include <wireshark_application.h> -#ifdef HAVE_EXTCAP #include <QMessageBox> #include <QMap> #include <QHBoxLayout> @@ -506,9 +505,6 @@ void ExtcapOptionsDialog::storeValues() } } - -#endif /* HAVE_LIBPCAP */ - /* * Editor modelines * diff --git a/ui/qt/extcap_options_dialog.h b/ui/qt/extcap_options_dialog.h index 1b66ad5182..8c3fbc879b 100644 --- a/ui/qt/extcap_options_dialog.h +++ b/ui/qt/extcap_options_dialog.h @@ -25,8 +25,6 @@ #include <config.h> -#ifdef HAVE_EXTCAP - #include <QWidget> #include <QDialog> #include <QPushButton> @@ -75,8 +73,6 @@ private: void resetValues(); }; -#endif /* HAVE_EXTCAP */ - #endif // EXTCAP_OPTIONS_DIALOG_H /* diff --git a/ui/qt/interface_frame.cpp b/ui/qt/interface_frame.cpp index 8eccf78b9a..fa8492ea0d 100644 --- a/ui/qt/interface_frame.cpp +++ b/ui/qt/interface_frame.cpp @@ -30,9 +30,7 @@ #include <ui/qt/models/sparkline_delegate.h> #include "wireshark_application.h" -#ifdef HAVE_EXTCAP #include "extcap.h" -#endif #include <QFrame> #include <QPushButton> @@ -77,18 +75,14 @@ InterfaceFrame::InterfaceFrame(QWidget * parent) ifTypeDescription.insert(IF_WIRELESS, tr("Wireless")); ifTypeDescription.insert(IF_DIALUP, tr("Dial-Up")); ifTypeDescription.insert(IF_USB, tr("USB")); -#ifdef HAVE_EXTCAP ifTypeDescription.insert(IF_EXTCAP, tr("External Capture")); -#endif ifTypeDescription.insert(IF_VIRTUAL, tr ("Virtual")); proxyModel = new InterfaceSortFilterModel(this); sourceModel = new InterfaceTreeModel(this); QList<InterfaceTreeColumns> columns; -#ifdef HAVE_EXTCAP columns.append(IFTREE_COL_EXTCAP); -#endif columns.append(IFTREE_COL_NAME); columns.append(IFTREE_COL_STATS); proxyModel->setColumns(columns); @@ -266,9 +260,7 @@ void InterfaceFrame::resetInterfaceTreeDisplay() { ui->interfaceTree->setHidden(false); ui->lblNoInterfaces->setHidden(true); -#ifdef HAVE_EXTCAP ui->interfaceTree->resizeColumnToContents(proxyModel->mapSourceToColumn(IFTREE_COL_EXTCAP)); -#endif ui->interfaceTree->resizeColumnToContents(proxyModel->mapSourceToColumn(IFTREE_COL_NAME)); ui->interfaceTree->resizeColumnToContents(proxyModel->mapSourceToColumn(IFTREE_COL_STATS)); } @@ -311,7 +303,7 @@ void InterfaceFrame::on_interfaceTree_doubleClicked(const QModelIndex &index) if ( ! realIndex.isValid() ) return; -#if defined(HAVE_EXTCAP) && defined(HAVE_LIBPCAP) +#ifdef HAVE_LIBPCAP QString device_name = sourceModel->getColumnContent(realIndex.row(), IFTREE_COL_INTERFACE_NAME).toString(); QString extcap_string = sourceModel->getColumnContent(realIndex.row(), IFTREE_COL_EXTCAP_PATH).toString(); @@ -331,7 +323,7 @@ void InterfaceFrame::on_interfaceTree_doubleClicked(const QModelIndex &index) emit startCapture(); } -#if defined(HAVE_EXTCAP) && defined(HAVE_LIBPCAP) +#ifdef HAVE_LIBPCAP void InterfaceFrame::on_interfaceTree_clicked(const QModelIndex &index) { if ( index.column() == 0 ) diff --git a/ui/qt/interface_frame.h b/ui/qt/interface_frame.h index a52a6af304..cae659b1ab 100644 --- a/ui/qt/interface_frame.h +++ b/ui/qt/interface_frame.h @@ -93,7 +93,7 @@ private slots: void interfaceTreeSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected); void on_interfaceTree_doubleClicked(const QModelIndex &index); -#if defined(HAVE_EXTCAP) && defined(HAVE_LIBPCAP) +#ifdef HAVE_LIBPCAP void on_interfaceTree_clicked(const QModelIndex &index); #endif diff --git a/ui/qt/interface_toolbar.cpp b/ui/qt/interface_toolbar.cpp index 7012f72771..1678daf7c1 100644 --- a/ui/qt/interface_toolbar.cpp +++ b/ui/qt/interface_toolbar.cpp @@ -740,7 +740,6 @@ void InterfaceToolbar::startCapture(GArray *ifaces) if (!ifaces || ifaces->len == 0) return; -#ifdef HAVE_EXTCAP const QString &selected_ifname = ui->interfacesComboBox->currentText(); QString first_capturing_ifname; bool selected_found = false; @@ -792,7 +791,6 @@ void InterfaceToolbar::startCapture(GArray *ifaces) { updateWidgets(); } -#endif // HAVE_EXTCAP } void InterfaceToolbar::stopCapture() diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp index 523a99edce..adad58a770 100644 --- a/ui/qt/main_welcome.cpp +++ b/ui/qt/main_welcome.cpp @@ -51,9 +51,7 @@ #define VERSION_FLAVOR "" #endif -#ifdef HAVE_EXTCAP #include <extcap.h> -#endif MainWelcome::MainWelcome(QWidget *parent) : QFrame(parent), @@ -331,12 +329,10 @@ void MainWelcome::interfaceSelected() emit interfacesChanged(); } -#ifdef HAVE_EXTCAP void MainWelcome::on_interfaceFrame_showExtcapOptions(QString device_name) { emit showExtcapOptions(device_name); } -#endif void MainWelcome::on_interfaceFrame_startCapture() { diff --git a/ui/qt/main_welcome.h b/ui/qt/main_welcome.h index b462f5fd3e..dff4420b37 100644 --- a/ui/qt/main_welcome.h +++ b/ui/qt/main_welcome.h @@ -76,9 +76,7 @@ signals: void pushFilterSyntaxStatus(const QString&); void popFilterSyntaxStatus(); void captureFilterSyntaxChanged(bool valid); -#ifdef HAVE_EXTCAP void showExtcapOptions(QString &device_name); -#endif void interfacesChanged(); public slots: @@ -95,9 +93,7 @@ private slots: void copyRecentPath(); void removeRecentPath(); -#ifdef HAVE_EXTCAP void on_interfaceFrame_showExtcapOptions(QString device_name); -#endif void on_interfaceFrame_startCapture(); }; diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 6d43fba45c..5d06d149dd 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -672,10 +672,8 @@ MainWindow::MainWindow(QWidget *parent) : connect(main_ui_->welcomePage, SIGNAL(captureFilterSyntaxChanged(bool)), this, SLOT(captureFilterSyntaxChanged(bool))); -#ifdef HAVE_EXTCAP connect(this->main_welcome_, SIGNAL(showExtcapOptions(QString&)), this, SLOT(showExtcapOptionsDialog(QString&))); -#endif #endif // HAVE_LIBPCAP @@ -2426,7 +2424,6 @@ void MainWindow::setForCaptureInProgress(bool capture_in_progress, GArray *iface // set_capture_if_dialog_for_capture_in_progress(capture_in_progress); #endif -#ifdef HAVE_EXTCAP QList<InterfaceToolbar *> toolbars = findChildren<InterfaceToolbar *>(); foreach (InterfaceToolbar *toolbar, toolbars) { if (capture_in_progress && ifaces) { @@ -2435,9 +2432,6 @@ void MainWindow::setForCaptureInProgress(bool capture_in_progress, GArray *iface toolbar->stopCapture(); } } -#else - Q_UNUSED(ifaces) -#endif } static QList<register_stat_group_t> menu_groups = QList<register_stat_group_t>() diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h index 7bb2255545..a8ee4d4883 100644 --- a/ui/qt/main_window.h +++ b/ui/qt/main_window.h @@ -653,10 +653,8 @@ private slots: void on_actionContextWikiProtocolPage_triggered(); void on_actionContextFilterFieldReference_triggered(); -#ifdef HAVE_EXTCAP void extcap_options_finished(int result); void showExtcapOptionsDialog(QString & device_name); -#endif }; #endif // MAINWINDOW_H diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index c3e4775474..fe001cf35b 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -106,9 +106,7 @@ DIAG_ON(frame-larger-than=) #include "export_object_action.h" #include "export_object_dialog.h" #include "export_pdu_dialog.h" -#ifdef HAVE_EXTCAP #include "extcap_options_dialog.h" -#endif #include "file_set_dialog.h" #include "filter_action.h" #include "filter_dialog.h" @@ -3910,7 +3908,6 @@ void MainWindow::gotoFrame(int packet_num) } } -#ifdef HAVE_EXTCAP void MainWindow::extcap_options_finished(int result) { if (result == QDialog::Accepted) { @@ -3929,7 +3926,6 @@ void MainWindow::showExtcapOptionsDialog(QString &device_name) extcap_options_dialog->show(); } } -#endif void MainWindow::on_actionContextWikiProtocolPage_triggered() { diff --git a/ui/qt/models/interface_tree_cache_model.cpp b/ui/qt/models/interface_tree_cache_model.cpp index b093478916..e193f58a9e 100644 --- a/ui/qt/models/interface_tree_cache_model.cpp +++ b/ui/qt/models/interface_tree_cache_model.cpp @@ -186,14 +186,12 @@ void InterfaceTreeCacheModel::save() { device->hidden = saveValue.toBool(); } -#ifdef HAVE_EXTCAP else if ( device->if_info.type == IF_EXTCAP ) { /* extcap interfaces do not have the following columns. * ATTENTION: all generic columns must be added, BEFORE this * if-clause, or they will be ignored for extcap interfaces */ } -#endif else if ( col == IFTREE_COL_PROMISCUOUSMODE ) { device->pmode = saveValue.toBool(); @@ -237,10 +235,10 @@ void InterfaceTreeCacheModel::save() prefStorage[&prefs.capture_devices_descr] << QString("%1(%2)").arg(device->name).arg(content.toString()); bool allowExtendedColumns = true; -#ifdef HAVE_EXTCAP + if ( device->if_info.type == IF_EXTCAP ) allowExtendedColumns = false; -#endif + if ( allowExtendedColumns ) { content = getColumnContent(idx, IFTREE_COL_PROMISCUOUSMODE, Qt::CheckStateRole); @@ -352,7 +350,6 @@ bool InterfaceTreeCacheModel::isAllowedToBeEdited(const QModelIndex &index) cons if ( device == 0 ) return false; -#ifdef HAVE_EXTCAP InterfaceTreeColumns col = (InterfaceTreeColumns) index.column(); if ( device->if_info.type == IF_EXTCAP ) { @@ -365,8 +362,6 @@ bool InterfaceTreeCacheModel::isAllowedToBeEdited(const QModelIndex &index) cons #endif } #endif - -#endif return true; } diff --git a/ui/qt/models/interface_tree_model.cpp b/ui/qt/models/interface_tree_model.cpp index c57859ad72..bd96411e6d 100644 --- a/ui/qt/models/interface_tree_model.cpp +++ b/ui/qt/models/interface_tree_model.cpp @@ -41,9 +41,7 @@ /* Needed for the meta type declaration of QList<int>* */ #include <ui/qt/models/sparkline_delegate.h> -#ifdef HAVE_EXTCAP #include "extcap.h" -#endif const QString InterfaceTreeModel::DefaultNumericValue = QObject::tr("default"); @@ -144,12 +142,10 @@ QVariant InterfaceTreeModel::data(const QModelIndex &index, int role) const if ( device->cfilter && strlen(device->cfilter) > 0 ) return html_escape(QString(device->cfilter)); } -#ifdef HAVE_EXTCAP else if ( col == IFTREE_COL_EXTCAP_PATH ) { return QString(device->if_info.extcap); } -#endif else if ( col == IFTREE_COL_SNAPLEN ) { return device->has_snaplen ? QString::number(device->snaplen) : DefaultNumericValue; @@ -222,7 +218,6 @@ QVariant InterfaceTreeModel::data(const QModelIndex &index, int role) const return QVariant::fromValue((bool)device->hidden); } } -#ifdef HAVE_EXTCAP /* Displays the configuration icon for extcap interfaces */ else if ( role == Qt::DecorationRole ) { @@ -239,7 +234,6 @@ QVariant InterfaceTreeModel::data(const QModelIndex &index, int role) const return Qt::AlignRight; } } -#endif /* Displays the tooltip for each row */ else if ( role == Qt::ToolTipRole ) { @@ -362,12 +356,10 @@ QVariant InterfaceTreeModel::toolTipForInterface(int idx) const .arg(html_escape(device->addresses)) .replace('\n', ", "); } -#ifdef HAVE_EXTCAP else if ( device->if_info.type == IF_EXTCAP ) { tt_str = QString(tr("Extcap interface: %1")).arg(get_basename(device->if_info.extcap)); } -#endif else { tt_str = tr("No addresses"); diff --git a/ui/qt/models/interface_tree_model.h b/ui/qt/models/interface_tree_model.h index a441b39e33..b850078da6 100644 --- a/ui/qt/models/interface_tree_model.h +++ b/ui/qt/models/interface_tree_model.h @@ -41,10 +41,8 @@ typedef QList<int> PointList; enum InterfaceTreeColumns { -#ifdef HAVE_EXTCAP IFTREE_COL_EXTCAP, IFTREE_COL_EXTCAP_PATH, -#endif IFTREE_COL_NAME, IFTREE_COL_INTERFACE_NAME, IFTREE_COL_INTERFACE_COMMENT, diff --git a/ui/qt/splash_overlay.cpp b/ui/qt/splash_overlay.cpp index b39a1e4a28..826e62e6a9 100644 --- a/ui/qt/splash_overlay.cpp +++ b/ui/qt/splash_overlay.cpp @@ -33,9 +33,7 @@ #include "epan/wslua/init_wslua.h" #endif -#ifdef HAVE_EXTCAP -#include "../../extcap.h" -#endif +#include "extcap.h" // Uncomment to slow the update progress //#define THROTTLE_STARTUP 1 @@ -61,9 +59,8 @@ SplashOverlay::SplashOverlay(QWidget *parent) : #ifdef HAVE_LUA register_max++; #endif -#ifdef HAVE_EXTCAP register_max++; -#endif + so_ui_->progressBar->setMaximum(register_max); elapsed_timer_.start(); diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index d0fe96e436..3dab45e1ba 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -45,9 +45,7 @@ #include "log.h" #include "recent_file_status.h" -#ifdef HAVE_EXTCAP #include "extcap.h" -#endif #ifdef HAVE_LIBPCAP #include <caputils/iface_monitor.h> #endif @@ -1110,9 +1108,7 @@ void WiresharkApplication::ifChangeEventsAvailable() void WiresharkApplication::refreshLocalInterfaces() { -#ifdef HAVE_EXTCAP extcap_clear_interfaces(); -#endif #ifdef HAVE_LIBPCAP /* |