Qt: Split MainApplication out from WiresharkApplication.
Move WiresharkApplication.{cpp,h} to MainApplication.{cpp,h}. Add back WiresharkApplication as a thin superclass of MainApplication, similar to LogsharkApplication. Change all of our wsApp references to mainApp. We will likely have to change many or most of them back, but that's a commit for another time.
This commit is contained in:
parent
ca426d68a9
commit
80de95ca71
|
@ -186,6 +186,7 @@ set(WIRESHARK_QT_HEADERS
|
|||
lte_mac_statistics_dialog.h
|
||||
lte_rlc_graph_dialog.h
|
||||
lte_rlc_statistics_dialog.h
|
||||
main_application.h
|
||||
main_status_bar.h
|
||||
main_window_preferences_frame.h
|
||||
main_window.h
|
||||
|
@ -420,6 +421,7 @@ set(WIRESHARK_QT_SRC
|
|||
lte_mac_statistics_dialog.cpp
|
||||
lte_rlc_graph_dialog.cpp
|
||||
lte_rlc_statistics_dialog.cpp
|
||||
main_application.cpp
|
||||
main_status_bar.cpp
|
||||
main_window_layout.cpp
|
||||
main_window_preferences_frame.cpp
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "about_dialog.h"
|
||||
#include <ui_about_dialog.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <wsutil/filesystem.h>
|
||||
|
||||
#include <QDesktopServices>
|
||||
|
@ -165,7 +165,7 @@ ShortcutListModel::ShortcutListModel(QObject * parent):
|
|||
AStringListListModel(parent)
|
||||
{
|
||||
QMap<QString, QPair<QString, QString> > shortcuts; // name -> (shortcut, description)
|
||||
foreach (const QWidget *child, wsApp->mainWindow()->findChildren<QWidget *>()) {
|
||||
foreach (const QWidget *child, mainApp->mainWindow()->findChildren<QWidget *>()) {
|
||||
// Recent items look funny here.
|
||||
if (child->objectName().compare("menuOpenRecentCaptureFile") == 0) continue;
|
||||
foreach (const QAction *action, child->actions()) {
|
||||
|
@ -257,7 +257,7 @@ FolderListModel::FolderListModel(QObject * parent):
|
|||
|
||||
#ifdef Q_OS_MAC
|
||||
/* Mac Extras */
|
||||
QString extras_path = wsApp->applicationDirPath() + "/../Resources/Extras";
|
||||
QString extras_path = mainApp->applicationDirPath() + "/../Resources/Extras";
|
||||
appendRow(QStringList() << tr("macOS Extras") << QDir::cleanPath(extras_path) << tr("Extra macOS packages"));
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include "epan/epan_dissect.h"
|
||||
#include "epan/frame_data.h"
|
||||
|
||||
#include "main_application.h"
|
||||
|
||||
#include "address_editor_frame.h"
|
||||
#include <ui_address_editor_frame.h>
|
||||
|
||||
|
@ -25,7 +27,6 @@
|
|||
#include <QKeyEvent>
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <ui/qt/wireshark_application.h>
|
||||
|
||||
// To do:
|
||||
// - Fill in currently resolved address.
|
||||
|
@ -170,7 +171,7 @@ void AddressEditorFrame::on_buttonBox_accepted()
|
|||
QString name = ui->nameLineEdit->text();
|
||||
if (!cf_add_ip_name_from_string(cap_file_, addr.toUtf8().constData(), name.toUtf8().constData())) {
|
||||
QString error_msg = tr("Can't assign %1 to %2.").arg(name).arg(addr);
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, error_msg);
|
||||
mainApp->pushStatus(MainApplication::TemporaryStatus, error_msg);
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "epan/epan_dissect.h"
|
||||
#include "epan/tvbuff-int.h"
|
||||
|
||||
#include <wireshark_application.h>
|
||||
#include <main_application.h>
|
||||
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
#include <ui/qt/widgets/byte_view_text.h>
|
||||
|
@ -45,7 +45,7 @@ ByteViewTab::ByteViewTab(QWidget *parent, epan_dissect_t *edt_fixed) :
|
|||
setMinimumSize(one_em, one_em);
|
||||
|
||||
if (!edt_fixed) {
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(connectToMainWindow()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(connectToMainWindow()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,16 +55,16 @@ ByteViewTab::ByteViewTab(QWidget *parent, epan_dissect_t *edt_fixed) :
|
|||
void ByteViewTab::connectToMainWindow()
|
||||
{
|
||||
connect(this, SIGNAL(fieldSelected(FieldInformation *)),
|
||||
wsApp->mainWindow(), SIGNAL(fieldSelected(FieldInformation *)));
|
||||
mainApp->mainWindow(), SIGNAL(fieldSelected(FieldInformation *)));
|
||||
connect(this, SIGNAL(fieldHighlight(FieldInformation *)),
|
||||
wsApp->mainWindow(), SIGNAL(fieldHighlight(FieldInformation *)));
|
||||
mainApp->mainWindow(), SIGNAL(fieldHighlight(FieldInformation *)));
|
||||
|
||||
/* Connect change of packet selection */
|
||||
connect(wsApp->mainWindow(), SIGNAL(framesSelected(QList<int>)), this, SLOT(selectedFrameChanged(QList<int>)));
|
||||
connect(wsApp->mainWindow(), SIGNAL(setCaptureFile(capture_file*)), this, SLOT(setCaptureFile(capture_file*)));
|
||||
connect(wsApp->mainWindow(), SIGNAL(fieldSelected(FieldInformation *)), this, SLOT(selectedFieldChanged(FieldInformation *)));
|
||||
connect(mainApp->mainWindow(), SIGNAL(framesSelected(QList<int>)), this, SLOT(selectedFrameChanged(QList<int>)));
|
||||
connect(mainApp->mainWindow(), SIGNAL(setCaptureFile(capture_file*)), this, SLOT(setCaptureFile(capture_file*)));
|
||||
connect(mainApp->mainWindow(), SIGNAL(fieldSelected(FieldInformation *)), this, SLOT(selectedFieldChanged(FieldInformation *)));
|
||||
|
||||
connect(wsApp->mainWindow(), SIGNAL(captureActive(int)), this, SLOT(captureActive(int)));
|
||||
connect(mainApp->mainWindow(), SIGNAL(captureActive(int)), this, SLOT(captureActive(int)));
|
||||
}
|
||||
|
||||
void ByteViewTab::captureActive(int cap)
|
||||
|
@ -105,13 +105,13 @@ void ByteViewTab::addTab(const char *name, tvbuff_t *tvb) {
|
|||
|
||||
ByteViewText * byte_view_text = new ByteViewText(data, encoding, this);
|
||||
byte_view_text->setAccessibleName(name);
|
||||
byte_view_text->setMonospaceFont(wsApp->monospaceFont(true));
|
||||
byte_view_text->setMonospaceFont(mainApp->monospaceFont(true));
|
||||
|
||||
if (tvb)
|
||||
{
|
||||
byte_view_text->setProperty(tvb_data_property, VariantPointer<tvbuff_t>::asQVariant(tvb));
|
||||
|
||||
connect(wsApp, SIGNAL(zoomMonospaceFont(QFont)), byte_view_text, SLOT(setMonospaceFont(QFont)));
|
||||
connect(mainApp, SIGNAL(zoomMonospaceFont(QFont)), byte_view_text, SLOT(setMonospaceFont(QFont)));
|
||||
|
||||
connect(byte_view_text, SIGNAL(byteHovered(int)), this, SLOT(byteViewTextHovered(int)));
|
||||
connect(byte_view_text, SIGNAL(byteSelected(int)), this, SLOT(byteViewTextMarked(int)));
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
#include "epan/prefs.h"
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <wireshark_application.h>
|
||||
#include <main_application.h>
|
||||
|
||||
CaptureFileDialog::CaptureFileDialog(QWidget *parent, capture_file *cf, QString &display_filter) :
|
||||
WiresharkFileDialog(parent),
|
||||
|
@ -70,7 +70,7 @@ CaptureFileDialog::CaptureFileDialog(QWidget *parent, capture_file *cf, QString
|
|||
* use the "last opened" directory saved in the preferences file if
|
||||
* there was one.
|
||||
*/
|
||||
setDirectory(wsApp->lastOpenDir());
|
||||
setDirectory(mainApp->lastOpenDir());
|
||||
break;
|
||||
|
||||
case FO_STYLE_SPECIFIED:
|
||||
|
@ -275,7 +275,7 @@ wtap_compression_type CaptureFileDialog::compressionType() {
|
|||
}
|
||||
|
||||
int CaptureFileDialog::open(QString &file_name, unsigned int &type) {
|
||||
QString title_str = wsApp->windowTitleString(tr("Open Capture File"));
|
||||
QString title_str = mainApp->windowTitleString(tr("Open Capture File"));
|
||||
GString *fname = g_string_new(file_name.toUtf8().constData());
|
||||
GString *dfilter = g_string_new(display_filter_.toUtf8().constData());
|
||||
gboolean wof_status;
|
||||
|
@ -292,7 +292,7 @@ int CaptureFileDialog::open(QString &file_name, unsigned int &type) {
|
|||
}
|
||||
|
||||
check_savability_t CaptureFileDialog::saveAs(QString &file_name, bool must_support_all_comments) {
|
||||
QString title_str = wsApp->windowTitleString(tr("Save Capture File As"));
|
||||
QString title_str = mainApp->windowTitleString(tr("Save Capture File As"));
|
||||
GString *fname = g_string_new(file_name.toUtf8().constData());
|
||||
gboolean wsf_status;
|
||||
|
||||
|
@ -309,7 +309,7 @@ check_savability_t CaptureFileDialog::saveAs(QString &file_name, bool must_suppo
|
|||
}
|
||||
|
||||
check_savability_t CaptureFileDialog::exportSelectedPackets(QString &file_name, packet_range_t *range, QString selRange) {
|
||||
QString title_str = wsApp->windowTitleString(tr("Export Specified Packets"));
|
||||
QString title_str = mainApp->windowTitleString(tr("Export Specified Packets"));
|
||||
GString *fname = g_string_new(file_name.toUtf8().constData());
|
||||
gboolean wespf_status;
|
||||
|
||||
|
@ -331,7 +331,7 @@ check_savability_t CaptureFileDialog::exportSelectedPackets(QString &file_name,
|
|||
}
|
||||
|
||||
int CaptureFileDialog::merge(QString &file_name) {
|
||||
QString title_str = wsApp->windowTitleString(tr("Merge Capture File"));
|
||||
QString title_str = mainApp->windowTitleString(tr("Merge Capture File"));
|
||||
GString *fname = g_string_new(file_name.toUtf8().constData());
|
||||
GString *dfilter = g_string_new(display_filter_.toUtf8().constData());
|
||||
gboolean wmf_status;
|
||||
|
@ -700,7 +700,7 @@ QDialogButtonBox *CaptureFileDialog::addHelpButton(topic_action_e help_topic)
|
|||
}
|
||||
|
||||
int CaptureFileDialog::open(QString &file_name, unsigned int &type) {
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Open Capture File")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Open Capture File")));
|
||||
setNameFilters(buildFileOpenTypeList());
|
||||
setFileMode(QFileDialog::ExistingFile);
|
||||
|
||||
|
@ -730,7 +730,7 @@ int CaptureFileDialog::open(QString &file_name, unsigned int &type) {
|
|||
}
|
||||
|
||||
check_savability_t CaptureFileDialog::saveAs(QString &file_name, bool must_support_all_comments) {
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Save Capture File As")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Save Capture File As")));
|
||||
// XXX There doesn't appear to be a way to use setNameFilters without restricting
|
||||
// what the user can select. We might want to use our own combobox instead and
|
||||
// let the user select anything.
|
||||
|
@ -773,7 +773,7 @@ check_savability_t CaptureFileDialog::saveAs(QString &file_name, bool must_suppo
|
|||
check_savability_t CaptureFileDialog::exportSelectedPackets(QString &file_name, packet_range_t *range, QString selRange) {
|
||||
QDialogButtonBox *button_box;
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Export Specified Packets")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Export Specified Packets")));
|
||||
// XXX See comment in ::saveAs regarding setNameFilters
|
||||
setNameFilters(buildFileSaveAsTypeList(false));
|
||||
setAcceptMode(QFileDialog::AcceptSave);
|
||||
|
@ -821,7 +821,7 @@ check_savability_t CaptureFileDialog::exportSelectedPackets(QString &file_name,
|
|||
}
|
||||
|
||||
int CaptureFileDialog::merge(QString &file_name) {
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Merge Capture File")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Merge Capture File")));
|
||||
setNameFilters(buildFileOpenTypeList());
|
||||
setFileMode(QFileDialog::ExistingFile);
|
||||
|
||||
|
@ -1025,7 +1025,7 @@ void CaptureFileDialog::preview(const QString & path)
|
|||
|
||||
void CaptureFileDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
if (help_topic_ != TOPIC_ACTION_NONE) wsApp->helpTopicAction(help_topic_);
|
||||
if (help_topic_ != TOPIC_ACTION_NONE) mainApp->helpTopicAction(help_topic_);
|
||||
}
|
||||
|
||||
#endif // ! Q_OS_WIN
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "ui/version_info.h"
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QScrollBar>
|
||||
|
@ -604,7 +604,7 @@ void CaptureFilePropertiesDialog::changeEvent(QEvent* event)
|
|||
|
||||
void CaptureFilePropertiesDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_STATS_SUMMARY_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_STATS_SUMMARY_DIALOG);
|
||||
}
|
||||
|
||||
void CaptureFilePropertiesDialog::on_buttonBox_accepted()
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "capture_info_dialog.h"
|
||||
#include "ui_capture_info_dialog.h"
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include "ui/qt/models/sparkline_delegate.h"
|
||||
|
||||
|
@ -92,7 +92,7 @@ CaptureInfoDialog::CaptureInfoDialog(struct _capture_info *cap_info, struct _cap
|
|||
{
|
||||
ui->setupUi(this);
|
||||
loadGeometry();
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Capture Information")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Capture Information")));
|
||||
|
||||
QPushButton *button = ui->buttonBox->button(QDialogButtonBox::Abort);
|
||||
button->setText(tr("Stop Capture"));
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "compiled_filter_output.h"
|
||||
#include "manage_interfaces_dialog.h"
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include "extcap.h"
|
||||
|
||||
|
@ -161,7 +161,7 @@ public:
|
|||
}
|
||||
|
||||
void setApplicable(int column, bool applicable = false) {
|
||||
QPalette palette = wsApp->palette();
|
||||
QPalette palette = mainApp->palette();
|
||||
|
||||
if (applicable) {
|
||||
setText(column, QString());
|
||||
|
@ -181,7 +181,7 @@ CaptureOptionsDialog::CaptureOptionsDialog(QWidget *parent) :
|
|||
{
|
||||
ui->setupUi(this);
|
||||
loadGeometry();
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Capture Options")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Capture Options")));
|
||||
|
||||
stat_timer_ = NULL;
|
||||
stat_cache_ = NULL;
|
||||
|
@ -230,7 +230,7 @@ CaptureOptionsDialog::CaptureOptionsDialog(QWidget *parent) :
|
|||
connect(&interface_item_delegate_, SIGNAL(filterChanged(QString)),
|
||||
this, SIGNAL(captureFilterTextEdited(QString)));
|
||||
connect(this, SIGNAL(ifsChanged()), this, SLOT(refreshInterfaceList()));
|
||||
connect(wsApp, SIGNAL(localInterfaceListChanged()), this, SLOT(updateLocalInterfaces()));
|
||||
connect(mainApp, SIGNAL(localInterfaceListChanged()), this, SLOT(updateLocalInterfaces()));
|
||||
connect(ui->browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked()));
|
||||
connect(ui->interfaceTree, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(itemClicked(QTreeWidgetItem*,int)));
|
||||
connect(ui->interfaceTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*)));
|
||||
|
@ -635,7 +635,7 @@ void CaptureOptionsDialog::on_buttonBox_rejected()
|
|||
void CaptureOptionsDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
// Probably the wrong URL.
|
||||
wsApp->helpTopicAction(HELP_CAPTURE_OPTIONS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_CAPTURE_OPTIONS_DIALOG);
|
||||
}
|
||||
|
||||
void CaptureOptionsDialog::updateInterfaces()
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "capture_preferences_frame.h"
|
||||
#include <ui/qt/models/pref_models.h>
|
||||
#include <ui_capture_preferences_frame.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QSpacerItem>
|
||||
|
||||
|
@ -76,7 +76,7 @@ void CapturePreferencesFrame::updateWidgets()
|
|||
* see whether any have showed up (or privileges have changed
|
||||
* to allow us to access them).
|
||||
*/
|
||||
wsApp->refreshLocalInterfaces();
|
||||
mainApp->refreshLocalInterfaces();
|
||||
}
|
||||
for (guint i = 0; i < global_capture_opts.all_ifaces->len; i++) {
|
||||
device = &g_array_index(global_capture_opts.all_ifaces, interface_t, i);
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
#include "wsutil/filesystem.h"
|
||||
#include "epan/dfilter/dfilter.h"
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include "ui/qt/utils/qt_ui_utils.h"
|
||||
#include "ui/qt/widgets/copy_from_profile_button.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
@ -50,7 +51,7 @@ ColoringRulesDialog::ColoringRulesDialog(QWidget *parent, QString add_filter) :
|
|||
ui->setupUi(this);
|
||||
if (parent) loadGeometry(parent->width() * 2 / 3, parent->height() * 4 / 5);
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Coloring Rules %1").arg(get_profile_name())));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Coloring Rules %1").arg(get_profile_name())));
|
||||
|
||||
ui->coloringRulesTreeView->setModel(&colorRuleModel_);
|
||||
ui->coloringRulesTreeView->setItemDelegate(&colorRuleDelegate_);
|
||||
|
@ -433,8 +434,8 @@ void ColoringRulesDialog::on_buttonBox_clicked(QAbstractButton *button)
|
|||
QString err;
|
||||
|
||||
if (button == import_button_) {
|
||||
QString file_name = WiresharkFileDialog::getOpenFileName(this, wsApp->windowTitleString(tr("Import Coloring Rules")),
|
||||
wsApp->lastOpenDir().path());
|
||||
QString file_name = WiresharkFileDialog::getOpenFileName(this, mainApp->windowTitleString(tr("Import Coloring Rules")),
|
||||
mainApp->lastOpenDir().path());
|
||||
if (!file_name.isEmpty()) {
|
||||
if (!colorRuleModel_.importColors(file_name, err)) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err.toUtf8().constData());
|
||||
|
@ -452,9 +453,9 @@ void ColoringRulesDialog::on_buttonBox_clicked(QAbstractButton *button)
|
|||
if (num_items < 1)
|
||||
return;
|
||||
|
||||
QString caption = wsApp->windowTitleString(tr("Export %1 Coloring Rules").arg(num_items));
|
||||
QString caption = mainApp->windowTitleString(tr("Export %1 Coloring Rules").arg(num_items));
|
||||
QString file_name = WiresharkFileDialog::getSaveFileName(this, caption,
|
||||
wsApp->lastOpenDir().path());
|
||||
mainApp->lastOpenDir().path());
|
||||
if (!file_name.isEmpty()) {
|
||||
if (!colorRuleModel_.exportColors(file_name, err)) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err.toUtf8().constData());
|
||||
|
@ -473,5 +474,5 @@ void ColoringRulesDialog::on_buttonBox_accepted()
|
|||
|
||||
void ColoringRulesDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_COLORING_RULES_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_COLORING_RULES_DIALOG);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
#include <ui/recent.h>
|
||||
|
||||
#include <ui/preference_utils.h>
|
||||
#include <ui/qt/wireshark_application.h>
|
||||
|
||||
#include "main_application.h"
|
||||
|
||||
#include "column_editor_frame.h"
|
||||
#include <ui_column_editor_frame.h>
|
||||
|
@ -168,11 +169,11 @@ void ColumnEditorFrame::keyPressEvent(QKeyEvent *event)
|
|||
if (ui->buttonBox->button(QDialogButtonBox::Ok)->isEnabled()) {
|
||||
on_buttonBox_accepted();
|
||||
} else if (ui->fieldsNameLineEdit->syntaxState() == SyntaxLineEdit::Empty) {
|
||||
wsApp->pushStatus(WiresharkApplication::FilterSyntax, tr("Missing fields."));
|
||||
mainApp->pushStatus(MainApplication::FilterSyntax, tr("Missing fields."));
|
||||
} else if (ui->fieldsNameLineEdit->syntaxState() != SyntaxLineEdit::Valid) {
|
||||
wsApp->pushStatus(WiresharkApplication::FilterSyntax, tr("Invalid fields."));
|
||||
mainApp->pushStatus(MainApplication::FilterSyntax, tr("Invalid fields."));
|
||||
} else if (ui->occurrenceLineEdit->syntaxState() == SyntaxLineEdit::Invalid) {
|
||||
wsApp->pushStatus(WiresharkApplication::FilterSyntax, tr("Invalid occurrence value."));
|
||||
mainApp->pushStatus(MainApplication::FilterSyntax, tr("Invalid occurrence value."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <ui/qt/widgets/syntax_line_edit.h>
|
||||
#include <ui/qt/widgets/field_filter_edit.h>
|
||||
#include <ui/qt/models/column_list_model.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QTreeWidgetItemIterator>
|
||||
|
@ -84,7 +84,7 @@ ColumnPreferencesFrame::~ColumnPreferencesFrame()
|
|||
void ColumnPreferencesFrame::unstash()
|
||||
{
|
||||
model_->saveColumns();
|
||||
wsApp->emitAppSignal(WiresharkApplication::ColumnsChanged);
|
||||
mainApp->emitAppSignal(MainApplication::ColumnsChanged);
|
||||
}
|
||||
|
||||
void ColumnPreferencesFrame::on_newToolButton_clicked()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <wiretap/wtap.h>
|
||||
#include "ui/capture_globals.h"
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QPushButton>
|
||||
|
@ -34,7 +34,7 @@ CompiledFilterOutput::CompiledFilterOutput(QWidget *parent, QStringList &intList
|
|||
ui->setupUi(this);
|
||||
loadGeometry();
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
ui->filterList->setCurrentFont(wsApp->monospaceFont());
|
||||
ui->filterList->setCurrentFont(mainApp->monospaceFont());
|
||||
|
||||
copy_bt_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||
copy_bt_->setToolTip(tr("Copy filter text to the clipboard."));
|
||||
|
@ -113,5 +113,5 @@ void CompiledFilterOutput::on_interfaceList_currentItemChanged(QListWidgetItem *
|
|||
|
||||
void CompiledFilterOutput::copyFilterText()
|
||||
{
|
||||
wsApp->clipboard()->setText(ui->filterList->toPlainText());
|
||||
mainApp->clipboard()->setText(ui->filterList->toPlainText());
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <ui/qt/models/timeline_delegate.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDateTime>
|
||||
|
@ -64,7 +64,7 @@ ConversationDialog::ConversationDialog(QWidget &parent, CaptureFile &cf, int cli
|
|||
graph_bt_->setToolTip(tr("Graph a TCP conversation."));
|
||||
connect(graph_bt_, SIGNAL(clicked()), this, SLOT(graphTcp()));
|
||||
|
||||
connect(wsApp->mainWindow(), SIGNAL(displayFilterSuccess(bool)),
|
||||
connect(mainApp->mainWindow(), SIGNAL(displayFilterSuccess(bool)),
|
||||
this, SLOT(displayFilterSuccess(bool)));
|
||||
|
||||
absoluteTimeCheckBox()->show();
|
||||
|
@ -306,7 +306,7 @@ void ConversationDialog::on_displayFilterCheckBox_toggled(bool checked)
|
|||
|
||||
void ConversationDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_STATS_CONVERSATIONS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_STATS_CONVERSATIONS_DIALOG);
|
||||
}
|
||||
|
||||
void ConversationDialog::displayFilterSuccess(bool success)
|
||||
|
@ -323,7 +323,7 @@ void ConversationDialog::displayFilterSuccess(bool success)
|
|||
|
||||
void init_conversation_table(struct register_ct* ct, const char *filter)
|
||||
{
|
||||
wsApp->emitStatCommandSignal("Conversations", filter, GINT_TO_POINTER(get_conversation_proto_id(ct)));
|
||||
mainApp->emitStatCommandSignal("Conversations", filter, GINT_TO_POINTER(get_conversation_proto_id(ct)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <epan/conversation_debug.h>
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
ConversationHashTablesDialog::ConversationHashTablesDialog(QWidget *parent) :
|
||||
GeometryStateDialog(parent),
|
||||
|
@ -27,7 +27,7 @@ ConversationHashTablesDialog::ConversationHashTablesDialog(QWidget *parent) :
|
|||
ui->setupUi(this);
|
||||
if (parent) loadGeometry(parent->width() * 3 / 4, parent->height() * 3 / 4);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Conversation Hash Tables")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Conversation Hash Tables")));
|
||||
|
||||
QString html;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "credentials_dialog.h"
|
||||
#include <ui_credentials_dialog.h>
|
||||
#include <ui/tap-credentials.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
#include "ui/qt/models/credentials_model.h"
|
||||
#include <ui/qt/models/url_link_delegate.h>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <ui/qt/widgets/copy_from_profile_button.h>
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
|
||||
|
@ -63,7 +63,7 @@ DecodeAsDialog::DecodeAsDialog(QWidget *parent, capture_file *cf, bool create_ne
|
|||
ui->pathLabel->setAttribute(Qt::WA_MacSmallSize, true);
|
||||
#endif
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Decode As…")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Decode As…")));
|
||||
|
||||
QString abs_path = gchar_free_to_qstring(get_persconffile_path(DECODE_AS_ENTRIES_FILE_NAME, TRUE));
|
||||
if (file_exists(abs_path.toUtf8().constData())) {
|
||||
|
@ -200,7 +200,7 @@ void DecodeAsDialog::on_clearToolButton_clicked()
|
|||
void DecodeAsDialog::applyChanges()
|
||||
{
|
||||
model_->applyChanges();
|
||||
wsApp->queueAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->queueAppSignal(MainApplication::PacketDissectionChanged);
|
||||
}
|
||||
|
||||
void DecodeAsDialog::on_buttonBox_clicked(QAbstractButton *button)
|
||||
|
@ -223,7 +223,7 @@ void DecodeAsDialog::on_buttonBox_clicked(QAbstractButton *button)
|
|||
}
|
||||
break;
|
||||
case QDialogButtonBox::Help:
|
||||
wsApp->helpTopicAction(HELP_DECODE_AS_SHOW_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_DECODE_AS_SHOW_DIALOG);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <wsutil/utf8_entities.h>
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
|
||||
|
@ -64,8 +64,8 @@ DisplayFilterExpressionDialog::DisplayFilterExpressionDialog(QWidget *parent) :
|
|||
if (parent) loadGeometry(parent->width() * 2 / 3, parent->height());
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Display Filter Expression")));
|
||||
setWindowIcon(wsApp->normalIcon());
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Display Filter Expression")));
|
||||
setWindowIcon(mainApp->normalIcon());
|
||||
|
||||
proto_initialize_all_prefixes();
|
||||
|
||||
|
@ -126,7 +126,7 @@ void DisplayFilterExpressionDialog::fillTree()
|
|||
proto_list << proto_ti;
|
||||
}
|
||||
|
||||
wsApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
|
||||
mainApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
|
||||
|
||||
ui->fieldTreeWidget->invisibleRootItem()->addChildren(proto_list);
|
||||
ui->fieldTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
||||
|
@ -149,14 +149,14 @@ void DisplayFilterExpressionDialog::fillTree()
|
|||
|
||||
field_count++;
|
||||
if (field_count % 10000 == 0) {
|
||||
wsApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
|
||||
mainApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
|
||||
}
|
||||
}
|
||||
std::sort(field_list.begin(), field_list.end());
|
||||
proto_ti->addChildren(field_list);
|
||||
}
|
||||
|
||||
wsApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
|
||||
mainApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
|
||||
ui->fieldTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
||||
|
||||
updateWidgets();
|
||||
|
@ -446,5 +446,5 @@ void DisplayFilterExpressionDialog::on_buttonBox_accepted()
|
|||
|
||||
void DisplayFilterExpressionDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_FILTER_EXPRESSION_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_FILTER_EXPRESSION_DIALOG);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <ui/qt/dissector_tables_dialog.h>
|
||||
#include <ui_dissector_tables_dialog.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
DissectorTablesDialog::DissectorTablesDialog(QWidget *parent) :
|
||||
GeometryStateDialog(parent),
|
||||
|
@ -24,7 +24,7 @@ DissectorTablesDialog::DissectorTablesDialog(QWidget *parent) :
|
|||
loadGeometry(parent->width() * 3 / 4, parent->height() * 3 / 4);
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Dissector Tables")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Dissector Tables")));
|
||||
|
||||
proxyModel_ = new DissectorTablesProxyModel(this);
|
||||
proxyModel_->setSourceModel(new DissectorTablesModel(this));
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <epan/prefs.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
EnabledProtocolsDialog::EnabledProtocolsDialog(QWidget *parent) :
|
||||
GeometryStateDialog(parent),
|
||||
|
@ -28,7 +28,7 @@ EnabledProtocolsDialog::EnabledProtocolsDialog(QWidget *parent) :
|
|||
proxyModel_->setSourceModel(enabled_protocols_model_);
|
||||
ui->protocol_tree_->setModel(proxyModel_);
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Enabled Protocols")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Enabled Protocols")));
|
||||
|
||||
// Some protocols have excessively long names. Instead of calling
|
||||
// resizeColumnToContents, pick a reasonable-ish em width and apply it.
|
||||
|
@ -121,5 +121,5 @@ void EnabledProtocolsDialog::on_buttonBox_accepted()
|
|||
|
||||
void EnabledProtocolsDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_ENABLED_PROTOCOLS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_ENABLED_PROTOCOLS_DIALOG);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
#include <ui/qt/widgets/wireshark_file_dialog.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDesktopServices>
|
||||
|
@ -293,12 +293,12 @@ void EndpointDialog::saveMap()
|
|||
|
||||
void EndpointDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_STATS_ENDPOINTS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_STATS_ENDPOINTS_DIALOG);
|
||||
}
|
||||
|
||||
void init_endpoint_table(struct register_ct* ct, const char *filter)
|
||||
{
|
||||
wsApp->emitStatCommandSignal("Endpoints", filter, GINT_TO_POINTER(get_conversation_proto_id(ct)));
|
||||
mainApp->emitStatCommandSignal("Endpoints", filter, GINT_TO_POINTER(get_conversation_proto_id(ct)));
|
||||
}
|
||||
|
||||
// EndpointTreeWidgetItem
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <epan/stat_tap_ui.h>
|
||||
#include <epan/tap.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QHash>
|
||||
|
@ -321,14 +321,14 @@ void ExpertInfoDialog::on_searchLineEdit_textChanged(const QString &search_re)
|
|||
|
||||
void ExpertInfoDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_EXPERT_INFO_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_EXPERT_INFO_DIALOG);
|
||||
}
|
||||
|
||||
// Stat command + args
|
||||
|
||||
static void
|
||||
expert_info_init(const char *, void*) {
|
||||
wsApp->emitStatCommandSignal("ExpertInfo", NULL, NULL);
|
||||
mainApp->emitStatCommandSignal("ExpertInfo", NULL, NULL);
|
||||
}
|
||||
|
||||
static stat_tap_ui expert_info_stat_ui = {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#endif // Q_OS_WIN
|
||||
|
||||
#include <epan/prefs.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#if !defined(Q_OS_WIN)
|
||||
static const QStringList export_extensions = QStringList()
|
||||
|
@ -56,7 +56,7 @@ ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *ca
|
|||
, sel_range_(selRange)
|
||||
#endif /* Q_OS_WIN */
|
||||
{
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Export Packet Dissections")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Export Packet Dissections")));
|
||||
|
||||
switch (prefs.gui_fileopen_style) {
|
||||
|
||||
|
@ -67,7 +67,7 @@ ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *ca
|
|||
* use the "last opened" directory saved in the preferences file if
|
||||
* there was one.
|
||||
*/
|
||||
setDirectory(wsApp->lastOpenDir());
|
||||
setDirectory(mainApp->lastOpenDir());
|
||||
break;
|
||||
|
||||
case FO_STYLE_SPECIFIED:
|
||||
|
@ -284,6 +284,6 @@ void ExportDissectionDialog::checkValidity()
|
|||
|
||||
void ExportDissectionDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_EXPORT_FILE_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_EXPORT_FILE_DIALOG);
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <ui/alert_box.h>
|
||||
#include <wsutil/utf8_entities.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
#include <ui/qt/widgets/export_objects_view.h>
|
||||
#include <ui/qt/models/export_objects_model.h>
|
||||
|
@ -73,7 +73,7 @@ ExportObjectDialog::ExportObjectDialog(QWidget &parent, CaptureFile &cf, registe
|
|||
contentTypes << tr("All Content-Types");
|
||||
eo_ui_->cmbContentType->addItems(contentTypes);
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(QStringList() << tr("Export") << tr("%1 object list").arg(proto_get_protocol_short_name(find_protocol_by_id(get_eo_proto_id(eo))))));
|
||||
setWindowTitle(mainApp->windowTitleString(QStringList() << tr("Export") << tr("%1 object list").arg(proto_get_protocol_short_name(find_protocol_by_id(get_eo_proto_id(eo))))));
|
||||
|
||||
if (save_bt_) save_bt_->setEnabled(false);
|
||||
if (save_all_bt_) save_all_bt_->setEnabled(false);
|
||||
|
@ -100,7 +100,7 @@ void ExportObjectDialog::currentHasChanged(QModelIndex current)
|
|||
QString mime_type = sibl.sibling(current.row(), ExportObjectModel::colContent).data().toString();
|
||||
eo_ui_->buttonBox->button(QDialogButtonBox::Open)->setEnabled(mimeTypeIsPreviewable(mime_type));
|
||||
}
|
||||
wsApp->gotoFrame(sibl.data().toInt());
|
||||
mainApp->gotoFrame(sibl.data().toInt());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ void ExportObjectDialog::captureEvent(CaptureEvent e)
|
|||
|
||||
void ExportObjectDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_EXPORT_OBJECT_LIST);
|
||||
mainApp->helpTopicAction(HELP_EXPORT_OBJECT_LIST);
|
||||
}
|
||||
|
||||
void ExportObjectDialog::on_buttonBox_clicked(QAbstractButton *button)
|
||||
|
@ -244,7 +244,7 @@ void ExportObjectDialog::on_cmbContentType_currentIndexChanged(int index)
|
|||
|
||||
void ExportObjectDialog::saveCurrentEntry(QString *tempFile)
|
||||
{
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
|
||||
QModelIndex proxyIndex = eo_ui_->objectTree->currentIndex();
|
||||
if (!proxyIndex.isValid())
|
||||
|
@ -262,7 +262,7 @@ void ExportObjectDialog::saveCurrentEntry(QString *tempFile)
|
|||
if (!tempFile)
|
||||
{
|
||||
GString *safe_filename = eo_massage_str(entry_filename.toUtf8().constData(), EXPORT_OBJECT_MAXFILELEN, 0);
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Object As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Object As…")),
|
||||
safe_filename->str);
|
||||
g_string_free(safe_filename, TRUE);
|
||||
} else {
|
||||
|
@ -279,7 +279,7 @@ void ExportObjectDialog::saveCurrentEntry(QString *tempFile)
|
|||
|
||||
void ExportObjectDialog::saveAllEntries()
|
||||
{
|
||||
QDir save_in_dir(wsApp->lastOpenDir());
|
||||
QDir save_in_dir(mainApp->lastOpenDir());
|
||||
QString save_in_path;
|
||||
|
||||
//
|
||||
|
@ -292,7 +292,7 @@ void ExportObjectDialog::saveAllEntries()
|
|||
// as the native dialog is used, and it supports that; does
|
||||
// that also work on Windows and with Qt's own dialog?
|
||||
//
|
||||
save_in_path = WiresharkFileDialog::getExistingDirectory(this, wsApp->windowTitleString(tr("Save All Objects In…")),
|
||||
save_in_path = WiresharkFileDialog::getExistingDirectory(this, mainApp->windowTitleString(tr("Save All Objects In…")),
|
||||
save_in_dir.canonicalPath(),
|
||||
QFileDialog::ShowDirsOnly);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <extcap_options_dialog.h>
|
||||
#include <ui_extcap_options_dialog.h>
|
||||
|
||||
#include <wireshark_application.h>
|
||||
#include <main_application.h>
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QHash>
|
||||
|
@ -47,7 +47,7 @@
|
|||
#include <epan/prefs.h>
|
||||
#include <ui/preference_utils.h>
|
||||
|
||||
#include <ui/qt/wireshark_application.h>
|
||||
#include <ui/qt/main_application.h>
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
|
||||
#include <ui/qt/extcap_argument.h>
|
||||
|
@ -63,7 +63,7 @@ ExtcapOptionsDialog::ExtcapOptionsDialog(bool startCaptureOnClose, QWidget *pare
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Interface Options")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Interface Options")));
|
||||
|
||||
ui->checkSaveOnStart->setCheckState(prefs.extcap_save_on_start ? Qt::Checked : Qt::Unchecked);
|
||||
|
||||
|
@ -101,7 +101,7 @@ ExtcapOptionsDialog * ExtcapOptionsDialog::createForDevice(QString &dev_name, bo
|
|||
resultDialog->device_name = QString(dev_name);
|
||||
resultDialog->device_idx = if_idx;
|
||||
|
||||
resultDialog->setWindowTitle(wsApp->windowTitleString(tr("Interface Options") + ": " + device->display_name));
|
||||
resultDialog->setWindowTitle(mainApp->windowTitleString(tr("Interface Options") + ": " + device->display_name));
|
||||
|
||||
resultDialog->updateWidgets();
|
||||
|
||||
|
@ -410,7 +410,7 @@ void ExtcapOptionsDialog::on_buttonBox_helpRequested()
|
|||
interface_help = QString(extcap_get_help_for_ifname(device->name));
|
||||
/* The extcap interface didn't provide an help. Let's go with the default */
|
||||
if (interface_help.isEmpty()) {
|
||||
wsApp->helpTopicAction(HELP_EXTCAP_OPTIONS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_EXTCAP_OPTIONS_DIALOG);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -611,7 +611,7 @@ void ExtcapOptionsDialog::storeValues()
|
|||
if (g_hash_table_size(entries) > 0)
|
||||
{
|
||||
if (prefs_store_ext_multiple("extcap", entries))
|
||||
wsApp->emitAppSignal(WiresharkApplication::PreferencesChanged);
|
||||
mainApp->emitAppSignal(MainApplication::PreferencesChanged);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "file_set_dialog.h"
|
||||
#include <ui_file_set_dialog.h>
|
||||
#include "models/fileset_entry_model.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QPushButton>
|
||||
|
@ -108,7 +108,7 @@ void FileSetDialog::addFile(fileset_entry *entry) {
|
|||
void FileSetDialog::beginAddFile()
|
||||
{
|
||||
cur_idx_ = -1;
|
||||
setWindowTitle(wsApp->windowTitleString(tr("No files in Set")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("No files in Set")));
|
||||
fs_ui_->directoryLabel->setText(tr("No capture loaded"));
|
||||
fs_ui_->directoryLabel->setEnabled(false);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ void FileSetDialog::beginAddFile()
|
|||
void FileSetDialog::endAddFile()
|
||||
{
|
||||
if (fileset_entry_model_->entryCount() > 0) {
|
||||
setWindowTitle(wsApp->windowTitleString(tr("%Ln File(s) in Set", "",
|
||||
setWindowTitle(mainApp->windowTitleString(tr("%Ln File(s) in Set", "",
|
||||
fileset_entry_model_->entryCount())));
|
||||
}
|
||||
|
||||
|
@ -153,5 +153,5 @@ void FileSetDialog::selectionChanged(const QItemSelection &selected, const QItem
|
|||
|
||||
void FileSetDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_FILESET_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_FILESET_DIALOG);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "filter_action.h"
|
||||
|
||||
#include <ui/qt/wireshark_application.h>
|
||||
#include <ui/qt/main_application.h>
|
||||
#include <ui/qt/main_window.h>
|
||||
|
||||
#include <QMenu>
|
||||
|
@ -187,9 +187,9 @@ QActionGroup * FilterAction::createFilterGroup(QString filter, bool prepare, boo
|
|||
enabled = false;
|
||||
|
||||
bool filterEmpty = false;
|
||||
if (wsApp)
|
||||
if (mainApp)
|
||||
{
|
||||
QWidget * mainWin = wsApp->mainWindow();
|
||||
QWidget * mainWin = mainApp->mainWindow();
|
||||
if (qobject_cast<MainWindow *>(mainWin))
|
||||
filterEmpty = qobject_cast<MainWindow *>(mainWin)->getFilter().isEmpty();
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ QMenu * FilterAction::createFilterMenu(FilterAction::Action act, QString filter,
|
|||
|
||||
void FilterAction::groupTriggered(QAction * action)
|
||||
{
|
||||
if (action && wsApp)
|
||||
if (action && mainApp)
|
||||
{
|
||||
if (action->property("filterType").canConvert<FilterAction::ActionType>() &&
|
||||
sender()->property("filterAction").canConvert<FilterAction::Action>())
|
||||
|
@ -254,7 +254,7 @@ void FilterAction::groupTriggered(QAction * action)
|
|||
FilterAction::ActionType type = action->property("filterType").value<FilterAction::ActionType>();
|
||||
QString filter = sender()->property("filter").toString();
|
||||
|
||||
QWidget * mainWin = wsApp->mainWindow();
|
||||
QWidget * mainWin = mainApp->mainWindow();
|
||||
if (qobject_cast<MainWindow *>(mainWin))
|
||||
{
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(mainWin);
|
||||
|
@ -285,5 +285,5 @@ void FilterAction::copyActionTriggered()
|
|||
|
||||
QString filter = sendAction->property("filter").toString();
|
||||
if (filter.length() > 0)
|
||||
wsApp->clipboard()->setText(filter);
|
||||
mainApp->clipboard()->setText(filter);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <ui/qt/widgets/capture_filter_edit.h>
|
||||
#include <ui/qt/widgets/display_filter_edit.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
FilterDialog::FilterDialog(QWidget *parent, FilterType filter_type, QString new_filter_) :
|
||||
GeometryStateDialog(parent),
|
||||
|
@ -39,7 +39,7 @@ FilterDialog::FilterDialog(QWidget *parent, FilterType filter_type, QString new_
|
|||
ui->setupUi(this);
|
||||
|
||||
if (parent) loadGeometry(parent->width() * 2 / 3, parent->height() * 2 / 3);
|
||||
setWindowIcon(wsApp->normalIcon());
|
||||
setWindowIcon(mainApp->normalIcon());
|
||||
|
||||
ui->newToolButton->setStockIcon("list-add");
|
||||
ui->deleteToolButton->setStockIcon("list-remove");
|
||||
|
@ -65,12 +65,12 @@ FilterDialog::FilterDialog(QWidget *parent, FilterType filter_type, QString new_
|
|||
const gchar * filename = NULL;
|
||||
QString newFilterText;
|
||||
if (filter_type == CaptureFilter) {
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Capture Filters")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Capture Filters")));
|
||||
filename = CFILTER_FILE_NAME;
|
||||
newFilterText = tr("New capture filter");
|
||||
model_ = new FilterListModel(FilterListModel::Capture, this);
|
||||
} else {
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Display Filters")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Display Filters")));
|
||||
filename = DFILTER_FILE_NAME;
|
||||
newFilterText = tr("New display filter");
|
||||
model_ = new FilterListModel(FilterListModel::Display, this);
|
||||
|
@ -176,18 +176,18 @@ void FilterDialog::on_buttonBox_accepted()
|
|||
model_->saveList();
|
||||
|
||||
if (filter_type_ == CaptureFilter) {
|
||||
wsApp->emitAppSignal(WiresharkApplication::CaptureFilterListChanged);
|
||||
mainApp->emitAppSignal(MainApplication::CaptureFilterListChanged);
|
||||
} else {
|
||||
wsApp->emitAppSignal(WiresharkApplication::DisplayFilterListChanged);
|
||||
mainApp->emitAppSignal(MainApplication::DisplayFilterListChanged);
|
||||
}
|
||||
}
|
||||
|
||||
void FilterDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
if (filter_type_ == CaptureFilter) {
|
||||
wsApp->helpTopicAction(HELP_CAPTURE_FILTERS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_CAPTURE_FILTERS_DIALOG);
|
||||
} else {
|
||||
wsApp->helpTopicAction(HELP_DISPLAY_FILTERS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_DISPLAY_FILTERS_DIALOG);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <ui/qt/models/uat_model.h>
|
||||
#include <ui/qt/models/pref_models.h>
|
||||
#include <ui/qt/wireshark_application.h>
|
||||
#include <ui/qt/main_application.h>
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QKeyEvent>
|
||||
|
@ -170,11 +170,11 @@ void FilterExpressionFrame::keyPressEvent(QKeyEvent *event)
|
|||
if (ui->buttonBox->button(QDialogButtonBox::Ok)->isEnabled()) {
|
||||
on_buttonBox_accepted();
|
||||
} else if (ui->labelLineEdit->text().length() == 0) {
|
||||
wsApp->pushStatus(WiresharkApplication::FilterSyntax, tr("Missing label."));
|
||||
mainApp->pushStatus(MainApplication::FilterSyntax, tr("Missing label."));
|
||||
} else if (ui->displayFilterLineEdit->syntaxState() == SyntaxLineEdit::Empty) {
|
||||
wsApp->pushStatus(WiresharkApplication::FilterSyntax, tr("Missing filter expression."));
|
||||
mainApp->pushStatus(MainApplication::FilterSyntax, tr("Missing filter expression."));
|
||||
} else if (ui->displayFilterLineEdit->syntaxState() != SyntaxLineEdit::Valid) {
|
||||
wsApp->pushStatus(WiresharkApplication::FilterSyntax, tr("Invalid filter expression."));
|
||||
mainApp->pushStatus(MainApplication::FilterSyntax, tr("Invalid filter expression."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "wsutil/file_util.h"
|
||||
#include "wsutil/utf8_entities.h"
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
#include <QClipboard>
|
||||
|
@ -172,7 +172,7 @@ void FirewallRulesDialog::on_buttonBox_clicked(QAbstractButton *button)
|
|||
.arg(firewall_product_name(prod_));
|
||||
QByteArray file_name = WiresharkFileDialog::getSaveFileName(this,
|
||||
save_title,
|
||||
wsApp->lastOpenDir().canonicalPath(),
|
||||
mainApp->lastOpenDir().canonicalPath(),
|
||||
tr("Text file (*.txt);;All Files (" ALL_FILES_WILDCARD ")")
|
||||
).toUtf8();
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -189,18 +189,18 @@ void FirewallRulesDialog::on_buttonBox_clicked(QAbstractButton *button)
|
|||
}
|
||||
|
||||
/* Save the directory name for future file dialogs. */
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
} else if (button == ui->buttonBox->button(QDialogButtonBox::Apply)) {
|
||||
if (ui->textBrowser->textCursor().hasSelection()) {
|
||||
ui->textBrowser->copy();
|
||||
} else {
|
||||
wsApp->clipboard()->setText(ui->textBrowser->toPlainText());
|
||||
mainApp->clipboard()->setText(ui->textBrowser->toPlainText());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FirewallRulesDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_FIREWALL_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_FIREWALL_DIALOG);
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "follow_stream_dialog.h"
|
||||
#include <ui_follow_stream_dialog.h>
|
||||
|
||||
#include "main_application.h"
|
||||
#include "main_window.h"
|
||||
#include "wireshark_application.h"
|
||||
|
||||
#include "frame_tvbuff.h"
|
||||
#include "epan/follow.h"
|
||||
|
@ -307,7 +307,7 @@ void FollowStreamDialog::findText(bool go_back)
|
|||
|
||||
void FollowStreamDialog::saveAs()
|
||||
{
|
||||
QString file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Stream Content As…")));
|
||||
QString file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Stream Content As…")));
|
||||
if (file_name.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ void FollowStreamDialog::saveAs()
|
|||
|
||||
void FollowStreamDialog::helpButton()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_FOLLOW_STREAM_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_FOLLOW_STREAM_DIALOG);
|
||||
}
|
||||
|
||||
void FollowStreamDialog::backButton()
|
||||
|
@ -1269,7 +1269,7 @@ FollowStreamDialog::readFollowStream()
|
|||
return frs_return;
|
||||
if (elapsed_timer.elapsed() > info_update_freq_) {
|
||||
fillHintLabel(ui->teStreamContent->textCursor().position());
|
||||
wsApp->processEvents();
|
||||
mainApp->processEvents();
|
||||
elapsed_timer.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <ui/qt/models/pref_models.h>
|
||||
#include <ui_font_color_preferences_frame.h>
|
||||
#include <ui/qt/utils/color_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <functional>
|
||||
#include <QFontDialog>
|
||||
|
@ -70,7 +70,7 @@ void FontColorPreferencesFrame::showEvent(QShowEvent *)
|
|||
QString pangram = QString(font_pangrams_[g_rand_int_range(rand_state, 0, num_font_pangrams_)]) + " 0123456789";
|
||||
ui->fontSampleLineEdit->setText(pangram);
|
||||
ui->fontSampleLineEdit->setCursorPosition(0);
|
||||
ui->fontSampleLineEdit->setMinimumWidth(wsApp->monospaceTextSize(pangram.toUtf8().constData()) + wsApp->monospaceTextSize(" "));
|
||||
ui->fontSampleLineEdit->setMinimumWidth(mainApp->monospaceTextSize(pangram.toUtf8().constData()) + mainApp->monospaceTextSize(" "));
|
||||
g_rand_free(rand_state);
|
||||
|
||||
updateWidgets();
|
||||
|
@ -317,7 +317,7 @@ void FontColorPreferencesFrame::colorChanged(pref_t *pref, const QColor &cc)
|
|||
void FontColorPreferencesFrame::on_fontPushButton_clicked()
|
||||
{
|
||||
bool ok;
|
||||
QFont new_font = QFontDialog::getFont(&ok, cur_font_, this, wsApp->windowTitleString(tr("Font")));
|
||||
QFont new_font = QFontDialog::getFont(&ok, cur_font_, this, mainApp->windowTitleString(tr("Font")));
|
||||
if (ok) {
|
||||
prefs_set_string_value(pref_qt_gui_font_name_, new_font.toString().toStdString().c_str(), pref_stashed);
|
||||
cur_font_ = new_font;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
// To do:
|
||||
// - Handle menu paths. Do we create a new path (GTK+) or use the base element?
|
||||
|
@ -196,12 +196,12 @@ void FunnelStatistics::reloadPackets()
|
|||
void FunnelStatistics::redissectPackets()
|
||||
{
|
||||
// This will trigger a packet redissection.
|
||||
wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->emitAppSignal(MainApplication::PacketDissectionChanged);
|
||||
}
|
||||
|
||||
void FunnelStatistics::reloadLuaPlugins()
|
||||
{
|
||||
wsApp->reloadLuaPluginsDelayed();
|
||||
mainApp->reloadLuaPluginsDelayed();
|
||||
}
|
||||
|
||||
void FunnelStatistics::emitApplyDisplayFilter()
|
||||
|
@ -261,7 +261,7 @@ void funnel_statistics_retap_packets(funnel_ops_id_t *ops_id) {
|
|||
}
|
||||
|
||||
void funnel_statistics_copy_to_clipboard(GString *text) {
|
||||
wsApp->clipboard()->setText(text->str);
|
||||
mainApp->clipboard()->setText(text->str);
|
||||
}
|
||||
|
||||
const gchar *funnel_statistics_get_filter(funnel_ops_id_t *ops_id) {
|
||||
|
@ -356,11 +356,11 @@ static void register_menu_cb(const char *name,
|
|||
gpointer callback_data,
|
||||
gboolean retap)
|
||||
{
|
||||
FunnelAction *funnel_action = new FunnelAction(name, callback, callback_data, retap, wsApp);
|
||||
FunnelAction *funnel_action = new FunnelAction(name, callback, callback_data, retap, mainApp);
|
||||
if (menus_registered) {
|
||||
wsApp->appendDynamicMenuGroupItem(group, funnel_action);
|
||||
mainApp->appendDynamicMenuGroupItem(group, funnel_action);
|
||||
} else {
|
||||
wsApp->addDynamicMenuGroupItem(group, funnel_action);
|
||||
mainApp->addDynamicMenuGroupItem(group, funnel_action);
|
||||
}
|
||||
if (!funnel_actions_.contains(group)) {
|
||||
funnel_actions_[group] = QList<FunnelAction *>();
|
||||
|
@ -377,7 +377,7 @@ static void deregister_menu_cb(funnel_menu_callback callback)
|
|||
if (funnel_action->callback() == callback) {
|
||||
// Must set back to title to find the correct sub-menu in Tools
|
||||
funnel_action->setText(funnel_action->title());
|
||||
wsApp->removeDynamicMenuGroupItem(group, funnel_action);
|
||||
mainApp->removeDynamicMenuGroupItem(group, funnel_action);
|
||||
it = funnel_actions_[group].erase(it);
|
||||
} else {
|
||||
++it;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <QLineEdit>
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
// Helper object used for sending close signal to open dialogs from a C function
|
||||
static FunnelStringDialogHelper dialog_helper_;
|
||||
|
@ -28,7 +28,7 @@ FunnelStringDialog::FunnelStringDialog(QWidget *parent, const QString title, con
|
|||
dialog_cb_data_free_(dialog_data_free_cb)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowTitle(wsApp->windowTitleString(title));
|
||||
setWindowTitle(mainApp->windowTitleString(title));
|
||||
int one_em = fontMetrics().height();
|
||||
|
||||
int row = 0;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <QTextCursor>
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
// To do:
|
||||
// - Add "Find next" to highlighting.
|
||||
|
@ -35,11 +35,11 @@ FunnelTextDialog::FunnelTextDialog(QWidget *parent, const QString &title) :
|
|||
if (!title.isEmpty()) {
|
||||
loadGeometry(0, 0, QString("Funnel %1").arg(title));
|
||||
}
|
||||
setWindowTitle(wsApp->windowTitleString(title));
|
||||
setWindowTitle(mainApp->windowTitleString(title));
|
||||
|
||||
funnel_text_window_.funnel_text_dialog = this;
|
||||
|
||||
ui->textEdit->setFont(wsApp->monospaceFont());
|
||||
ui->textEdit->setFont(mainApp->monospaceFont());
|
||||
ui->textEdit->setReadOnly(true);
|
||||
ui->textEdit->setAcceptRichText(false);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "ui/simple_dialog.h"
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QTextStream>
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <ui/qt/utils/color_utils.h>
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <ui/qt/utils/stock_icon.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
/*
|
||||
|
@ -551,7 +551,7 @@ void Iax2AnalysisDialog::on_actionSaveGraph_triggered()
|
|||
ui->tabWidget->setCurrentWidget(ui->graphTab);
|
||||
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString pdf_filter = tr("Portable Document Format (*.pdf)");
|
||||
QString png_filter = tr("Portable Network Graphics (*.png)");
|
||||
QString bmp_filter = tr("Windows Bitmap (*.bmp)");
|
||||
|
@ -567,7 +567,7 @@ void Iax2AnalysisDialog::on_actionSaveGraph_triggered()
|
|||
if (!file_closed_) {
|
||||
save_file += QString("/%1").arg(cap_file_.fileBaseName());
|
||||
}
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Graph As…")),
|
||||
save_file, filter, &extension);
|
||||
|
||||
if (!file_name.isEmpty()) {
|
||||
|
@ -586,14 +586,14 @@ void Iax2AnalysisDialog::on_actionSaveGraph_triggered()
|
|||
// ui->streamGraph->legend->setVisible(false);
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Iax2AnalysisDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_IAX2_ANALYSIS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_IAX2_ANALYSIS_DIALOG);
|
||||
}
|
||||
|
||||
void Iax2AnalysisDialog::tapReset(void *tapinfoptr)
|
||||
|
@ -877,7 +877,7 @@ void Iax2AnalysisDialog::saveAudio(Iax2AnalysisDialog::StreamDirection direction
|
|||
}
|
||||
QString sel_filter;
|
||||
QString file_path = WiresharkFileDialog::getSaveFileName(
|
||||
this, caption, wsApp->lastOpenDir().absoluteFilePath("Saved RTP Audio.au"),
|
||||
this, caption, mainApp->lastOpenDir().absoluteFilePath("Saved RTP Audio.au"),
|
||||
ext_filter, &sel_filter);
|
||||
|
||||
if (file_path.isEmpty()) return;
|
||||
|
@ -1147,7 +1147,7 @@ void Iax2AnalysisDialog::saveCsv(Iax2AnalysisDialog::StreamDirection direction)
|
|||
}
|
||||
|
||||
QString file_path = WiresharkFileDialog::getSaveFileName(
|
||||
this, caption, wsApp->lastOpenDir().absoluteFilePath("RTP Packet Data.csv"),
|
||||
this, caption, mainApp->lastOpenDir().absoluteFilePath("RTP Packet Data.csv"),
|
||||
tr("Comma-separated values (*.csv)"));
|
||||
|
||||
if (file_path.isEmpty()) return;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "wsutil/filesystem.h"
|
||||
|
||||
#include <ui_import_text_dialog.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
|
@ -76,7 +76,7 @@ ImportTextDialog::ImportTextDialog(QWidget *parent) :
|
|||
int file_type_subtype;
|
||||
|
||||
ti_ui_->setupUi(this);
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Import From Hex Dump")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Import From Hex Dump")));
|
||||
memset(&import_info_, 0, sizeof(import_info_));
|
||||
|
||||
import_button_ = ti_ui_->buttonBox->button(QDialogButtonBox::Open);
|
||||
|
@ -627,7 +627,7 @@ void ImportTextDialog::on_textFileBrowseButton_clicked()
|
|||
}
|
||||
}
|
||||
|
||||
QString file_name = WiresharkFileDialog::getOpenFileName(this, wsApp->windowTitleString(tr("Import Text File")), open_dir);
|
||||
QString file_name = WiresharkFileDialog::getOpenFileName(this, mainApp->windowTitleString(tr("Import Text File")), open_dir);
|
||||
ti_ui_->textFileLineEdit->setText(file_name);
|
||||
}
|
||||
|
||||
|
@ -1084,5 +1084,5 @@ void ImportTextDialog::on_maxLengthLineEdit_textChanged(const QString &max_frame
|
|||
|
||||
void ImportTextDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_IMPORT_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_IMPORT_DIALOG);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "ui/qt/interface_frame.h"
|
||||
#include <ui/qt/simple_dialog.h>
|
||||
#include <ui/qt/wireshark_application.h>
|
||||
#include <ui/qt/main_application.h>
|
||||
|
||||
#include <ui/qt/models/interface_tree_model.h>
|
||||
#include <ui/qt/models/sparkline_delegate.h>
|
||||
|
@ -106,8 +106,8 @@ InterfaceFrame::InterfaceFrame(QWidget * parent)
|
|||
ui->interfaceTree->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(ui->interfaceTree, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
|
||||
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(interfaceListChanged()));
|
||||
connect(wsApp, SIGNAL(localInterfaceListChanged()), this, SLOT(interfaceListChanged()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(interfaceListChanged()));
|
||||
connect(mainApp, SIGNAL(localInterfaceListChanged()), this, SLOT(interfaceListChanged()));
|
||||
|
||||
connect(ui->interfaceTree->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
|
||||
this, SLOT(interfaceTreeSelectionChanged(const QItemSelection &, const QItemSelection &)));
|
||||
|
@ -305,7 +305,7 @@ void InterfaceFrame::resetInterfaceTreeDisplay()
|
|||
// used if __APPLE__ is defined, so that it reflects the
|
||||
// new message text.
|
||||
//
|
||||
QString install_chmodbpf_path = wsApp->applicationDirPath() + "/../Resources/Extras/Install ChmodBPF.pkg";
|
||||
QString install_chmodbpf_path = mainApp->applicationDirPath() + "/../Resources/Extras/Install ChmodBPF.pkg";
|
||||
ui->warningLabel->setText(tr(
|
||||
"<p>"
|
||||
"You don't have permission to capture on local interfaces."
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "interface_toolbar.h"
|
||||
#include <ui/qt/widgets/interface_toolbar_lineedit.h>
|
||||
#include "simple_dialog.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <ui_interface_toolbar.h>
|
||||
|
||||
#include "capture_opts.h"
|
||||
|
@ -554,7 +554,7 @@ void InterfaceToolbar::controlReceived(QString ifname, int num, int command, QBy
|
|||
break;
|
||||
|
||||
case commandStatusMessage:
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, payload);
|
||||
mainApp->pushStatus(MainApplication::TemporaryStatus, payload);
|
||||
break;
|
||||
|
||||
case commandInformationMessage:
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <ui/qt/utils/color_utils.h>
|
||||
#include <ui/qt/widgets/qcustomplot.h>
|
||||
#include "progress_frame.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <wsutil/report_message.h>
|
||||
|
||||
#include <ui/qt/utils/tango_colors.h> //provides some default colors
|
||||
|
@ -1499,14 +1499,14 @@ void IOGraphDialog::on_actionCrosshairs_triggered()
|
|||
|
||||
void IOGraphDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_STATS_IO_GRAPH_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_STATS_IO_GRAPH_DIALOG);
|
||||
}
|
||||
|
||||
// XXX - We have similar code in tcp_stream_dialog and packet_diagram. Should this be a common routine?
|
||||
void IOGraphDialog::on_buttonBox_accepted()
|
||||
{
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString pdf_filter = tr("Portable Document Format (*.pdf)");
|
||||
QString png_filter = tr("Portable Network Graphics (*.png)");
|
||||
QString bmp_filter = tr("Windows Bitmap (*.bmp)");
|
||||
|
@ -1524,7 +1524,7 @@ void IOGraphDialog::on_buttonBox_accepted()
|
|||
if (!file_closed_) {
|
||||
save_file += QString("/%1").arg(cap_file_.fileBaseName());
|
||||
}
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Graph As…")),
|
||||
save_file, filter, &extension);
|
||||
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -1542,7 +1542,7 @@ void IOGraphDialog::on_buttonBox_accepted()
|
|||
}
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1590,7 +1590,7 @@ void IOGraphDialog::copyAsCsvClicked()
|
|||
QString csv;
|
||||
QTextStream stream(&csv, QIODevice::Text);
|
||||
makeCsv(stream);
|
||||
wsApp->clipboard()->setText(stream.readAll());
|
||||
mainApp->clipboard()->setText(stream.readAll());
|
||||
}
|
||||
|
||||
bool IOGraphDialog::saveCsv(const QString &file_name) const
|
||||
|
@ -2249,7 +2249,7 @@ void IOGraph::tapDraw(void *iog_ptr)
|
|||
|
||||
static void
|
||||
io_graph_init(const char *, void*) {
|
||||
wsApp->emitStatCommandSignal("IOGraph", NULL, NULL);
|
||||
mainApp->emitStatCommandSignal("IOGraph", NULL, NULL);
|
||||
}
|
||||
|
||||
static stat_tap_ui io_stat_ui = {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "file.h"
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QMenu>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "file.h"
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QMessageBox>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "file.h"
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QMessageBox>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <QTreeWidgetItem>
|
||||
|
||||
#include <ui/qt/models/percent_bar_delegate.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
// TODO: have never tested in a live capture.
|
||||
|
||||
|
@ -903,7 +903,7 @@ lte_mac_statistics_init(const char *args, void*) {
|
|||
if (args_l.length() > 2) {
|
||||
filter = QStringList(args_l.mid(2)).join(",").toUtf8();
|
||||
}
|
||||
wsApp->emitStatCommandSignal("LteMacStatistics", filter.constData(), NULL);
|
||||
mainApp->emitStatCommandSignal("LteMacStatistics", filter.constData(), NULL);
|
||||
}
|
||||
|
||||
static stat_tap_ui lte_mac_statistics_ui = {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <wsutil/utf8_entities.h>
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "simple_dialog.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
|
@ -850,7 +850,7 @@ void LteRlcGraphDialog::on_otherDirectionButton_clicked()
|
|||
void LteRlcGraphDialog::on_buttonBox_accepted()
|
||||
{
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString pdf_filter = tr("Portable Document Format (*.pdf)");
|
||||
QString png_filter = tr("Portable Network Graphics (*.png)");
|
||||
QString bmp_filter = tr("Windows Bitmap (*.bmp)");
|
||||
|
@ -862,7 +862,7 @@ void LteRlcGraphDialog::on_buttonBox_accepted()
|
|||
.arg(bmp_filter)
|
||||
.arg(jpeg_filter);
|
||||
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Graph As…")),
|
||||
path.canonicalPath(), filter, &extension);
|
||||
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -878,7 +878,7 @@ void LteRlcGraphDialog::on_buttonBox_accepted()
|
|||
}
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <QTreeWidgetItem>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include "ui/recent.h"
|
||||
|
||||
|
@ -985,7 +985,7 @@ lte_rlc_statistics_init(const char *args, void*) {
|
|||
if (args_l.length() > 2) {
|
||||
filter = QStringList(args_l.mid(2)).join(",").toUtf8();
|
||||
}
|
||||
wsApp->emitStatCommandSignal("LteRlcStatistics", filter.constData(), NULL);
|
||||
mainApp->emitStatCommandSignal("LteRlcStatistics", filter.constData(), NULL);
|
||||
}
|
||||
|
||||
static stat_tap_ui lte_rlc_statistics_ui = {
|
||||
|
|
|
@ -262,18 +262,18 @@ gather_wireshark_runtime_info(feature_list l)
|
|||
gather_airpcap_runtime_info(l);
|
||||
#endif
|
||||
|
||||
if (wsApp) {
|
||||
if (mainApp) {
|
||||
// Display information
|
||||
const char *display_mode = ColorUtils::themeIsDark() ? "dark" : "light";
|
||||
with_feature(l, "%s display mode", display_mode);
|
||||
|
||||
int hidpi_count = 0;
|
||||
foreach (QScreen *screen, wsApp->screens()) {
|
||||
foreach (QScreen *screen, mainApp->screens()) {
|
||||
if (screen->devicePixelRatio() > 1.0) {
|
||||
hidpi_count++;
|
||||
}
|
||||
}
|
||||
if (hidpi_count == wsApp->screens().count()) {
|
||||
if (hidpi_count == mainApp->screens().count()) {
|
||||
with_feature(l, "HiDPI");
|
||||
} else if (hidpi_count) {
|
||||
with_feature(l, "mixed DPI");
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,238 @@
|
|||
/** @file
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
* Copyright 1998 Gerald Combs
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef MAIN_APPLICATION_H
|
||||
#define MAIN_APPLICATION_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "wsutil/feature_list.h"
|
||||
|
||||
#include "epan/register.h"
|
||||
|
||||
#include "ui/help_url.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QFont>
|
||||
#include <QIcon>
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
|
||||
#include "capture_event.h"
|
||||
|
||||
struct _e_prefs;
|
||||
|
||||
class QAction;
|
||||
class QSocketNotifier;
|
||||
|
||||
// Recent items:
|
||||
// - Read from prefs
|
||||
// - Add from open file
|
||||
// - Check current list
|
||||
// - Signal updated item
|
||||
// -
|
||||
typedef struct _recent_item_status {
|
||||
QString filename;
|
||||
qint64 size;
|
||||
bool accessible;
|
||||
bool in_thread;
|
||||
} recent_item_status;
|
||||
|
||||
class MainApplication : public QApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MainApplication(int &argc, char **argv);
|
||||
~MainApplication();
|
||||
|
||||
enum AppSignal {
|
||||
CaptureFilterListChanged,
|
||||
ColumnsChanged,
|
||||
DisplayFilterListChanged,
|
||||
FieldsChanged,
|
||||
FilterExpressionsChanged,
|
||||
LocalInterfacesChanged,
|
||||
NameResolutionChanged,
|
||||
PacketDissectionChanged,
|
||||
PreferencesChanged,
|
||||
ProfileChanging,
|
||||
RecentCapturesChanged,
|
||||
RecentPreferencesRead
|
||||
};
|
||||
|
||||
enum MainMenuItem {
|
||||
FileOpenDialog,
|
||||
CaptureOptionsDialog
|
||||
};
|
||||
|
||||
enum StatusInfo {
|
||||
FilterSyntax,
|
||||
FieldStatus,
|
||||
FileStatus,
|
||||
BusyStatus,
|
||||
ByteStatus,
|
||||
TemporaryStatus
|
||||
};
|
||||
|
||||
void registerUpdate(register_action_e action, const char *message);
|
||||
void emitAppSignal(AppSignal signal);
|
||||
// Emitting app signals (PacketDissectionChanged in particular) from
|
||||
// dialogs on macOS can be problematic. Dialogs should call queueAppSignal
|
||||
// instead.
|
||||
void queueAppSignal(AppSignal signal) { app_signals_ << signal; }
|
||||
void emitStatCommandSignal(const QString &menu_path, const char *arg, void *userdata);
|
||||
void emitTapParameterSignal(const QString cfg_abbr, const QString arg, void *userdata);
|
||||
void addDynamicMenuGroupItem(int group, QAction *sg_action);
|
||||
void appendDynamicMenuGroupItem(int group, QAction *sg_action);
|
||||
void removeDynamicMenuGroupItem(int group, QAction *sg_action);
|
||||
QList<QAction *> dynamicMenuGroupItems(int group);
|
||||
QList<QAction *> addedMenuGroupItems(int group);
|
||||
QList<QAction *> removedMenuGroupItems(int group);
|
||||
void clearAddedMenuGroupItems();
|
||||
void clearRemovedMenuGroupItems();
|
||||
|
||||
void allSystemsGo();
|
||||
void emitLocalInterfaceEvent(const char *ifname, int added, int up);
|
||||
void refreshLocalInterfaces();
|
||||
struct _e_prefs * readConfigurationFiles(bool reset);
|
||||
QList<recent_item_status *> recentItems() const;
|
||||
void addRecentItem(const QString filename, qint64 size, bool accessible);
|
||||
void removeRecentItem(const QString &filename);
|
||||
QDir lastOpenDir();
|
||||
void setLastOpenDir(const char *dir_name);
|
||||
void setLastOpenDirFromFilename(QString file_name);
|
||||
void helpTopicAction(topic_action_e action);
|
||||
const QFont monospaceFont(bool zoomed = false) const;
|
||||
void setMonospaceFont(const char *font_string);
|
||||
int monospaceTextSize(const char *str);
|
||||
void setConfigurationProfile(const gchar *profile_name, bool write_recent_file = true);
|
||||
void reloadLuaPluginsDelayed();
|
||||
bool isInitialized() { return initialized_; }
|
||||
void setReloadingLua(bool is_reloading) { is_reloading_lua_ = is_reloading; }
|
||||
bool isReloadingLua() { return is_reloading_lua_; }
|
||||
const QIcon &normalIcon();
|
||||
const QIcon &captureIcon();
|
||||
const QString &windowTitleSeparator() const { return window_title_separator_; }
|
||||
const QString windowTitleString(QStringList title_parts);
|
||||
const QString windowTitleString(QString title_part) { return windowTitleString(QStringList() << title_part); }
|
||||
void applyCustomColorsFromRecent();
|
||||
#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
|
||||
void rejectSoftwareUpdate() { software_update_ok_ = false; }
|
||||
bool softwareUpdateCanShutdown();
|
||||
void softwareUpdateShutdownRequest();
|
||||
#endif
|
||||
QWidget *mainWindow();
|
||||
|
||||
QTranslator translator;
|
||||
QTranslator translatorQt;
|
||||
void loadLanguage(const QString language);
|
||||
|
||||
void doTriggerMenuItem(MainMenuItem menuItem);
|
||||
|
||||
void zoomTextFont(int zoomLevel);
|
||||
|
||||
void pushStatus(StatusInfo sinfo, const QString &message, const QString &messagetip = QString());
|
||||
void popStatus(StatusInfo sinfo);
|
||||
|
||||
void gotoFrame(int frameNum);
|
||||
|
||||
private:
|
||||
bool initialized_;
|
||||
bool is_reloading_lua_;
|
||||
QFont mono_font_;
|
||||
QFont zoomed_font_;
|
||||
QTimer recent_timer_;
|
||||
QTimer packet_data_timer_;
|
||||
QTimer tap_update_timer_;
|
||||
QList<QString> pending_open_files_;
|
||||
QSocketNotifier *if_notifier_;
|
||||
QIcon normal_icon_;
|
||||
QIcon capture_icon_;
|
||||
static QString window_title_separator_;
|
||||
QList<AppSignal> app_signals_;
|
||||
int active_captures_;
|
||||
#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
|
||||
bool software_update_ok_;
|
||||
#endif
|
||||
|
||||
void storeCustomColorsInRecent();
|
||||
void clearDynamicMenuGroupItems();
|
||||
void initializeIcons();
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event);
|
||||
|
||||
signals:
|
||||
void appInitialized();
|
||||
void localInterfaceEvent(const char *ifname, int added, int up);
|
||||
void localInterfaceListChanged();
|
||||
void openCaptureFile(QString cf_path, QString display_filter, unsigned int type);
|
||||
void openCaptureOptions();
|
||||
void recentPreferencesRead();
|
||||
void updateRecentCaptureStatus(const QString &filename, qint64 size, bool accessible);
|
||||
void splashUpdate(register_action_e action, const char *message);
|
||||
void profileChanging();
|
||||
void profileNameChanged(const gchar *profile_name);
|
||||
|
||||
void columnsChanged(); // XXX This recreates the packet list. We might want to rename it accordingly.
|
||||
void captureFilterListChanged();
|
||||
void displayFilterListChanged();
|
||||
void filterExpressionsChanged();
|
||||
void packetDissectionChanged();
|
||||
void preferencesChanged();
|
||||
void addressResolutionChanged();
|
||||
void columnDataChanged();
|
||||
void checkDisplayFilter();
|
||||
void fieldsChanged();
|
||||
void reloadLuaPlugins();
|
||||
#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
|
||||
// Each of these are called from a separate thread.
|
||||
void softwareUpdateRequested();
|
||||
void softwareUpdateClose();
|
||||
void softwareUpdateQuit();
|
||||
#endif
|
||||
|
||||
void openStatCommandDialog(const QString &menu_path, const char *arg, void *userdata);
|
||||
void openTapParameterDialog(const QString cfg_str, const QString arg, void *userdata);
|
||||
|
||||
/* Signals activation and stop of a capture. The value provides the number of active captures */
|
||||
void captureActive(int);
|
||||
|
||||
void zoomRegularFont(const QFont & font);
|
||||
void zoomMonospaceFont(const QFont & font);
|
||||
|
||||
public slots:
|
||||
void clearRecentCaptures();
|
||||
void refreshRecentCaptures();
|
||||
|
||||
void captureEventHandler(CaptureEvent);
|
||||
|
||||
// Flush queued app signals. Should be called from the main window after
|
||||
// each dialog that calls queueAppSignal closes.
|
||||
void flushAppSignals();
|
||||
|
||||
private slots:
|
||||
void updateTaps();
|
||||
|
||||
void cleanup();
|
||||
void ifChangeEventsAvailable();
|
||||
void itemStatusFinished(const QString filename = "", qint64 size = 0, bool accessible = false);
|
||||
void refreshPacketData();
|
||||
};
|
||||
|
||||
extern MainApplication *mainApp;
|
||||
|
||||
/** Global compile time version info */
|
||||
extern void gather_wireshark_qt_compiled_info(feature_list l);
|
||||
/** Global runtime version info */
|
||||
extern void gather_wireshark_runtime_info(feature_list l);
|
||||
#endif // MAIN_APPLICATION_H
|
|
@ -64,7 +64,7 @@ statusbar_push_temporary_msg(const gchar *msg_format, ...)
|
|||
push_msg = QString::vasprintf(msg_format, ap);
|
||||
va_end(ap);
|
||||
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, push_msg);
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, push_msg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -167,11 +167,11 @@ MainStatusBar::MainStatusBar(QWidget *parent) :
|
|||
progress_frame_.enableTaskbarUpdates(true);
|
||||
#endif
|
||||
|
||||
connect(wsApp, SIGNAL(appInitialized()), splitter, SLOT(show()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(appInitialized()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), splitter, SLOT(show()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(appInitialized()));
|
||||
connect(&info_status_, SIGNAL(toggleTemporaryFlash(bool)),
|
||||
this, SLOT(toggleBackground(bool)));
|
||||
connect(wsApp, SIGNAL(profileNameChanged(const gchar *)),
|
||||
connect(mainApp, SIGNAL(profileNameChanged(const gchar *)),
|
||||
this, SLOT(setProfileName()));
|
||||
connect(&profile_status_, SIGNAL(clickedAt(QPoint,Qt::MouseButton)),
|
||||
this, SLOT(showProfileMenu(QPoint,Qt::MouseButton)));
|
||||
|
@ -352,7 +352,7 @@ void MainStatusBar::setProfileName()
|
|||
void MainStatusBar::appInitialized()
|
||||
{
|
||||
setProfileName();
|
||||
connect(wsApp->mainWindow(), SIGNAL(framesSelected(QList<int>)), this, SLOT(selectedFrameChanged(QList<int>)));
|
||||
connect(mainApp->mainWindow(), SIGNAL(framesSelected(QList<int>)), this, SLOT(selectedFrameChanged(QList<int>)));
|
||||
}
|
||||
|
||||
void MainStatusBar::selectedFrameChanged(QList<int>)
|
||||
|
@ -365,7 +365,7 @@ void MainStatusBar::showCaptureStatistics()
|
|||
QString packets_str;
|
||||
|
||||
QList<int> rows;
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(wsApp->mainWindow());
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(mainApp->mainWindow());
|
||||
if (mw)
|
||||
rows = mw->selectedRows(true);
|
||||
|
||||
|
@ -607,7 +607,7 @@ void MainStatusBar::switchToProfile()
|
|||
|
||||
if (pa && pa->property("profile_name").isValid()) {
|
||||
QString profile = pa->property("profile_name").toString();
|
||||
wsApp->setConfigurationProfile(profile.toUtf8().constData());
|
||||
mainApp->setConfigurationProfile(profile.toUtf8().constData());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ private slots:
|
|||
void manageProfile();
|
||||
void showProfileMenu(const QPoint &global_pos, Qt::MouseButton button);
|
||||
|
||||
friend WiresharkApplication;
|
||||
friend MainApplication;
|
||||
};
|
||||
|
||||
#endif // MAIN_STATUS_BAR_H
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "main_application.h"
|
||||
#include "main_window.h"
|
||||
|
||||
/*
|
||||
|
@ -67,7 +68,6 @@ DIAG_ON(frame-larger-than=)
|
|||
#include "tap_parameter_dialog.h"
|
||||
#include "wireless_frame.h"
|
||||
#include <ui/qt/widgets/wireless_timeline.h>
|
||||
#include "wireshark_application.h"
|
||||
|
||||
#include <ui/qt/widgets/additional_toolbar.h>
|
||||
#include <ui/qt/widgets/display_filter_edit.h>
|
||||
|
@ -129,8 +129,8 @@ DIAG_OFF_CAST_AWAY_CONST
|
|||
{
|
||||
unsigned int changed_flags = prefs_store_ext(module_name, pref_name, pref_value);
|
||||
if (changed_flags) {
|
||||
wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
wsApp->emitAppSignal(WiresharkApplication::PreferencesChanged);
|
||||
mainApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->emitAppSignal(WiresharkApplication::PreferencesChanged);
|
||||
}
|
||||
}
|
||||
DIAG_ON_CAST_AWAY_CONST
|
||||
|
@ -349,9 +349,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
#endif
|
||||
{
|
||||
if (!gbl_cur_main_window_) {
|
||||
connect(wsApp, SIGNAL(openStatCommandDialog(QString, const char*, void*)),
|
||||
connect(mainApp, SIGNAL(openStatCommandDialog(QString, const char*, void*)),
|
||||
this, SLOT(openStatCommandDialog(QString, const char*, void*)));
|
||||
connect(wsApp, SIGNAL(openTapParameterDialog(QString, const QString, void*)),
|
||||
connect(mainApp, SIGNAL(openTapParameterDialog(QString, const QString, void*)),
|
||||
this, SLOT(openTapParameterDialog(QString, const QString, void*)));
|
||||
}
|
||||
gbl_cur_main_window_ = this;
|
||||
|
@ -375,7 +375,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
main_ui_->menuView->removeAction(main_ui_->actionViewWirelessToolbar);
|
||||
#endif
|
||||
|
||||
setWindowIcon(wsApp->normalIcon());
|
||||
setWindowIcon(mainApp->normalIcon());
|
||||
setTitlebarForCaptureFile();
|
||||
setMenusForCaptureFile();
|
||||
setForCapturedPackets(false);
|
||||
|
@ -396,30 +396,30 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
//To prevent users use features before initialization complete
|
||||
//Otherwise unexpected problems may occur
|
||||
setFeaturesEnabled(false);
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(setFeaturesEnabled()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(applyGlobalCommandLineOptions()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(zoomText()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(initViewColorizeMenu()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(addStatsPluginsToMenu()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(addDynamicMenus()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(addPluginIFStructures()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(initConversationMenus()));
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(initExportObjectsMenus()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(setFeaturesEnabled()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(applyGlobalCommandLineOptions()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(zoomText()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(initViewColorizeMenu()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(addStatsPluginsToMenu()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(addDynamicMenus()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(addPluginIFStructures()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(initConversationMenus()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(initExportObjectsMenus()));
|
||||
|
||||
connect(wsApp, SIGNAL(profileChanging()), this, SLOT(saveWindowGeometry()));
|
||||
connect(wsApp, SIGNAL(preferencesChanged()), this, SLOT(layoutPanes()));
|
||||
connect(wsApp, SIGNAL(preferencesChanged()), this, SLOT(layoutToolbars()));
|
||||
connect(wsApp, SIGNAL(preferencesChanged()), this, SLOT(updatePreferenceActions()));
|
||||
connect(wsApp, SIGNAL(preferencesChanged()), this, SLOT(zoomText()));
|
||||
connect(wsApp, SIGNAL(preferencesChanged()), this, SLOT(setTitlebarForCaptureFile()));
|
||||
connect(mainApp, SIGNAL(profileChanging()), this, SLOT(saveWindowGeometry()));
|
||||
connect(mainApp, SIGNAL(preferencesChanged()), this, SLOT(layoutPanes()));
|
||||
connect(mainApp, SIGNAL(preferencesChanged()), this, SLOT(layoutToolbars()));
|
||||
connect(mainApp, SIGNAL(preferencesChanged()), this, SLOT(updatePreferenceActions()));
|
||||
connect(mainApp, SIGNAL(preferencesChanged()), this, SLOT(zoomText()));
|
||||
connect(mainApp, SIGNAL(preferencesChanged()), this, SLOT(setTitlebarForCaptureFile()));
|
||||
|
||||
connect(wsApp, SIGNAL(updateRecentCaptureStatus(const QString &, qint64, bool)), this, SLOT(updateRecentCaptures()));
|
||||
connect(mainApp, SIGNAL(updateRecentCaptureStatus(const QString &, qint64, bool)), this, SLOT(updateRecentCaptures()));
|
||||
updateRecentCaptures();
|
||||
|
||||
#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
|
||||
connect(wsApp, SIGNAL(softwareUpdateRequested()), this, SLOT(softwareUpdateRequested()),
|
||||
connect(mainApp, SIGNAL(softwareUpdateRequested()), this, SLOT(softwareUpdateRequested()),
|
||||
Qt::BlockingQueuedConnection);
|
||||
connect(wsApp, SIGNAL(softwareUpdateClose()), this, SLOT(close()),
|
||||
connect(mainApp, SIGNAL(softwareUpdateClose()), this, SLOT(close()),
|
||||
Qt::BlockingQueuedConnection);
|
||||
#endif
|
||||
|
||||
|
@ -541,7 +541,7 @@ main_ui_->goToLineEdit->setValidator(goToLineQiv);
|
|||
|
||||
connect(this, &MainWindow::fieldHighlight,
|
||||
main_ui_->statusBar, &MainStatusBar::highlightedFieldChanged);
|
||||
connect(wsApp, &WiresharkApplication::captureActive,
|
||||
connect(mainApp, &WiresharkApplication::captureActive,
|
||||
this, &MainWindow::captureActive);
|
||||
|
||||
byte_view_tab_ = new ByteViewTab(&master_split_);
|
||||
|
@ -564,26 +564,26 @@ main_ui_->goToLineEdit->setValidator(goToLineQiv);
|
|||
connect(&capture_file_, SIGNAL(captureEvent(CaptureEvent)),
|
||||
this, SLOT(captureEventHandler(CaptureEvent)));
|
||||
connect(&capture_file_, SIGNAL(captureEvent(CaptureEvent)),
|
||||
wsApp, SLOT(captureEventHandler(CaptureEvent)));
|
||||
mainApp, SLOT(captureEventHandler(CaptureEvent)));
|
||||
connect(&capture_file_, SIGNAL(captureEvent(CaptureEvent)),
|
||||
main_ui_->statusBar, SLOT(captureEventHandler(CaptureEvent)));
|
||||
|
||||
connect(wsApp, SIGNAL(columnsChanged()),
|
||||
connect(mainApp, SIGNAL(columnsChanged()),
|
||||
packet_list_, SLOT(columnsChanged()));
|
||||
connect(wsApp, SIGNAL(preferencesChanged()),
|
||||
connect(mainApp, SIGNAL(preferencesChanged()),
|
||||
packet_list_, SLOT(preferencesChanged()));
|
||||
connect(wsApp, SIGNAL(recentPreferencesRead()),
|
||||
connect(mainApp, SIGNAL(recentPreferencesRead()),
|
||||
this, SLOT(applyRecentPaneGeometry()));
|
||||
connect(wsApp, SIGNAL(recentPreferencesRead()),
|
||||
connect(mainApp, SIGNAL(recentPreferencesRead()),
|
||||
this, SLOT(updateRecentActions()));
|
||||
connect(wsApp, SIGNAL(packetDissectionChanged()),
|
||||
connect(mainApp, SIGNAL(packetDissectionChanged()),
|
||||
this, SLOT(redissectPackets()), Qt::QueuedConnection);
|
||||
|
||||
connect(wsApp, SIGNAL(checkDisplayFilter()),
|
||||
connect(mainApp, SIGNAL(checkDisplayFilter()),
|
||||
this, SLOT(checkDisplayFilter()));
|
||||
connect(wsApp, SIGNAL(fieldsChanged()),
|
||||
connect(mainApp, SIGNAL(fieldsChanged()),
|
||||
this, SLOT(fieldsChanged()));
|
||||
connect(wsApp, SIGNAL(reloadLuaPlugins()),
|
||||
connect(mainApp, SIGNAL(reloadLuaPlugins()),
|
||||
this, SLOT(reloadLuaPlugins()));
|
||||
|
||||
connect(main_ui_->mainStack, SIGNAL(currentChanged(int)),
|
||||
|
@ -615,9 +615,9 @@ main_ui_->goToLineEdit->setValidator(goToLineQiv);
|
|||
connect(this, &MainWindow::setCaptureFile,
|
||||
proto_tree_, &ProtoTree::setCaptureFile);
|
||||
|
||||
connect(wsApp, SIGNAL(zoomMonospaceFont(QFont)),
|
||||
connect(mainApp, SIGNAL(zoomMonospaceFont(QFont)),
|
||||
packet_list_, SLOT(setMonospaceFont(QFont)));
|
||||
connect(wsApp, SIGNAL(zoomMonospaceFont(QFont)),
|
||||
connect(mainApp, SIGNAL(zoomMonospaceFont(QFont)),
|
||||
proto_tree_, SLOT(setMonospaceFont(QFont)));
|
||||
|
||||
connect(main_ui_->actionGoNextPacket, SIGNAL(triggered()),
|
||||
|
@ -815,8 +815,8 @@ void MainWindow::addInterfaceToolbar(const iface_toolbar *toolbar_entry)
|
|||
menu->insertAction(before, action);
|
||||
|
||||
InterfaceToolbar *interface_toolbar = new InterfaceToolbar(this, toolbar_entry);
|
||||
connect(wsApp, SIGNAL(appInitialized()), interface_toolbar, SLOT(interfaceListChanged()));
|
||||
connect(wsApp, SIGNAL(localInterfaceListChanged()), interface_toolbar, SLOT(interfaceListChanged()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), interface_toolbar, SLOT(interfaceListChanged()));
|
||||
connect(mainApp, SIGNAL(localInterfaceListChanged()), interface_toolbar, SLOT(interfaceListChanged()));
|
||||
|
||||
QToolBar *toolbar = new QToolBar(this);
|
||||
toolbar->addWidget(interface_toolbar);
|
||||
|
@ -940,7 +940,7 @@ void MainWindow::keyPressEvent(QKeyEvent *event) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (wsApp->focusWidget() == main_ui_->goToLineEdit) {
|
||||
if (mainApp->focusWidget() == main_ui_->goToLineEdit) {
|
||||
if (event->modifiers() == Qt::NoModifier) {
|
||||
if (event->key() == Qt::Key_Escape) {
|
||||
on_goToCancel_clicked();
|
||||
|
@ -985,19 +985,19 @@ void MainWindow::closeEvent(QCloseEvent *event) {
|
|||
delete welcome_page_;
|
||||
|
||||
// One of the many places we assume one main window.
|
||||
if (!wsApp->isInitialized()) {
|
||||
if (!mainApp->isInitialized()) {
|
||||
// If we're still initializing, QCoreApplication::quit() won't
|
||||
// exit properly because we are not in the event loop. This
|
||||
// means that the application won't clean up after itself. We
|
||||
// might want to call wsApp->processEvents() during startup
|
||||
// might want to call mainApp->processEvents() during startup
|
||||
// instead so that we can do a normal exit here.
|
||||
exit(0);
|
||||
}
|
||||
wsApp->quit();
|
||||
mainApp->quit();
|
||||
// When the main loop is not yet running (i.e. when openCaptureFile is
|
||||
// executing in main.cpp), the above quit action has no effect.
|
||||
// Schedule a quit action for the next execution of the main loop.
|
||||
QMetaObject::invokeMethod(wsApp, "quit", Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(mainApp, "quit", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
// XXX On windows the drag description is "Copy". It should be "Open" or
|
||||
|
@ -1015,7 +1015,7 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event)
|
|||
// We could alternatively call setAcceptDrops(!capture_in_progress)
|
||||
// in setMenusForCaptureInProgress but that wouldn't provide feedback.
|
||||
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("Unable to drop files during capture."));
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("Unable to drop files during capture."));
|
||||
event->setDropAction(Qt::IgnoreAction);
|
||||
event->ignore();
|
||||
return;
|
||||
|
@ -1169,7 +1169,7 @@ void MainWindow::saveWindowGeometry()
|
|||
// shown and hidden.
|
||||
void MainWindow::freeze()
|
||||
{
|
||||
freeze_focus_ = wsApp->focusWidget();
|
||||
freeze_focus_ = mainApp->focusWidget();
|
||||
|
||||
// XXX Alternatively we could just disable and enable the main menu.
|
||||
for (int i = 0; i < freeze_actions_.size(); i++) {
|
||||
|
@ -1332,7 +1332,7 @@ void MainWindow::mergeCaptureFile()
|
|||
}
|
||||
|
||||
/* Save the name of the containing directory specified in the path name. */
|
||||
wsApp->setLastOpenDirFromFilename(tmpname);
|
||||
mainApp->setLastOpenDirFromFilename(tmpname);
|
||||
g_free(tmpname);
|
||||
main_ui_->statusBar->showExpert();
|
||||
return;
|
||||
|
@ -2606,7 +2606,7 @@ void MainWindow::setMenusForFileSet(bool enable_list_files) {
|
|||
}
|
||||
|
||||
void MainWindow::setWindowIcon(const QIcon &icon) {
|
||||
wsApp->setWindowIcon(icon);
|
||||
mainApp->setWindowIcon(icon);
|
||||
QMainWindow::setWindowIcon(icon);
|
||||
}
|
||||
|
||||
|
@ -2624,12 +2624,12 @@ void MainWindow::changeEvent(QEvent* event)
|
|||
case QEvent::LanguageChange:
|
||||
main_ui_->retranslateUi(this);
|
||||
// make sure that the "Clear Menu" item is retranslated
|
||||
wsApp->emitAppSignal(WiresharkApplication::RecentCapturesChanged);
|
||||
mainApp->emitAppSignal(WiresharkApplication::RecentCapturesChanged);
|
||||
break;
|
||||
case QEvent::LocaleChange: {
|
||||
QString locale = QLocale::system().name();
|
||||
locale.truncate(locale.lastIndexOf('_'));
|
||||
wsApp->loadLanguage(locale);
|
||||
mainApp->loadLanguage(locale);
|
||||
}
|
||||
break;
|
||||
case QEvent::WindowStateChange:
|
||||
|
@ -2808,32 +2808,32 @@ void MainWindow::removeMenuActions(QList<QAction *> &actions, int menu_group)
|
|||
void MainWindow::addDynamicMenus()
|
||||
{
|
||||
// Manual additions
|
||||
wsApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_GSM, main_ui_->actionTelephonyGsmMapSummary);
|
||||
wsApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_LTE, main_ui_->actionTelephonyLteMacStatistics);
|
||||
wsApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_LTE, main_ui_->actionTelephonyLteRlcStatistics);
|
||||
wsApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_LTE, main_ui_->actionTelephonyLteRlcGraph);
|
||||
wsApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_MTP3, main_ui_->actionTelephonyMtp3Summary);
|
||||
wsApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY, main_ui_->actionTelephonySipFlows);
|
||||
mainApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_GSM, main_ui_->actionTelephonyGsmMapSummary);
|
||||
mainApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_LTE, main_ui_->actionTelephonyLteMacStatistics);
|
||||
mainApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_LTE, main_ui_->actionTelephonyLteRlcStatistics);
|
||||
mainApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_LTE, main_ui_->actionTelephonyLteRlcGraph);
|
||||
mainApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY_MTP3, main_ui_->actionTelephonyMtp3Summary);
|
||||
mainApp->addDynamicMenuGroupItem(REGISTER_STAT_GROUP_TELEPHONY, main_ui_->actionTelephonySipFlows);
|
||||
|
||||
// Fill in each menu
|
||||
foreach(register_stat_group_t menu_group, menu_groups) {
|
||||
QList<QAction *>actions = wsApp->dynamicMenuGroupItems(menu_group);
|
||||
QList<QAction *>actions = mainApp->dynamicMenuGroupItems(menu_group);
|
||||
addMenuActions(actions, menu_group);
|
||||
}
|
||||
|
||||
// Empty menus don't show up: https://bugreports.qt.io/browse/QTBUG-33728
|
||||
// We've added a placeholder in order to make sure some menus are visible.
|
||||
// Hide them as needed.
|
||||
if (wsApp->dynamicMenuGroupItems(REGISTER_STAT_GROUP_TELEPHONY_ANSI).length() > 0) {
|
||||
if (mainApp->dynamicMenuGroupItems(REGISTER_STAT_GROUP_TELEPHONY_ANSI).length() > 0) {
|
||||
main_ui_->actionTelephonyANSIPlaceholder->setVisible(false);
|
||||
}
|
||||
if (wsApp->dynamicMenuGroupItems(REGISTER_STAT_GROUP_TELEPHONY_GSM).length() > 0) {
|
||||
if (mainApp->dynamicMenuGroupItems(REGISTER_STAT_GROUP_TELEPHONY_GSM).length() > 0) {
|
||||
main_ui_->actionTelephonyGSMPlaceholder->setVisible(false);
|
||||
}
|
||||
if (wsApp->dynamicMenuGroupItems(REGISTER_STAT_GROUP_TELEPHONY_LTE).length() > 0) {
|
||||
if (mainApp->dynamicMenuGroupItems(REGISTER_STAT_GROUP_TELEPHONY_LTE).length() > 0) {
|
||||
main_ui_->actionTelephonyLTEPlaceholder->setVisible(false);
|
||||
}
|
||||
if (wsApp->dynamicMenuGroupItems(REGISTER_STAT_GROUP_TELEPHONY_MTP3).length() > 0) {
|
||||
if (mainApp->dynamicMenuGroupItems(REGISTER_STAT_GROUP_TELEPHONY_MTP3).length() > 0) {
|
||||
main_ui_->actionTelephonyMTP3Placeholder->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
@ -2841,15 +2841,15 @@ void MainWindow::addDynamicMenus()
|
|||
void MainWindow::reloadDynamicMenus()
|
||||
{
|
||||
foreach(register_stat_group_t menu_group, menu_groups) {
|
||||
QList<QAction *>actions = wsApp->removedMenuGroupItems(menu_group);
|
||||
QList<QAction *>actions = mainApp->removedMenuGroupItems(menu_group);
|
||||
removeMenuActions(actions, menu_group);
|
||||
|
||||
actions = wsApp->addedMenuGroupItems(menu_group);
|
||||
actions = mainApp->addedMenuGroupItems(menu_group);
|
||||
addMenuActions(actions, menu_group);
|
||||
}
|
||||
|
||||
wsApp->clearAddedMenuGroupItems();
|
||||
wsApp->clearRemovedMenuGroupItems();
|
||||
mainApp->clearAddedMenuGroupItems();
|
||||
mainApp->clearRemovedMenuGroupItems();
|
||||
}
|
||||
|
||||
void MainWindow::externalMenuHelper(ext_menu_t * menu, QMenu * subMenu, gint depth)
|
||||
|
|
|
@ -739,7 +739,7 @@ private slots:
|
|||
|
||||
QString findRtpStreams(QVector<rtpstream_id_t *> *stream_ids, bool reverse);
|
||||
|
||||
friend WiresharkApplication;
|
||||
friend class MainApplication;
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "main_window_preferences_frame.h"
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ DIAG_ON(frame-larger-than=)
|
|||
#include "lte_mac_statistics_dialog.h"
|
||||
#include "lte_rlc_statistics_dialog.h"
|
||||
#include "lte_rlc_graph_dialog.h"
|
||||
#include "main_application.h"
|
||||
#include "mtp3_summary_dialog.h"
|
||||
#include "multicast_statistics_dialog.h"
|
||||
#include "packet_comment_dialog.h"
|
||||
|
@ -158,7 +159,6 @@ DIAG_ON(frame-larger-than=)
|
|||
#include "time_shift_dialog.h"
|
||||
#include "uat_dialog.h"
|
||||
#include "voip_calls_dialog.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "wlan_statistics_dialog.h"
|
||||
#include <ui/qt/widgets/wireless_timeline.h>
|
||||
|
||||
|
@ -278,7 +278,7 @@ bool MainWindow::openCaptureFile(QString cf_path, QString read_filter, unsigned
|
|||
break;
|
||||
}
|
||||
|
||||
wsApp->setLastOpenDirFromFilename(cf_path);
|
||||
mainApp->setLastOpenDirFromFilename(cf_path);
|
||||
|
||||
main_ui_->statusBar->showExpert();
|
||||
|
||||
|
@ -480,7 +480,7 @@ void MainWindow::queuedFilterAction(QString action_filter, FilterAction::Action
|
|||
colorizeWithFilter(new_filter.toUtf8());
|
||||
break;
|
||||
case FilterAction::ActionCopy:
|
||||
wsApp->clipboard()->setText(new_filter);
|
||||
mainApp->clipboard()->setText(new_filter);
|
||||
break;
|
||||
case FilterAction::ActionFind:
|
||||
main_ui_->searchFrame->findFrameWithFilter(new_filter);
|
||||
|
@ -507,7 +507,7 @@ void MainWindow::queuedFilterAction(QString action_filter, FilterAction::Action
|
|||
void MainWindow::captureCapturePrepared(capture_session *session) {
|
||||
setTitlebarForCaptureInProgress();
|
||||
|
||||
setWindowIcon(wsApp->captureIcon());
|
||||
setWindowIcon(mainApp->captureIcon());
|
||||
|
||||
/* Disable menu items that make no sense if you're currently running
|
||||
a capture. */
|
||||
|
@ -546,7 +546,7 @@ void MainWindow::captureCaptureUpdateFinished(capture_session *session) {
|
|||
setForCaptureInProgress(false, handle_toolbars);
|
||||
setMenusForCaptureFile();
|
||||
|
||||
setWindowIcon(wsApp->normalIcon());
|
||||
setWindowIcon(mainApp->normalIcon());
|
||||
|
||||
if (global_commandline_info.quit_after_cap) {
|
||||
// Command line asked us to quit after capturing.
|
||||
|
@ -568,7 +568,7 @@ void MainWindow::captureCaptureFixedFinished(capture_session *) {
|
|||
display packets */
|
||||
setMenusForCaptureFile(true);
|
||||
|
||||
setWindowIcon(wsApp->normalIcon());
|
||||
setWindowIcon(mainApp->normalIcon());
|
||||
|
||||
if (global_commandline_info.quit_after_cap) {
|
||||
// Command line asked us to quit after capturing.
|
||||
|
@ -586,9 +586,9 @@ void MainWindow::captureCaptureFailed(capture_session *) {
|
|||
|
||||
// Reset expert information indicator
|
||||
main_ui_->statusBar->captureFileClosing();
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
mainApp->popStatus(WiresharkApplication::FileStatus);
|
||||
|
||||
setWindowIcon(wsApp->normalIcon());
|
||||
setWindowIcon(mainApp->normalIcon());
|
||||
|
||||
if (global_commandline_info.quit_after_cap) {
|
||||
// Command line asked us to quit after capturing.
|
||||
|
@ -672,11 +672,11 @@ void MainWindow::captureEventHandler(CaptureEvent ev)
|
|||
case CaptureEvent::Merge:
|
||||
switch (ev.eventType()) {
|
||||
case CaptureEvent::Started:
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
wsApp->pushStatus(WiresharkApplication::FileStatus, tr("Merging files."), QString());
|
||||
mainApp->popStatus(WiresharkApplication::FileStatus);
|
||||
mainApp->pushStatus(WiresharkApplication::FileStatus, tr("Merging files."), QString());
|
||||
break;
|
||||
case CaptureEvent::Finished:
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
mainApp->popStatus(WiresharkApplication::FileStatus);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -688,8 +688,8 @@ void MainWindow::captureEventHandler(CaptureEvent ev)
|
|||
case CaptureEvent::Started:
|
||||
{
|
||||
QFileInfo file_info(ev.filePath());
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
wsApp->pushStatus(WiresharkApplication::FileStatus, tr("Saving %1…").arg(file_info.fileName()));
|
||||
mainApp->popStatus(WiresharkApplication::FileStatus);
|
||||
mainApp->pushStatus(WiresharkApplication::FileStatus, tr("Saving %1…").arg(file_info.fileName()));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -754,10 +754,10 @@ void MainWindow::captureFileReadStarted(const QString &action) {
|
|||
/* Set up main window for a capture file. */
|
||||
// main_set_for_capture_file(TRUE);
|
||||
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
mainApp->popStatus(WiresharkApplication::FileStatus);
|
||||
QString msg = QString(tr("%1: %2")).arg(action).arg(capture_file_.fileName());
|
||||
QString msgtip = QString();
|
||||
wsApp->pushStatus(WiresharkApplication::FileStatus, msg, msgtip);
|
||||
mainApp->pushStatus(WiresharkApplication::FileStatus, msg, msgtip);
|
||||
showCapture();
|
||||
main_ui_->actionAnalyzeReloadLuaPlugins->setEnabled(false);
|
||||
main_ui_->wirelessTimelineWidget->captureFileReadStarted(capture_file_.capFile());
|
||||
|
@ -769,7 +769,7 @@ void MainWindow::captureFileReadFinished() {
|
|||
add_menu_recent_capture_file(capture_file_.capFile()->filename);
|
||||
|
||||
/* Remember folder for next Open dialog and save it in recent */
|
||||
wsApp->setLastOpenDirFromFilename(capture_file_.capFile()->filename);
|
||||
mainApp->setLastOpenDirFromFilename(capture_file_.capFile()->filename);
|
||||
}
|
||||
|
||||
/* Update the appropriate parts of the main window. */
|
||||
|
@ -812,10 +812,10 @@ void MainWindow::captureFileClosed() {
|
|||
|
||||
// Reset expert information indicator
|
||||
main_ui_->statusBar->captureFileClosing();
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
mainApp->popStatus(WiresharkApplication::FileStatus);
|
||||
|
||||
setWSWindowTitle();
|
||||
setWindowIcon(wsApp->normalIcon());
|
||||
setWindowIcon(mainApp->normalIcon());
|
||||
setMenusForSelectedPacket();
|
||||
setMenusForSelectedTreeRow();
|
||||
|
||||
|
@ -860,7 +860,7 @@ void MainWindow::startCapture(QStringList interfaces _U_) {
|
|||
/* did the user ever select a capture interface before? */
|
||||
if (global_capture_opts.num_selected == 0) {
|
||||
QString msg = QString(tr("No interface selected."));
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, msg);
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, msg);
|
||||
main_ui_->actionCaptureStart->setChecked(false);
|
||||
return;
|
||||
}
|
||||
|
@ -885,7 +885,7 @@ void MainWindow::startCapture(QStringList interfaces _U_) {
|
|||
/* If some of extcap was not configured, do not start with the capture */
|
||||
if (!can_start_capture) {
|
||||
QString msg = QString(tr("Configure all extcaps before start of capture."));
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, msg);
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, msg);
|
||||
main_ui_->actionCaptureStart->setChecked(false);
|
||||
return;
|
||||
}
|
||||
|
@ -895,7 +895,7 @@ void MainWindow::startCapture(QStringList interfaces _U_) {
|
|||
// case, e.g. with QtMacExtras.
|
||||
if (!capture_filter_valid_) {
|
||||
QString msg = QString(tr("Invalid capture filter."));
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, msg);
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, msg);
|
||||
main_ui_->actionCaptureStart->setChecked(false);
|
||||
return;
|
||||
}
|
||||
|
@ -929,12 +929,12 @@ void MainWindow::startCapture(QStringList interfaces _U_) {
|
|||
}
|
||||
g_string_append(interface_names, " ");
|
||||
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
mainApp->popStatus(WiresharkApplication::FileStatus);
|
||||
QString msg = QString("%1<live capture in progress>").arg(interface_names->str);
|
||||
QString msgtip = QString("to file: ");
|
||||
if (capture_opts->save_file)
|
||||
msgtip += capture_opts->save_file;
|
||||
wsApp->pushStatus(WiresharkApplication::FileStatus, msg, msgtip);
|
||||
mainApp->pushStatus(WiresharkApplication::FileStatus, msg, msgtip);
|
||||
g_string_free(interface_names, TRUE);
|
||||
|
||||
/* The capture succeeded, which means the capture filter syntax is
|
||||
|
@ -1096,7 +1096,7 @@ void MainWindow::updateRecentCaptures() {
|
|||
/* Iterate through the actions in menuOpenRecentCaptureFile,
|
||||
* removing special items, a maybe duplicate entry and every item above count_max */
|
||||
int shortcut = Qt::Key_0;
|
||||
foreach(recent_item_status *ri, wsApp->recentItems()) {
|
||||
foreach(recent_item_status *ri, mainApp->recentItems()) {
|
||||
// Add the new item
|
||||
ra = new QAction(recentMenu);
|
||||
ra->setData(ri->filename);
|
||||
|
@ -1147,7 +1147,7 @@ void MainWindow::updateRecentCaptures() {
|
|||
ra = new QAction(recentMenu);
|
||||
ra->setText(tr("Clear Menu"));
|
||||
recentMenu->insertAction(NULL, ra);
|
||||
connect(ra, SIGNAL(triggered()), wsApp, SLOT(clearRecentCaptures()));
|
||||
connect(ra, SIGNAL(triggered()), mainApp, SLOT(clearRecentCaptures()));
|
||||
} else {
|
||||
if (main_ui_->actionDummyNoFilesFound) {
|
||||
recentMenu->addAction(main_ui_->actionDummyNoFilesFound);
|
||||
|
@ -1575,7 +1575,7 @@ void MainWindow::fieldsChanged()
|
|||
void MainWindow::reloadLuaPlugins()
|
||||
{
|
||||
#ifdef HAVE_LUA
|
||||
if (wsApp->isReloadingLua())
|
||||
if (mainApp->isReloadingLua())
|
||||
return;
|
||||
|
||||
gboolean uses_lua_filehandler = FALSE;
|
||||
|
@ -1594,7 +1594,7 @@ void MainWindow::reloadLuaPlugins()
|
|||
}
|
||||
}
|
||||
|
||||
wsApp->setReloadingLua(true);
|
||||
mainApp->setReloadingLua(true);
|
||||
|
||||
wslua_reload_plugins(NULL, NULL);
|
||||
funnel_statistics_reload_menus();
|
||||
|
@ -1604,7 +1604,7 @@ void MainWindow::reloadLuaPlugins()
|
|||
// Preferences may have been deleted so close all widgets using prefs
|
||||
main_ui_->preferenceEditorFrame->animatedHide();
|
||||
|
||||
wsApp->readConfigurationFiles(true);
|
||||
mainApp->readConfigurationFiles(true);
|
||||
commandline_options_reapply();
|
||||
|
||||
fieldsChanged();
|
||||
|
@ -1620,7 +1620,7 @@ void MainWindow::reloadLuaPlugins()
|
|||
redissectPackets();
|
||||
}
|
||||
|
||||
wsApp->setReloadingLua(false);
|
||||
mainApp->setReloadingLua(false);
|
||||
SimpleDialog::displayQueuedMessages();
|
||||
#endif
|
||||
}
|
||||
|
@ -1646,7 +1646,7 @@ void MainWindow::showAccordionFrame(AccordionFrame *show_frame, bool toggle)
|
|||
|
||||
void MainWindow::showColumnEditor(int column)
|
||||
{
|
||||
previous_focus_ = wsApp->focusWidget();
|
||||
previous_focus_ = mainApp->focusWidget();
|
||||
connect(previous_focus_, SIGNAL(destroyed()), this, SLOT(resetPreviousFocus()));
|
||||
main_ui_->columnEditorFrame->editColumn(column);
|
||||
showAccordionFrame(main_ui_->columnEditorFrame);
|
||||
|
@ -1815,7 +1815,7 @@ void MainWindow::softwareUpdateRequested() {
|
|||
// We could call testCaptureFileClose here, but that would give us yet
|
||||
// another dialog. Just try again later.
|
||||
if (capture_file_.capFile() && capture_file_.capFile()->state != FILE_CLOSED) {
|
||||
wsApp->rejectSoftwareUpdate();
|
||||
mainApp->rejectSoftwareUpdate();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1920,8 +1920,8 @@ void MainWindow::on_actionFileExportPacketBytes_triggered()
|
|||
if (!capture_file_.capFile() || !capture_file_.capFile()->finfo_selected) return;
|
||||
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this,
|
||||
wsApp->windowTitleString(tr("Export Selected Packet Bytes")),
|
||||
wsApp->lastOpenDir().canonicalPath(),
|
||||
mainApp->windowTitleString(tr("Export Selected Packet Bytes")),
|
||||
mainApp->lastOpenDir().canonicalPath(),
|
||||
tr("Raw data (*.bin *.dat *.raw);;All Files (" ALL_FILES_WILDCARD ")")
|
||||
);
|
||||
|
||||
|
@ -1933,7 +1933,7 @@ void MainWindow::on_actionFileExportPacketBytes_triggered()
|
|||
write_file_binary_mode(qUtf8Printable(file_name), data_p, capture_file_.capFile()->finfo_selected->length);
|
||||
|
||||
/* Save the directory name for future file dialogs. */
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1998,10 +1998,10 @@ void MainWindow::on_actionFileExportTLSSessionKeys_triggered()
|
|||
return;
|
||||
}
|
||||
|
||||
save_title.append(wsApp->windowTitleString(tr("Export TLS Session Keys (%Ln key(s))", "", keylist_len)));
|
||||
save_title.append(mainApp->windowTitleString(tr("Export TLS Session Keys (%Ln key(s))", "", keylist_len)));
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this,
|
||||
save_title,
|
||||
wsApp->lastOpenDir().canonicalPath(),
|
||||
mainApp->lastOpenDir().canonicalPath(),
|
||||
tr("TLS Session Keys (*.keys *.txt);;All Files (" ALL_FILES_WILDCARD ")")
|
||||
);
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -2010,7 +2010,7 @@ void MainWindow::on_actionFileExportTLSSessionKeys_triggered()
|
|||
write_file_binary_mode(qUtf8Printable(file_name), keylist, keylist_length);
|
||||
|
||||
/* Save the directory name for future file dialogs. */
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
g_free(keylist);
|
||||
}
|
||||
}
|
||||
|
@ -2130,10 +2130,10 @@ void MainWindow::actionEditCopyTriggered(MainWindow::CopySelected selection_type
|
|||
}
|
||||
|
||||
if (clip.length()) {
|
||||
wsApp->clipboard()->setText(clip);
|
||||
mainApp->clipboard()->setText(clip);
|
||||
} else {
|
||||
QString err = tr("Couldn't copy text. Try another item.");
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, err);
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, err);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2187,7 +2187,7 @@ void MainWindow::on_actionEditFindPacket_triggered()
|
|||
if (! packet_list_->model() || packet_list_->model()->rowCount() < 1) {
|
||||
return;
|
||||
}
|
||||
previous_focus_ = wsApp->focusWidget();
|
||||
previous_focus_ = mainApp->focusWidget();
|
||||
connect(previous_focus_, SIGNAL(destroyed()), this, SLOT(resetPreviousFocus()));
|
||||
if (!main_ui_->searchFrame->isVisible()) {
|
||||
showAccordionFrame(main_ui_->searchFrame, true);
|
||||
|
@ -2412,7 +2412,7 @@ void MainWindow::on_actionEditConfigurationProfiles_triggered()
|
|||
void MainWindow::showPreferencesDialog(QString module_name)
|
||||
{
|
||||
PreferencesDialog *pref_dialog = new PreferencesDialog(this);
|
||||
connect(pref_dialog, SIGNAL(destroyed(QObject*)), wsApp, SLOT(flushAppSignals()));
|
||||
connect(pref_dialog, SIGNAL(destroyed(QObject*)), mainApp, SLOT(flushAppSignals()));
|
||||
saveWindowGeometry(); // Save in case the layout panes are rearranged
|
||||
|
||||
pref_dialog->setPane(module_name);
|
||||
|
@ -2584,7 +2584,7 @@ void MainWindow::setNameResolution()
|
|||
if (packet_list_) {
|
||||
packet_list_->resetColumns();
|
||||
}
|
||||
wsApp->emitAppSignal(WiresharkApplication::NameResolutionChanged);
|
||||
mainApp->emitAppSignal(WiresharkApplication::NameResolutionChanged);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewNameResolutionPhysical_triggered()
|
||||
|
@ -2604,7 +2604,7 @@ void MainWindow::on_actionViewNameResolutionTransport_triggered()
|
|||
|
||||
void MainWindow::zoomText()
|
||||
{
|
||||
wsApp->zoomTextFont(recent.gui_zoom_level);
|
||||
mainApp->zoomTextFont(recent.gui_zoom_level);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewZoomIn_triggered()
|
||||
|
@ -2655,7 +2655,7 @@ void MainWindow::colorizeConversation(bool create_rule)
|
|||
guint8 cc_num = colorize_action->data().toUInt();
|
||||
gchar *filter = conversation_filter_from_packet(pi);
|
||||
if (filter == NULL) {
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("Unable to build conversation filter."));
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("Unable to build conversation filter."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2783,7 +2783,7 @@ void MainWindow::openPacketDialog(bool from_reference)
|
|||
|
||||
connect(this, SIGNAL(closePacketDialogs()),
|
||||
packet_dialog, SLOT(close()));
|
||||
zoomText(); // Emits wsApp->zoomMonospaceFont(QFont)
|
||||
zoomText(); // Emits mainApp->zoomMonospaceFont(QFont)
|
||||
|
||||
packet_dialog->show();
|
||||
}
|
||||
|
@ -2890,7 +2890,7 @@ void MainWindow::matchFieldFilter(FilterAction::Action action, FilterAction::Act
|
|||
|
||||
if (field_filter.isEmpty()) {
|
||||
QString err = tr("No filter available. Try another %1.").arg(packet_list_->contextMenuActive() ? tr("column") : tr("item"));
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, err);
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2918,7 +2918,7 @@ void MainWindow::on_actionAnalyzeDisplayFilterMacros_triggered()
|
|||
struct epan_uat* dfm_uat;
|
||||
dfilter_macro_get_uat(&dfm_uat);
|
||||
UatDialog *uat_dlg = new UatDialog(parentWidget(), dfm_uat);
|
||||
connect(uat_dlg, SIGNAL(destroyed(QObject*)), wsApp, SLOT(flushAppSignals()));
|
||||
connect(uat_dlg, SIGNAL(destroyed(QObject*)), mainApp, SLOT(flushAppSignals()));
|
||||
|
||||
uat_dlg->setWindowModality(Qt::ApplicationModal);
|
||||
uat_dlg->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
@ -2939,7 +2939,7 @@ void MainWindow::on_actionAnalyzeCreateAColumn_triggered()
|
|||
} else {
|
||||
status = tr("The \"%1\" column already exists as \"%2\".").arg(hfinfo->name).arg(get_column_title(col));
|
||||
}
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, status);
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, status);
|
||||
|
||||
if (!get_column_visible(col)) {
|
||||
packet_list_->setColumnHidden(col, false);
|
||||
|
@ -2983,7 +2983,7 @@ void MainWindow::applyExportObject()
|
|||
void MainWindow::on_actionAnalyzeEnabledProtocols_triggered()
|
||||
{
|
||||
EnabledProtocolsDialog *enable_proto_dialog = new EnabledProtocolsDialog(this);
|
||||
connect(enable_proto_dialog, SIGNAL(destroyed(QObject*)), wsApp, SLOT(flushAppSignals()));
|
||||
connect(enable_proto_dialog, SIGNAL(destroyed(QObject*)), mainApp, SLOT(flushAppSignals()));
|
||||
|
||||
enable_proto_dialog->setWindowModality(Qt::ApplicationModal);
|
||||
enable_proto_dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
@ -2996,7 +2996,7 @@ void MainWindow::on_actionAnalyzeDecodeAs_triggered()
|
|||
bool create_new = da_action && da_action->property("create_new").toBool();
|
||||
|
||||
DecodeAsDialog *da_dialog = new DecodeAsDialog(this, capture_file_.capFile(), create_new);
|
||||
connect(da_dialog, SIGNAL(destroyed(QObject*)), wsApp, SLOT(flushAppSignals()));
|
||||
connect(da_dialog, SIGNAL(destroyed(QObject*)), mainApp, SLOT(flushAppSignals()));
|
||||
|
||||
da_dialog->setWindowModality(Qt::ApplicationModal);
|
||||
da_dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
@ -3740,78 +3740,78 @@ void MainWindow::on_actionToolsCredentials_triggered()
|
|||
// Help Menu
|
||||
void MainWindow::on_actionHelpContents_triggered() {
|
||||
|
||||
wsApp->helpTopicAction(HELP_CONTENT);
|
||||
mainApp->helpTopicAction(HELP_CONTENT);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPWireshark_triggered() {
|
||||
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_WIRESHARK);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_WIRESHARK);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPWireshark_Filter_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_WIRESHARK_FILTER);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_WIRESHARK_FILTER);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPCapinfos_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_CAPINFOS);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_CAPINFOS);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPDumpcap_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_DUMPCAP);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_DUMPCAP);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPEditcap_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_EDITCAP);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_EDITCAP);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPMergecap_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_MERGECAP);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_MERGECAP);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPRawshark_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_RAWSHARK);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_RAWSHARK);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPReordercap_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_REORDERCAP);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_REORDERCAP);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPText2pcap_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_TEXT2PCAP);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_TEXT2PCAP);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpMPTShark_triggered() {
|
||||
wsApp->helpTopicAction(LOCALPAGE_MAN_TSHARK);
|
||||
mainApp->helpTopicAction(LOCALPAGE_MAN_TSHARK);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpWebsite_triggered() {
|
||||
|
||||
wsApp->helpTopicAction(ONLINEPAGE_HOME);
|
||||
mainApp->helpTopicAction(ONLINEPAGE_HOME);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpFAQ_triggered() {
|
||||
|
||||
wsApp->helpTopicAction(ONLINEPAGE_FAQ);
|
||||
mainApp->helpTopicAction(ONLINEPAGE_FAQ);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpAsk_triggered() {
|
||||
|
||||
wsApp->helpTopicAction(ONLINEPAGE_ASK);
|
||||
mainApp->helpTopicAction(ONLINEPAGE_ASK);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpDownloads_triggered() {
|
||||
|
||||
wsApp->helpTopicAction(ONLINEPAGE_DOWNLOAD);
|
||||
mainApp->helpTopicAction(ONLINEPAGE_DOWNLOAD);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpWiki_triggered() {
|
||||
|
||||
wsApp->helpTopicAction(ONLINEPAGE_WIKI);
|
||||
mainApp->helpTopicAction(ONLINEPAGE_WIKI);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionHelpSampleCaptures_triggered() {
|
||||
|
||||
wsApp->helpTopicAction(ONLINEPAGE_SAMPLE_FILES);
|
||||
mainApp->helpTopicAction(ONLINEPAGE_SAMPLE_FILES);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SOFTWARE_UPDATE
|
||||
|
@ -3842,7 +3842,7 @@ void MainWindow::on_actionGoGoToPacket_triggered() {
|
|||
if (! packet_list_->model() || packet_list_->model()->rowCount() < 1) {
|
||||
return;
|
||||
}
|
||||
previous_focus_ = wsApp->focusWidget();
|
||||
previous_focus_ = mainApp->focusWidget();
|
||||
connect(previous_focus_, SIGNAL(destroyed()), this, SLOT(resetPreviousFocus()));
|
||||
|
||||
showAccordionFrame(main_ui_->goToFrame, true);
|
||||
|
@ -3881,14 +3881,14 @@ void MainWindow::goToConversationFrame(bool go_next) {
|
|||
* coloring */
|
||||
filter = conversation_filter_from_packet(pi);
|
||||
if (filter == NULL) {
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("Unable to build conversation filter."));
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("Unable to build conversation filter."));
|
||||
g_free(filter);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!dfilter_compile(filter, &dfcode, NULL)) {
|
||||
/* The attempt failed; report an error. */
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("Error compiling filter for this conversation."));
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("Error compiling filter for this conversation."));
|
||||
g_free(filter);
|
||||
return;
|
||||
}
|
||||
|
@ -3897,7 +3897,7 @@ void MainWindow::goToConversationFrame(bool go_next) {
|
|||
|
||||
if (!found_packet) {
|
||||
/* We didn't find a packet */
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("No previous/next packet in conversation."));
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, tr("No previous/next packet in conversation."));
|
||||
}
|
||||
|
||||
dfilter_free(dfcode);
|
||||
|
@ -3975,7 +3975,7 @@ void MainWindow::on_actionCaptureStart_triggered()
|
|||
#ifdef HAVE_LIBPCAP
|
||||
if (global_capture_opts.num_selected == 0) {
|
||||
QString err_msg = tr("No Interface Selected.");
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, err_msg);
|
||||
mainApp->pushStatus(WiresharkApplication::TemporaryStatus, err_msg);
|
||||
main_ui_->actionCaptureStart->setChecked(false);
|
||||
return;
|
||||
}
|
||||
|
@ -4096,7 +4096,7 @@ void MainWindow::on_actionCaptureOptions_triggered()
|
|||
void MainWindow::on_actionCaptureRefreshInterfaces_triggered()
|
||||
{
|
||||
main_ui_->actionCaptureRefreshInterfaces->setEnabled(false);
|
||||
wsApp->refreshLocalInterfaces();
|
||||
mainApp->refreshLocalInterfaces();
|
||||
main_ui_->actionCaptureRefreshInterfaces->setEnabled(true);
|
||||
}
|
||||
#endif
|
||||
|
@ -4186,7 +4186,7 @@ void MainWindow::on_actionContextWikiProtocolPage_triggered()
|
|||
|
||||
const QString proto_abbrev = proto_registrar_get_abbrev(field_id);
|
||||
|
||||
int ret = QMessageBox::question(this, wsApp->windowTitleString(tr("Wiki Page for %1").arg(proto_abbrev)),
|
||||
int ret = QMessageBox::question(this, mainApp->windowTitleString(tr("Wiki Page for %1").arg(proto_abbrev)),
|
||||
tr("<p>The Wireshark Wiki is maintained by the community.</p>"
|
||||
"<p>The page you are about to load might be wonderful, "
|
||||
"incomplete, wrong, or nonexistent.</p>"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -262,7 +262,7 @@ void ManageInterfacesDialog::on_buttonBox_accepted()
|
|||
remoteAccepted();
|
||||
#endif
|
||||
prefs_main_write();
|
||||
wsApp->refreshLocalInterfaces();
|
||||
mainApp->refreshLocalInterfaces();
|
||||
emit ifsChanged();
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ void ManageInterfacesDialog::on_delPipe_clicked()
|
|||
|
||||
void ManageInterfacesDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_CAPTURE_MANAGE_INTERFACES_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_CAPTURE_MANAGE_INTERFACES_DIALOG);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PCAP_REMOTE
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <ui/qt/manager/preference_manager.h>
|
||||
#include <ui/qt/widgets/range_syntax_lineedit.h>
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
#include <ui/qt/wireshark_application.h>
|
||||
#include <ui/qt/main_application.h>
|
||||
#include <ui/qt/uat_dialog.h>
|
||||
|
||||
#include <QDir>
|
||||
|
@ -191,7 +191,7 @@ public:
|
|||
SaveFilePreference(QObject * parent = Q_NULLPTR) : WiresharkPreference(parent) {}
|
||||
virtual QWidget * editor(QWidget * parent, const QStyleOptionViewItem &option, const QModelIndex &index)
|
||||
{
|
||||
QString filename = WiresharkFileDialog::getSaveFileName(parent, wsApp->windowTitleString(prefs_get_title(prefsItem()->getPref())),
|
||||
QString filename = WiresharkFileDialog::getSaveFileName(parent, mainApp->windowTitleString(prefs_get_title(prefsItem()->getPref())),
|
||||
index.model()->data(index, Qt::DisplayRole).toString());
|
||||
if (!filename.isEmpty()) {
|
||||
const_cast<QAbstractItemModel*>(index.model())->setData(index, QDir::toNativeSeparators(filename), Qt::EditRole);
|
||||
|
@ -207,7 +207,7 @@ public:
|
|||
OpenFilePreference(QObject * parent = Q_NULLPTR) : WiresharkPreference(parent) {}
|
||||
virtual QWidget * editor(QWidget * parent, const QStyleOptionViewItem &option, const QModelIndex &index)
|
||||
{
|
||||
QString filename = WiresharkFileDialog::getOpenFileName(parent, wsApp->windowTitleString(prefs_get_title(prefsItem()->getPref())),
|
||||
QString filename = WiresharkFileDialog::getOpenFileName(parent, mainApp->windowTitleString(prefs_get_title(prefsItem()->getPref())),
|
||||
index.model()->data(index, Qt::DisplayRole).toString());
|
||||
if (!filename.isEmpty()) {
|
||||
const_cast<QAbstractItemModel*>(index.model())->setData(index, QDir::toNativeSeparators(filename), Qt::EditRole);
|
||||
|
@ -223,7 +223,7 @@ public:
|
|||
DirNamePreference(QObject * parent = Q_NULLPTR) : WiresharkPreference(parent) {}
|
||||
virtual QWidget * editor(QWidget * parent, const QStyleOptionViewItem &option, const QModelIndex &index)
|
||||
{
|
||||
QString filename = WiresharkFileDialog::getExistingDirectory(parent, wsApp->windowTitleString(prefs_get_title(prefsItem()->getPref())),
|
||||
QString filename = WiresharkFileDialog::getExistingDirectory(parent, mainApp->windowTitleString(prefs_get_title(prefsItem()->getPref())),
|
||||
index.model()->data(index, Qt::DisplayRole).toString());
|
||||
if (!filename.isEmpty()) {
|
||||
const_cast<QAbstractItemModel*>(index.model())->setData(index, QDir::toNativeSeparators(filename), Qt::EditRole);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <epan/packet.h>
|
||||
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
static const char* CUSTOM_TABLE_NAME = "Custom Tables";
|
||||
static const char* INTEGER_TABLE_NAME = "Integer Tables";
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <epan/disabled_protos.h>
|
||||
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QRegularExpression>
|
||||
|
||||
|
@ -339,7 +339,7 @@ void EnabledProtocolsModel::saveChanges(bool writeChanges)
|
|||
if (writeChanges) {
|
||||
save_enabled_and_disabled_lists();
|
||||
}
|
||||
wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->emitAppSignal(MainApplication::PacketDissectionChanged);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <ui/preference_utils.h>
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
|
||||
|
@ -51,7 +51,7 @@ void InterfaceSortFilterModel::setStoreOnChange(bool storeOnChange)
|
|||
_storeOnChange = storeOnChange;
|
||||
if (storeOnChange)
|
||||
{
|
||||
connect(wsApp, &WiresharkApplication::preferencesChanged, this, &InterfaceSortFilterModel::resetPreferenceData);
|
||||
connect(mainApp, &MainApplication::preferencesChanged, this, &InterfaceSortFilterModel::resetPreferenceData);
|
||||
resetPreferenceData();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "wiretap/wtap.h"
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QIdentityProxyModel>
|
||||
|
||||
|
@ -279,7 +279,7 @@ void InterfaceTreeCacheModel::save()
|
|||
++it;
|
||||
}
|
||||
|
||||
wsApp->emitAppSignal(WiresharkApplication::LocalInterfacesChanged);
|
||||
mainApp->emitAppSignal(MainApplication::LocalInterfacesChanged);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -580,7 +580,7 @@ void InterfaceTreeCacheModel::deleteDevice(const QModelIndex &index)
|
|||
capture_opts_free_interface_t(device);
|
||||
global_capture_opts.all_ifaces = g_array_remove_index(global_capture_opts.all_ifaces, row);
|
||||
emit endRemoveRows();
|
||||
wsApp->emitAppSignal(WiresharkApplication::LocalInterfacesChanged);
|
||||
mainApp->emitAppSignal(MainApplication::LocalInterfacesChanged);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <ui/qt/utils/stock_icon.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
/* Needed for the meta type declaration of QList<int>* */
|
||||
#include <ui/qt/models/sparkline_delegate.h>
|
||||
|
@ -45,8 +45,8 @@ InterfaceTreeModel::InterfaceTreeModel(QObject *parent) :
|
|||
,stat_cache_(NULL)
|
||||
#endif
|
||||
{
|
||||
connect(wsApp, &WiresharkApplication::appInitialized, this, &InterfaceTreeModel::interfaceListChanged);
|
||||
connect(wsApp, &WiresharkApplication::localInterfaceListChanged, this, &InterfaceTreeModel::interfaceListChanged);
|
||||
connect(mainApp, &MainApplication::appInitialized, this, &InterfaceTreeModel::interfaceListChanged);
|
||||
connect(mainApp, &MainApplication::localInterfaceListChanged, this, &InterfaceTreeModel::interfaceListChanged);
|
||||
}
|
||||
|
||||
InterfaceTreeModel::~InterfaceTreeModel(void)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <ui/qt/utils/color_utils.h>
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <ui/qt/main_window.h>
|
||||
#include <ui/qt/main_status_bar.h>
|
||||
#include <ui/qt/widgets/wireless_timeline.h>
|
||||
|
@ -82,9 +82,9 @@ PacketListModel::PacketListModel(QObject *parent, capture_file *cf) :
|
|||
new_visible_rows_.reserve(1000);
|
||||
number_to_row_.reserve(reserved_packets_);
|
||||
|
||||
if (qobject_cast<MainWindow *>(wsApp->mainWindow()))
|
||||
if (qobject_cast<MainWindow *>(mainApp->mainWindow()))
|
||||
{
|
||||
MainWindow *mw = qobject_cast<MainWindow *>(wsApp->mainWindow());
|
||||
MainWindow *mw = qobject_cast<MainWindow *>(mainApp->mainWindow());
|
||||
QWidget * wtWidget = mw->findChild<WirelessTimeline *>();
|
||||
if (wtWidget && qobject_cast<WirelessTimeline *>(wtWidget))
|
||||
{
|
||||
|
@ -358,7 +358,7 @@ void PacketListModel::sort(int column, Qt::SortOrder order)
|
|||
// something we can interrupt.
|
||||
if (!col_title.isEmpty()) {
|
||||
QString busy_msg = tr("Sorting \"%1\"…").arg(col_title);
|
||||
wsApp->pushStatus(WiresharkApplication::BusyStatus, busy_msg);
|
||||
mainApp->pushStatus(MainApplication::BusyStatus, busy_msg);
|
||||
}
|
||||
|
||||
busy_timer_.start();
|
||||
|
@ -382,7 +382,7 @@ void PacketListModel::sort(int column, Qt::SortOrder order)
|
|||
emit endResetModel();
|
||||
|
||||
if (!col_title.isEmpty()) {
|
||||
wsApp->popStatus(WiresharkApplication::BusyStatus);
|
||||
mainApp->popStatus(MainApplication::BusyStatus);
|
||||
}
|
||||
|
||||
if (cap_file_->current_frame) {
|
||||
|
@ -468,7 +468,7 @@ bool PacketListModel::recordLessThan(PacketListRecord *r1, PacketListRecord *r2)
|
|||
if (busy_timer_.elapsed() > busy_timeout_) {
|
||||
// What's the least amount of processing that we can do which will draw
|
||||
// the busy indicator?
|
||||
wsApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
|
||||
mainApp->processEvents(QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers, 1);
|
||||
busy_timer_.restart();
|
||||
}
|
||||
if (sort_column_ < 0) {
|
||||
|
|
|
@ -10,10 +10,11 @@
|
|||
#include <ui/qt/models/related_packet_delegate.h>
|
||||
#include "packet_list_record.h"
|
||||
|
||||
#include <ui/qt/main_application.h>
|
||||
|
||||
#include <ui/qt/utils/color_utils.h>
|
||||
|
||||
#include <ui/qt/main_window.h>
|
||||
#include <ui/qt/wireshark_application.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QPainter>
|
||||
|
@ -51,9 +52,9 @@ void RelatedPacketDelegate::paint(QPainter *painter, const QStyleOptionViewItem
|
|||
{
|
||||
|
||||
/* This prevents the drawing of related objects, if multiple lines are being selected */
|
||||
if (wsApp && wsApp->mainWindow())
|
||||
if (mainApp && mainApp->mainWindow())
|
||||
{
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(wsApp->mainWindow());
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(mainApp->mainWindow());
|
||||
if (mw && mw->hasSelection())
|
||||
{
|
||||
QStyledItemDelegate::paint(painter, option, index);
|
||||
|
@ -256,9 +257,9 @@ QSize RelatedPacketDelegate::sizeHint(const QStyleOptionViewItem &option,
|
|||
const QModelIndex &index) const
|
||||
{
|
||||
/* This prevents the sizeHint for the delegate, if multiple lines are being selected */
|
||||
if (wsApp && wsApp->mainWindow())
|
||||
if (mainApp && mainApp->mainWindow())
|
||||
{
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(wsApp->mainWindow());
|
||||
MainWindow * mw = qobject_cast<MainWindow *>(mainApp->mainWindow());
|
||||
if (mw && mw->selectedRows().count() > 1)
|
||||
return QStyledItemDelegate::sizeHint(option, index);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "uat_dialog.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
|
||||
|
@ -522,7 +522,7 @@ void ModulePreferencesScrollArea::saveFilenamePushButtonClicked()
|
|||
pref_t *pref = VariantPointer<pref_t>::asPtr(filename_pb->property(pref_prop_));
|
||||
if (!pref) return;
|
||||
|
||||
QString filename = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(prefs_get_title(pref)),
|
||||
QString filename = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(prefs_get_title(pref)),
|
||||
prefs_get_string_value(pref, pref_stashed));
|
||||
|
||||
if (!filename.isEmpty()) {
|
||||
|
@ -539,7 +539,7 @@ void ModulePreferencesScrollArea::openFilenamePushButtonClicked()
|
|||
pref_t *pref = VariantPointer<pref_t>::asPtr(filename_pb->property(pref_prop_));
|
||||
if (!pref) return;
|
||||
|
||||
QString filename = WiresharkFileDialog::getOpenFileName(this, wsApp->windowTitleString(prefs_get_title(pref)),
|
||||
QString filename = WiresharkFileDialog::getOpenFileName(this, mainApp->windowTitleString(prefs_get_title(pref)),
|
||||
prefs_get_string_value(pref, pref_stashed));
|
||||
if (!filename.isEmpty()) {
|
||||
prefs_set_string_value(pref, QDir::toNativeSeparators(filename).toStdString().c_str(), pref_stashed);
|
||||
|
@ -555,7 +555,7 @@ void ModulePreferencesScrollArea::dirnamePushButtonClicked()
|
|||
pref_t *pref = VariantPointer<pref_t>::asPtr(dirname_pb->property(pref_prop_));
|
||||
if (!pref) return;
|
||||
|
||||
QString dirname = WiresharkFileDialog::getExistingDirectory(this, wsApp->windowTitleString(prefs_get_title(pref)),
|
||||
QString dirname = WiresharkFileDialog::getExistingDirectory(this, mainApp->windowTitleString(prefs_get_title(pref)),
|
||||
prefs_get_string_value(pref, pref_stashed));
|
||||
|
||||
if (!dirname.isEmpty()) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <ui/qt/widgets/syntax_line_edit.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
enum {
|
||||
col_src_addr_,
|
||||
|
@ -464,7 +464,7 @@ multicast_statistics_init(const char *args, void*) {
|
|||
if (args_l.length() > 2) {
|
||||
filter = QStringList(args_l.mid(2)).join(",").toUtf8();
|
||||
}
|
||||
wsApp->emitStatCommandSignal("MulticastStatistics", filter.constData(), NULL);
|
||||
mainApp->emitStatCommandSignal("MulticastStatistics", filter.constData(), NULL);
|
||||
}
|
||||
|
||||
static stat_tap_ui multicast_statistics_ui = {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "packet_comment_dialog.h"
|
||||
#include <ui_packet_comment_dialog.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
PacketCommentDialog::PacketCommentDialog(bool isEdit, QWidget *parent, QString comment) :
|
||||
GeometryStateDialog(parent),
|
||||
|
@ -23,7 +23,7 @@ PacketCommentDialog::PacketCommentDialog(bool isEdit, QWidget *parent, QString c
|
|||
|
||||
pc_ui_->setupUi(this);
|
||||
loadGeometry();
|
||||
setWindowTitle(wsApp->windowTitleString(title));
|
||||
setWindowTitle(mainApp->windowTitleString(title));
|
||||
|
||||
pc_ui_->commentTextEdit->setPlainText(comment);
|
||||
}
|
||||
|
@ -40,5 +40,5 @@ QString PacketCommentDialog::text()
|
|||
|
||||
void PacketCommentDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
// wsApp->helpTopicAction(HELP_PACKET_COMMENT_DIALOG);
|
||||
// mainApp->helpTopicAction(HELP_PACKET_COMMENT_DIALOG);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "wsutil/utf8_entities.h"
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include "ui/qt/main_window.h"
|
||||
#include "ui/qt/utils/proto_node.h"
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
padding_rems_(0.5),
|
||||
span_mark_offset_rems_(0.2)
|
||||
{
|
||||
setFont(wsApp->font());
|
||||
setFont(mainApp->font());
|
||||
}
|
||||
|
||||
void setFont(QFont font) {
|
||||
|
@ -357,8 +357,8 @@ PacketDiagram::PacketDiagram(QWidget *parent) :
|
|||
// XXX Move to setMonospaceFont similar to ProtoTree
|
||||
layout_->setFont(font());
|
||||
|
||||
connect(wsApp, &WiresharkApplication::appInitialized, this, &PacketDiagram::connectToMainWindow);
|
||||
connect(wsApp, &WiresharkApplication::zoomRegularFont, this, &PacketDiagram::setFont);
|
||||
connect(mainApp, &MainApplication::appInitialized, this, &PacketDiagram::connectToMainWindow);
|
||||
connect(mainApp, &MainApplication::zoomRegularFont, this, &PacketDiagram::setFont);
|
||||
|
||||
resetScene();
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ void PacketDiagram::contextMenuEvent(QContextMenuEvent *event)
|
|||
|
||||
void PacketDiagram::connectToMainWindow()
|
||||
{
|
||||
MainWindow *main_window = qobject_cast<MainWindow *>(wsApp->mainWindow());
|
||||
MainWindow *main_window = qobject_cast<MainWindow *>(mainApp->mainWindow());
|
||||
if (!main_window) {
|
||||
return;
|
||||
}
|
||||
|
@ -757,7 +757,7 @@ void PacketDiagram::showFieldsToggled(bool checked)
|
|||
void PacketDiagram::saveAsTriggered()
|
||||
{
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString png_filter = tr("Portable Network Graphics (*.png)");
|
||||
QString bmp_filter = tr("Windows Bitmap (*.bmp)");
|
||||
// Gaze upon my beautiful graph with lossy artifacts!
|
||||
|
@ -769,7 +769,7 @@ void PacketDiagram::saveAsTriggered()
|
|||
#endif
|
||||
QString filter = fl.join(";;");
|
||||
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Graph As…")),
|
||||
path.canonicalPath(), filter, &extension);
|
||||
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -796,7 +796,7 @@ void PacketDiagram::saveAsTriggered()
|
|||
#endif
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -804,7 +804,7 @@ void PacketDiagram::saveAsTriggered()
|
|||
void PacketDiagram::copyAsRasterTriggered()
|
||||
{
|
||||
QImage raster_diagram = exportToImage();
|
||||
wsApp->clipboard()->setImage(raster_diagram);
|
||||
mainApp->clipboard()->setImage(raster_diagram);
|
||||
}
|
||||
|
||||
#if defined(QT_SVG_LIB) && !defined(Q_OS_MAC) && 0
|
||||
|
@ -817,6 +817,6 @@ void PacketDiagram::copyAsSvgTriggered()
|
|||
// It might be easier to just do "Save As" instead.
|
||||
QMimeData *md = new QMimeData();
|
||||
md->setData("image/svg+xml", svg_buf);
|
||||
wsApp->clipboard()->setMimeData(md);
|
||||
mainApp->clipboard()->setMimeData(md);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "byte_view_tab.h"
|
||||
#include "proto_tree.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <ui/qt/utils/field_information.h>
|
||||
#include <QTreeWidgetItemIterator>
|
||||
|
@ -97,7 +97,7 @@ PacketDialog::PacketDialog(QWidget &parent, CaptureFile &cf, frame_data *fdata)
|
|||
}
|
||||
ui->chkShowByteView->setCheckState(state);
|
||||
|
||||
connect(wsApp, SIGNAL(zoomMonospaceFont(QFont)),
|
||||
connect(mainApp, SIGNAL(zoomMonospaceFont(QFont)),
|
||||
proto_tree_, SLOT(setMonospaceFont(QFont)));
|
||||
|
||||
connect(byte_view_tab_, SIGNAL(fieldSelected(FieldInformation *)),
|
||||
|
@ -135,7 +135,7 @@ void PacketDialog::captureFileClosing()
|
|||
|
||||
void PacketDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_NEW_PACKET_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_NEW_PACKET_DIALOG);
|
||||
}
|
||||
|
||||
void PacketDialog::setHintText(FieldInformation * finfo)
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include <ui/qt/widgets/overlay_scroll_bar.h>
|
||||
#include "proto_tree.h"
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <ui/qt/utils/data_printer.h>
|
||||
#include <ui/qt/utils/frame_information.h>
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
|
@ -282,9 +282,9 @@ PacketList::PacketList(QWidget *parent) :
|
|||
|
||||
connect(packet_list_model_, SIGNAL(goToPacket(int)), this, SLOT(goToPacket(int)));
|
||||
connect(packet_list_model_, SIGNAL(itemHeightChanged(const QModelIndex&)), this, SLOT(updateRowHeights(const QModelIndex&)));
|
||||
connect(wsApp, SIGNAL(addressResolutionChanged()), this, SLOT(redrawVisiblePacketsDontSelectCurrent()));
|
||||
connect(wsApp, SIGNAL(columnDataChanged()), this, SLOT(redrawVisiblePacketsDontSelectCurrent()));
|
||||
connect(wsApp, &WiresharkApplication::preferencesChanged, this, [=]() { setSortingEnabled(prefs.gui_packet_list_sortable); });
|
||||
connect(mainApp, SIGNAL(addressResolutionChanged()), this, SLOT(redrawVisiblePacketsDontSelectCurrent()));
|
||||
connect(mainApp, SIGNAL(columnDataChanged()), this, SLOT(redrawVisiblePacketsDontSelectCurrent()));
|
||||
connect(mainApp, &MainApplication::preferencesChanged, this, [=]() { setSortingEnabled(prefs.gui_packet_list_sortable); });
|
||||
|
||||
connect(header(), SIGNAL(sectionResized(int,int,int)),
|
||||
this, SLOT(sectionResized(int,int,int)));
|
||||
|
@ -749,7 +749,7 @@ void PacketList::ctxDecodeAsDialog()
|
|||
bool create_new = da_action->property("create_new").toBool();
|
||||
|
||||
DecodeAsDialog *da_dialog = new DecodeAsDialog(this, cap_file_, create_new);
|
||||
connect(da_dialog, SIGNAL(destroyed(QObject*)), wsApp, SLOT(flushAppSignals()));
|
||||
connect(da_dialog, SIGNAL(destroyed(QObject*)), mainApp, SLOT(flushAppSignals()));
|
||||
da_dialog->setWindowModality(Qt::ApplicationModal);
|
||||
da_dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
da_dialog->show();
|
||||
|
@ -929,7 +929,7 @@ void PacketList::keyPressEvent(QKeyEvent *event)
|
|||
}
|
||||
|
||||
if (content.count() > 0)
|
||||
wsApp->clipboard()->setText(content.join('\n'), QClipboard::Clipboard);
|
||||
mainApp->clipboard()->setText(content.join('\n'), QClipboard::Clipboard);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -978,7 +978,7 @@ void PacketList::setRecentColumnWidth(int col)
|
|||
int fmt = get_column_format(col);
|
||||
const char *long_str = get_column_width_string(fmt, col);
|
||||
|
||||
QFontMetrics fm = QFontMetrics(wsApp->monospaceFont());
|
||||
QFontMetrics fm = QFontMetrics(mainApp->monospaceFont());
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
|
||||
if (long_str) {
|
||||
col_width = fm.horizontalAdvance(long_str);
|
||||
|
@ -1569,7 +1569,7 @@ void PacketList::setCaptureFile(capture_file *cf)
|
|||
void PacketList::setMonospaceFont(const QFont &mono_font)
|
||||
{
|
||||
setFont(mono_font);
|
||||
header()->setFont(wsApp->font());
|
||||
header()->setFont(mainApp->font());
|
||||
}
|
||||
|
||||
void PacketList::goNextPacket(void)
|
||||
|
@ -1864,7 +1864,7 @@ void PacketList::sectionMoved(int logicalIndex, int oldVisualIndex, int newVisua
|
|||
|
||||
prefs_main_write();
|
||||
|
||||
wsApp->emitAppSignal(WiresharkApplication::ColumnsChanged);
|
||||
mainApp->emitAppSignal(MainApplication::ColumnsChanged);
|
||||
|
||||
// If the column with the sort indicator got shifted, mark the new column
|
||||
// after updating the columns contents (via ColumnsChanged) to ensure that
|
||||
|
@ -1938,7 +1938,7 @@ void PacketList::copySummary()
|
|||
|
||||
QString copy_text = createSummaryText(currentIndex(), copy_type);
|
||||
|
||||
wsApp->clipboard()->setText(copy_text);
|
||||
mainApp->clipboard()->setText(copy_text);
|
||||
}
|
||||
|
||||
// We need to tell when the user has scrolled the packet list, either to
|
||||
|
@ -1987,7 +1987,7 @@ void PacketList::drawNearOverlay()
|
|||
qreal dp_ratio = overlay_sb_->devicePixelRatio();
|
||||
int o_height = overlay_sb_->height() * dp_ratio;
|
||||
int o_rows = qMin(packet_list_model_->rowCount(), o_height);
|
||||
QFontMetricsF fmf(wsApp->font());
|
||||
QFontMetricsF fmf(mainApp->font());
|
||||
int o_width = ((static_cast<int>(fmf.height())) * 2 * dp_ratio) + 2; // 2ems + 1-pixel border on either side.
|
||||
|
||||
if (recent.packet_list_colorize && o_rows > 0) {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <ui/qt/widgets/wireshark_file_dialog.h>
|
||||
#include <wsutil/utf8_entities.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QKeyEvent>
|
||||
|
@ -148,7 +148,7 @@ void PreferenceEditorFrame::stringLineEditTextEdited(const QString &new_str)
|
|||
|
||||
void PreferenceEditorFrame::browsePushButtonClicked()
|
||||
{
|
||||
QString caption = wsApp->windowTitleString(prefs_get_title(pref_));
|
||||
QString caption = mainApp->windowTitleString(prefs_get_title(pref_));
|
||||
QString dir = prefs_get_string_value(pref_, pref_stashed);
|
||||
QString filename;
|
||||
|
||||
|
@ -259,10 +259,10 @@ void PreferenceEditorFrame::on_buttonBox_accepted()
|
|||
// Emit signals once UI is hidden
|
||||
if (apply) {
|
||||
if (changed_flags & PREF_EFFECT_FIELDS) {
|
||||
wsApp->emitAppSignal(WiresharkApplication::FieldsChanged);
|
||||
mainApp->emitAppSignal(MainApplication::FieldsChanged);
|
||||
}
|
||||
wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
wsApp->emitAppSignal(WiresharkApplication::PreferencesChanged);
|
||||
mainApp->emitAppSignal(MainApplication::PacketDissectionChanged);
|
||||
mainApp->emitAppSignal(MainApplication::PreferencesChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ void PreferenceEditorFrame::keyPressEvent(QKeyEvent *event)
|
|||
if (ui->buttonBox->button(QDialogButtonBox::Ok)->isEnabled()) {
|
||||
on_buttonBox_accepted();
|
||||
} else if (ui->preferenceLineEdit->syntaxState() == SyntaxLineEdit::Invalid) {
|
||||
wsApp->pushStatus(WiresharkApplication::FilterSyntax, tr("Invalid value."));
|
||||
mainApp->pushStatus(MainApplication::FilterSyntax, tr("Invalid value."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
extern "C" {
|
||||
// Callbacks prefs routines
|
||||
|
@ -101,7 +101,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) :
|
|||
pd_ui_->setupUi(this);
|
||||
loadGeometry();
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Preferences")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Preferences")));
|
||||
|
||||
pd_ui_->advancedView->setModel(&advancedPrefsModel_);
|
||||
pd_ui_->advancedView->setItemDelegate(&advancedPrefsDelegate_);
|
||||
|
@ -252,7 +252,7 @@ void PreferencesDialog::on_buttonBox_accepted()
|
|||
//Filter expressions don't affect dissection, so there is no need to
|
||||
//send any events to that effect. However, the app needs to know
|
||||
//about any button changes.
|
||||
wsApp->emitAppSignal(WiresharkApplication::FilterExpressionsChanged);
|
||||
mainApp->emitAppSignal(MainApplication::FilterExpressionsChanged);
|
||||
|
||||
prefs_main_write();
|
||||
if (save_decode_as_entries(&err) < 0)
|
||||
|
@ -262,7 +262,7 @@ void PreferencesDialog::on_buttonBox_accepted()
|
|||
}
|
||||
|
||||
write_language_prefs();
|
||||
wsApp->loadLanguage(QString(language));
|
||||
mainApp->loadLanguage(QString(language));
|
||||
|
||||
#ifdef HAVE_AIRPCAP
|
||||
/*
|
||||
|
@ -287,24 +287,24 @@ void PreferencesDialog::on_buttonBox_accepted()
|
|||
// prefs_airpcap_update();
|
||||
#endif
|
||||
|
||||
wsApp->setMonospaceFont(prefs.gui_qt_font_name);
|
||||
mainApp->setMonospaceFont(prefs.gui_qt_font_name);
|
||||
|
||||
if (redissect_flags & PREF_EFFECT_FIELDS) {
|
||||
wsApp->queueAppSignal(WiresharkApplication::FieldsChanged);
|
||||
mainApp->queueAppSignal(MainApplication::FieldsChanged);
|
||||
}
|
||||
|
||||
if (redissect_flags & PREF_EFFECT_DISSECTION) {
|
||||
/* Redissect all the packets, and re-evaluate the display filter. */
|
||||
wsApp->queueAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->queueAppSignal(MainApplication::PacketDissectionChanged);
|
||||
}
|
||||
wsApp->queueAppSignal(WiresharkApplication::PreferencesChanged);
|
||||
mainApp->queueAppSignal(MainApplication::PreferencesChanged);
|
||||
|
||||
if (redissect_flags & PREF_EFFECT_GUI_LAYOUT) {
|
||||
wsApp->queueAppSignal(WiresharkApplication::RecentPreferencesRead);
|
||||
mainApp->queueAppSignal(MainApplication::RecentPreferencesRead);
|
||||
}
|
||||
|
||||
if (prefs.capture_no_extcap != saved_capture_no_extcap_)
|
||||
wsApp->refreshLocalInterfaces();
|
||||
mainApp->refreshLocalInterfaces();
|
||||
}
|
||||
|
||||
void PreferencesDialog::on_buttonBox_rejected()
|
||||
|
@ -319,5 +319,5 @@ void PreferencesDialog::on_buttonBox_rejected()
|
|||
|
||||
void PreferencesDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_PREFERENCES_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_PREFERENCES_DIALOG);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <QKeyEvent>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
@ -78,7 +78,7 @@ PrintDialog::PrintDialog(QWidget *parent, capture_file *cf, QString selRange) :
|
|||
Q_ASSERT(cf);
|
||||
|
||||
pd_ui_->setupUi(this);
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Print")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Print")));
|
||||
|
||||
pd_ui_->previewLayout->insertWidget(0, preview_, Qt::AlignTop);
|
||||
|
||||
|
@ -88,7 +88,7 @@ PrintDialog::PrintDialog(QWidget *parent, capture_file *cf, QString selRange) :
|
|||
// XXX Make these configurable
|
||||
header_font_.setFamily("Times");
|
||||
header_font_.setPointSizeF(header_font_.pointSizeF() * 0.8);
|
||||
packet_font_ = wsApp->monospaceFont();
|
||||
packet_font_ = mainApp->monospaceFont();
|
||||
packet_font_.setPointSizeF(packet_font_.pointSizeF() * 0.8);
|
||||
|
||||
memset(&print_args_, 0, sizeof(print_args_));
|
||||
|
@ -317,7 +317,7 @@ void PrintDialog::checkValidity()
|
|||
|
||||
void PrintDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_PRINT_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_PRINT_DIALOG);
|
||||
}
|
||||
|
||||
void PrintDialog::on_buttonBox_clicked(QAbstractButton *button)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "profile_dialog.h"
|
||||
#include <ui_profile_dialog.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <ui/qt/utils/color_utils.h>
|
||||
#include <ui/qt/simple_dialog.h>
|
||||
|
||||
|
@ -58,7 +58,7 @@ ProfileDialog::ProfileDialog(QWidget *parent) :
|
|||
{
|
||||
pd_ui_->setupUi(this);
|
||||
loadGeometry();
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Configuration Profiles")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Configuration Profiles")));
|
||||
|
||||
ok_button_ = pd_ui_->buttonBox->button(QDialogButtonBox::Ok);
|
||||
|
||||
|
@ -180,7 +180,7 @@ int ProfileDialog::execAction(ProfileDialog::ProfileAction profile_action)
|
|||
break;
|
||||
case DeleteCurrentProfile:
|
||||
if (delete_current_profile()) {
|
||||
wsApp->setConfigurationProfile (Q_NULLPTR);
|
||||
mainApp->setConfigurationProfile (Q_NULLPTR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ void ProfileDialog::on_buttonBox_accepted()
|
|||
|
||||
if (write_recent) {
|
||||
/* Get the current geometry, before writing it to disk */
|
||||
wsApp->emitAppSignal(WiresharkApplication::ProfileChanging);
|
||||
mainApp->emitAppSignal(MainApplication::ProfileChanging);
|
||||
|
||||
/* Write recent file for current profile now because
|
||||
* the profile may be renamed in apply_profile_changes() */
|
||||
|
@ -513,11 +513,11 @@ void ProfileDialog::on_buttonBox_accepted()
|
|||
|
||||
if (profileName.length() > 0 && model_->findByName(profileName) >= 0) {
|
||||
// The new profile exists, change.
|
||||
wsApp->setConfigurationProfile (profileName.toUtf8().constData(), FALSE);
|
||||
mainApp->setConfigurationProfile (profileName.toUtf8().constData(), FALSE);
|
||||
} else if (!model_->activeProfile().isValid()) {
|
||||
// The new profile does not exist, and the previous profile has
|
||||
// been deleted. Change to the default profile.
|
||||
wsApp->setConfigurationProfile (Q_NULLPTR, FALSE);
|
||||
mainApp->setConfigurationProfile (Q_NULLPTR, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -530,7 +530,7 @@ void ProfileDialog::on_buttonBox_rejected()
|
|||
|
||||
void ProfileDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_CONFIG_PROFILES_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_CONFIG_PROFILES_DIALOG);
|
||||
}
|
||||
|
||||
void ProfileDialog::dataChanged(const QModelIndex &)
|
||||
|
@ -734,8 +734,8 @@ QString ProfileDialog::lastOpenDir()
|
|||
|
||||
void ProfileDialog::storeLastDir(QString dir)
|
||||
{
|
||||
if (wsApp && dir.length() > 0)
|
||||
wsApp->setLastOpenDir(qUtf8Printable(dir));
|
||||
if (mainApp && dir.length() > 0)
|
||||
mainApp->setLastOpenDir(qUtf8Printable(dir));
|
||||
}
|
||||
|
||||
void ProfileDialog::resetTreeView()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <QPropertyAnimation>
|
||||
|
||||
#include <ui/qt/widgets/stock_icon_tool_button.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
// To do:
|
||||
// - Add an NSProgressIndicator to the dock icon on macOS.
|
||||
|
@ -79,7 +79,7 @@ update_progress_dlg(progdlg_t *dlg, gfloat percentage, const gchar *)
|
|||
/*
|
||||
* Flush out the update and process any input events.
|
||||
*/
|
||||
WiresharkApplication::processEvents();
|
||||
MainApplication::processEvents();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <ui/all_files_wildcard.h>
|
||||
#include <ui/alert_box.h>
|
||||
#include <ui/urls.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QContextMenuEvent>
|
||||
|
@ -92,7 +92,7 @@ ProtoTree::ProtoTree(QWidget *parent, epan_dissect_t *edt_fixed) :
|
|||
connect(verticalScrollBar(), SIGNAL(sliderReleased()),
|
||||
this, SLOT(updateContentWidth()));
|
||||
|
||||
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(connectToMainWindow()));
|
||||
connect(mainApp, SIGNAL(appInitialized()), this, SLOT(connectToMainWindow()));
|
||||
|
||||
viewport()->installEventFilter(this);
|
||||
}
|
||||
|
@ -104,11 +104,11 @@ void ProtoTree::clear() {
|
|||
|
||||
void ProtoTree::connectToMainWindow()
|
||||
{
|
||||
if (wsApp->mainWindow())
|
||||
if (mainApp->mainWindow())
|
||||
{
|
||||
connect(wsApp->mainWindow(), SIGNAL(fieldSelected(FieldInformation *)),
|
||||
connect(mainApp->mainWindow(), SIGNAL(fieldSelected(FieldInformation *)),
|
||||
this, SLOT(selectedFieldChanged(FieldInformation *)));
|
||||
connect(wsApp->mainWindow(), SIGNAL(framesSelected(QList<int>)),
|
||||
connect(mainApp->mainWindow(), SIGNAL(framesSelected(QList<int>)),
|
||||
this, SLOT(selectedFrameChanged(QList<int>)));
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ void ProtoTree::ctxCopyVisibleItems()
|
|||
clip = toString();
|
||||
|
||||
if (clip.length() > 0)
|
||||
wsApp->clipboard()->setText(clip);
|
||||
mainApp->clipboard()->setText(clip);
|
||||
}
|
||||
|
||||
void ProtoTree::ctxCopyAsFilter()
|
||||
|
@ -143,7 +143,7 @@ void ProtoTree::ctxCopyAsFilter()
|
|||
wmem_free(Q_NULLPTR, field_filter);
|
||||
|
||||
if (filter.length() > 0)
|
||||
wsApp->clipboard()->setText(filter);
|
||||
mainApp->clipboard()->setText(filter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ void ProtoTree::ctxCopySelectedInfo()
|
|||
}
|
||||
|
||||
if (clip.length() > 0)
|
||||
wsApp->clipboard()->setText(clip);
|
||||
mainApp->clipboard()->setText(clip);
|
||||
}
|
||||
|
||||
void ProtoTree::ctxOpenUrlWiki()
|
||||
|
@ -204,7 +204,7 @@ void ProtoTree::ctxOpenUrlWiki()
|
|||
|
||||
if (! is_field_reference)
|
||||
{
|
||||
int ret = QMessageBox::question(this, wsApp->windowTitleString(tr("Wiki Page for %1").arg(proto_abbrev)),
|
||||
int ret = QMessageBox::question(this, mainApp->windowTitleString(tr("Wiki Page for %1").arg(proto_abbrev)),
|
||||
tr("<p>The Wireshark Wiki is maintained by the community.</p>"
|
||||
"<p>The page you are about to load might be wonderful, "
|
||||
"incomplete, wrong, or nonexistent.</p>"
|
||||
|
@ -628,14 +628,14 @@ void ProtoTree::itemDoubleClicked(const QModelIndex &index)
|
|||
if (QApplication::queryKeyboardModifiers() & Qt::ShiftModifier) {
|
||||
emit openPacketInNewWindow(true);
|
||||
} else {
|
||||
wsApp->gotoFrame(finfo.fieldInfo()->value.value.uinteger);
|
||||
mainApp->gotoFrame(finfo.fieldInfo()->value.value.uinteger);
|
||||
}
|
||||
} else {
|
||||
QString url = finfo.url();
|
||||
if (!url.isEmpty()) {
|
||||
QApplication::clipboard()->setText(url);
|
||||
QString push_msg = tr("Copied ") + url;
|
||||
wsApp->pushStatus(WiresharkApplication::TemporaryStatus, push_msg);
|
||||
mainApp->pushStatus(MainApplication::TemporaryStatus, push_msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <wsutil/utf8_entities.h>
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QPushButton>
|
||||
|
@ -343,7 +343,7 @@ void ProtocolHierarchyDialog::on_actionCopyAsCsv_triggered()
|
|||
if (!first) ++iter;
|
||||
first = false;
|
||||
}
|
||||
wsApp->clipboard()->setText(stream.readAll());
|
||||
mainApp->clipboard()->setText(stream.readAll());
|
||||
}
|
||||
|
||||
void ProtocolHierarchyDialog::on_actionCopyAsYaml_triggered()
|
||||
|
@ -364,10 +364,10 @@ void ProtocolHierarchyDialog::on_actionCopyAsYaml_triggered()
|
|||
if (!first) ++iter;
|
||||
first = false;
|
||||
}
|
||||
wsApp->clipboard()->setText(stream.readAll());
|
||||
mainApp->clipboard()->setText(stream.readAll());
|
||||
}
|
||||
|
||||
void ProtocolHierarchyDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_STATS_PROTO_HIERARCHY_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_STATS_PROTO_HIERARCHY_DIALOG);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <ui/qt/models/enabled_protocols_model.h>
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "uat_dialog.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QActionGroup>
|
||||
|
||||
|
@ -91,7 +91,7 @@ public:
|
|||
|
||||
void showUatDialog() {
|
||||
UatDialog *uat_dlg = new UatDialog(parentWidget(), prefs_get_uat_value(pref_));
|
||||
connect(uat_dlg, SIGNAL(destroyed(QObject*)), wsApp, SLOT(flushAppSignals()));
|
||||
connect(uat_dlg, SIGNAL(destroyed(QObject*)), mainApp, SLOT(flushAppSignals()));
|
||||
uat_dlg->setWindowModality(Qt::ApplicationModal);
|
||||
uat_dlg->setAttribute(Qt::WA_DeleteOnClose);
|
||||
uat_dlg->show();
|
||||
|
@ -303,11 +303,11 @@ void ProtocolPreferencesMenu::boolPreferenceTriggered()
|
|||
commandline_options_drop(module_->name, prefs_get_name(bpa->getPref()));
|
||||
|
||||
if (changed_flags & PREF_EFFECT_FIELDS) {
|
||||
wsApp->emitAppSignal(WiresharkApplication::FieldsChanged);
|
||||
mainApp->emitAppSignal(MainApplication::FieldsChanged);
|
||||
}
|
||||
/* Protocol preference changes almost always affect dissection,
|
||||
so don't bother checking flags */
|
||||
wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->emitAppSignal(MainApplication::PacketDissectionChanged);
|
||||
}
|
||||
|
||||
void ProtocolPreferencesMenu::enumPreferenceTriggered()
|
||||
|
@ -323,11 +323,11 @@ void ProtocolPreferencesMenu::enumPreferenceTriggered()
|
|||
commandline_options_drop(module_->name, prefs_get_name(epa->getPref()));
|
||||
|
||||
if (changed_flags & PREF_EFFECT_FIELDS) {
|
||||
wsApp->emitAppSignal(WiresharkApplication::FieldsChanged);
|
||||
mainApp->emitAppSignal(MainApplication::FieldsChanged);
|
||||
}
|
||||
/* Protocol preference changes almost always affect dissection,
|
||||
so don't bother checking flags */
|
||||
wsApp->emitAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->emitAppSignal(MainApplication::PacketDissectionChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include "capture_file.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <ui/qt/models/astringlist_list_model.h>
|
||||
#include <ui/qt/models/resolved_addresses_models.h>
|
||||
|
@ -47,9 +47,9 @@ ResolvedAddressesDialog::ResolvedAddressesDialog(QWidget *parent, QString captur
|
|||
file_name_ = captureFile;
|
||||
title_parts << file_name_;
|
||||
}
|
||||
setWindowTitle(wsApp->windowTitleString(title_parts));
|
||||
setWindowTitle(mainApp->windowTitleString(title_parts));
|
||||
|
||||
ui->plainTextEdit->setFont(wsApp->monospaceFont());
|
||||
ui->plainTextEdit->setFont(mainApp->monospaceFont());
|
||||
ui->plainTextEdit->setReadOnly(true);
|
||||
ui->plainTextEdit->setWordWrapMode(QTextOption::NoWrap);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <QTreeWidget>
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
static QHash<const QString, register_rtd_t *> cfg_str_to_rtd_;
|
||||
|
||||
|
@ -31,7 +31,7 @@ rtd_init(const char *args, void*) {
|
|||
if (args_l.length() > 2) {
|
||||
filter = QStringList(args_l.mid(2)).join(",");
|
||||
}
|
||||
wsApp->emitTapParameterSignal(rtd, filter, NULL);
|
||||
mainApp->emitTapParameterSignal(rtd, filter, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "rtp_player_dialog.h"
|
||||
#include <ui/qt/utils/stock_icon.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
/*
|
||||
|
@ -616,7 +616,7 @@ void RtpAnalysisDialog::on_actionSaveGraph_triggered()
|
|||
ui->tabWidget->setCurrentWidget(ui->graphTab);
|
||||
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString pdf_filter = tr("Portable Document Format (*.pdf)");
|
||||
QString png_filter = tr("Portable Network Graphics (*.png)");
|
||||
QString bmp_filter = tr("Windows Bitmap (*.bmp)");
|
||||
|
@ -632,7 +632,7 @@ void RtpAnalysisDialog::on_actionSaveGraph_triggered()
|
|||
if (!file_closed_) {
|
||||
save_file += QString("/%1").arg(cap_file_.fileBaseName());
|
||||
}
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Graph As…")),
|
||||
save_file, filter, &extension);
|
||||
|
||||
if (!file_name.isEmpty()) {
|
||||
|
@ -651,14 +651,14 @@ void RtpAnalysisDialog::on_actionSaveGraph_triggered()
|
|||
// ui->streamGraph->legend->setVisible(false);
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RtpAnalysisDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_TELEPHONY_RTP_ANALYSIS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_TELEPHONY_RTP_ANALYSIS_DIALOG);
|
||||
}
|
||||
|
||||
void RtpAnalysisDialog::tapReset(void *tapinfo_ptr)
|
||||
|
@ -898,7 +898,7 @@ void RtpAnalysisDialog::saveCsv(RtpAnalysisDialog::StreamDirection direction)
|
|||
}
|
||||
|
||||
QString file_path = WiresharkFileDialog::getSaveFileName(
|
||||
this, caption, wsApp->lastOpenDir().absoluteFilePath("RTP Packet Data.csv"),
|
||||
this, caption, mainApp->lastOpenDir().absoluteFilePath("RTP Packet Data.csv"),
|
||||
tr("Comma-separated values (*.csv)"));
|
||||
|
||||
if (file_path.isEmpty()) return;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "rtp_audio_stream.h"
|
||||
#include <ui/qt/utils/tango_colors.h>
|
||||
#include <widgets/rtp_audio_graph.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
#include <QAudio>
|
||||
|
@ -55,7 +55,7 @@
|
|||
#include <QToolButton>
|
||||
|
||||
#include <ui/qt/utils/stock_icon.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
// To do:
|
||||
// - Threaded decoding?
|
||||
|
@ -172,7 +172,7 @@ RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf, bool capture_
|
|||
{
|
||||
ui->setupUi(this);
|
||||
loadGeometry(parent.width(), parent.height());
|
||||
setWindowTitle(wsApp->windowTitleString(tr("RTP Player")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("RTP Player")));
|
||||
ui->streamTreeWidget->installEventFilter(this);
|
||||
ui->audioPlot->installEventFilter(this);
|
||||
installEventFilter(this);
|
||||
|
@ -419,7 +419,7 @@ void RtpPlayerDialog::retapPackets()
|
|||
}
|
||||
lockUI();
|
||||
ui->hintLabel->setText("<i><small>" + tr("Decoding streams...") + "</i></small>");
|
||||
wsApp->processEvents();
|
||||
mainApp->processEvents();
|
||||
|
||||
// Clear packets from existing streams before retap
|
||||
for (int row = 0; row < ui->streamTreeWidget->topLevelItemCount(); row++) {
|
||||
|
@ -463,7 +463,7 @@ void RtpPlayerDialog::rescanPackets(bool rescale_axes)
|
|||
// Show information for a user - it can last long time...
|
||||
playback_error_.clear();
|
||||
ui->hintLabel->setText("<i><small>" + tr("Decoding streams...") + "</i></small>");
|
||||
wsApp->processEvents();
|
||||
mainApp->processEvents();
|
||||
|
||||
QAudioDeviceInfo cur_out_device = getCurrentDeviceInfo();
|
||||
int row_count = ui->streamTreeWidget->topLevelItemCount();
|
||||
|
@ -580,7 +580,7 @@ void RtpPlayerDialog::createPlot(bool rescale_axes)
|
|||
// Sequence numbers
|
||||
QCPGraph *seq_graph = ui->audioPlot->addGraph();
|
||||
seq_graph->setLineStyle(QCPGraph::lsNone);
|
||||
seq_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssSquare, tango_aluminium_6, Qt::white, wsApp->font().pointSize())); // Arbitrary
|
||||
seq_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssSquare, tango_aluminium_6, Qt::white, mainApp->font().pointSize())); // Arbitrary
|
||||
seq_graph->setSelectable(QCP::stNone);
|
||||
seq_graph->setData(audio_stream->outOfSequenceTimestamps(relative_timestamps), audio_stream->outOfSequenceSamples(y_offset));
|
||||
ti->setData(graph_sequence_data_col_, Qt::UserRole, QVariant::fromValue<QCPGraph *>(seq_graph));
|
||||
|
@ -596,7 +596,7 @@ void RtpPlayerDialog::createPlot(bool rescale_axes)
|
|||
// Jitter drops
|
||||
QCPGraph *seq_graph = ui->audioPlot->addGraph();
|
||||
seq_graph->setLineStyle(QCPGraph::lsNone);
|
||||
seq_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssCircle, tango_scarlet_red_5, Qt::white, wsApp->font().pointSize())); // Arbitrary
|
||||
seq_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssCircle, tango_scarlet_red_5, Qt::white, mainApp->font().pointSize())); // Arbitrary
|
||||
seq_graph->setSelectable(QCP::stNone);
|
||||
seq_graph->setData(audio_stream->jitterDroppedTimestamps(relative_timestamps), audio_stream->jitterDroppedSamples(y_offset));
|
||||
ti->setData(graph_jitter_data_col_, Qt::UserRole, QVariant::fromValue<QCPGraph *>(seq_graph));
|
||||
|
@ -612,7 +612,7 @@ void RtpPlayerDialog::createPlot(bool rescale_axes)
|
|||
// Wrong timestamps
|
||||
QCPGraph *seq_graph = ui->audioPlot->addGraph();
|
||||
seq_graph->setLineStyle(QCPGraph::lsNone);
|
||||
seq_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDiamond, tango_sky_blue_5, Qt::white, wsApp->font().pointSize())); // Arbitrary
|
||||
seq_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDiamond, tango_sky_blue_5, Qt::white, mainApp->font().pointSize())); // Arbitrary
|
||||
seq_graph->setSelectable(QCP::stNone);
|
||||
seq_graph->setData(audio_stream->wrongTimestampTimestamps(relative_timestamps), audio_stream->wrongTimestampSamples(y_offset));
|
||||
ti->setData(graph_timestamp_data_col_, Qt::UserRole, QVariant::fromValue<QCPGraph *>(seq_graph));
|
||||
|
@ -628,7 +628,7 @@ void RtpPlayerDialog::createPlot(bool rescale_axes)
|
|||
// Inserted silence
|
||||
QCPGraph *seq_graph = ui->audioPlot->addGraph();
|
||||
seq_graph->setLineStyle(QCPGraph::lsNone);
|
||||
seq_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssTriangle, tango_butter_5, Qt::white, wsApp->font().pointSize())); // Arbitrary
|
||||
seq_graph->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssTriangle, tango_butter_5, Qt::white, mainApp->font().pointSize())); // Arbitrary
|
||||
seq_graph->setSelectable(QCP::stNone);
|
||||
seq_graph->setData(audio_stream->insertedSilenceTimestamps(relative_timestamps), audio_stream->insertedSilenceSamples(y_offset));
|
||||
ti->setData(graph_silence_data_col_, Qt::UserRole, QVariant::fromValue<QCPGraph *>(seq_graph));
|
||||
|
@ -1344,7 +1344,7 @@ void RtpPlayerDialog::on_playButton_clicked()
|
|||
double start_time;
|
||||
|
||||
ui->hintLabel->setText("<i><small>" + tr("Preparing to play...") + "</i></small>");
|
||||
wsApp->processEvents();
|
||||
mainApp->processEvents();
|
||||
ui->pauseButton->setChecked(false);
|
||||
|
||||
// Protect start time against move of marker during the play
|
||||
|
@ -1944,7 +1944,7 @@ void RtpPlayerDialog::on_todCheckBox_toggled(bool)
|
|||
|
||||
void RtpPlayerDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_TELEPHONY_RTP_PLAYER_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_TELEPHONY_RTP_PLAYER_DIALOG);
|
||||
}
|
||||
|
||||
double RtpPlayerDialog::getStartPlayMarker()
|
||||
|
@ -2296,7 +2296,7 @@ save_audio_t RtpPlayerDialog::selectFileAudioFormatAndName(QString *file_path)
|
|||
|
||||
QString sel_filter;
|
||||
*file_path = WiresharkFileDialog::getSaveFileName(
|
||||
this, tr("Save audio"), wsApp->lastOpenDir().absoluteFilePath(""),
|
||||
this, tr("Save audio"), mainApp->lastOpenDir().absoluteFilePath(""),
|
||||
ext_filter, &sel_filter);
|
||||
|
||||
if (file_path->isEmpty()) return save_audio_none;
|
||||
|
@ -2319,7 +2319,7 @@ save_payload_t RtpPlayerDialog::selectFilePayloadFormatAndName(QString *file_pat
|
|||
|
||||
QString sel_filter;
|
||||
*file_path = WiresharkFileDialog::getSaveFileName(
|
||||
this, tr("Save payload"), wsApp->lastOpenDir().absoluteFilePath(""),
|
||||
this, tr("Save payload"), mainApp->lastOpenDir().absoluteFilePath(""),
|
||||
ext_filter, &sel_filter);
|
||||
|
||||
if (file_path->isEmpty()) return save_payload_none;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "rtp_analysis_dialog.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
#include <QAction>
|
||||
|
@ -713,7 +713,7 @@ void RtpStreamDialog::on_actionCopyAsCsv_triggered()
|
|||
}
|
||||
stream << rdsl.join(",") << '\n';
|
||||
}
|
||||
wsApp->clipboard()->setText(stream.readAll());
|
||||
mainApp->clipboard()->setText(stream.readAll());
|
||||
}
|
||||
|
||||
void RtpStreamDialog::on_actionCopyAsYaml_triggered()
|
||||
|
@ -727,7 +727,7 @@ void RtpStreamDialog::on_actionCopyAsYaml_triggered()
|
|||
stream << " - " << v.toString() << '\n';
|
||||
}
|
||||
}
|
||||
wsApp->clipboard()->setText(stream.readAll());
|
||||
mainApp->clipboard()->setText(stream.readAll());
|
||||
}
|
||||
|
||||
void RtpStreamDialog::on_actionExportAsRtpDump_triggered()
|
||||
|
@ -740,10 +740,10 @@ void RtpStreamDialog::on_actionExportAsRtpDump_triggered()
|
|||
rtpstream_info_t *stream_info = rsti->streamInfo();
|
||||
if (stream_info) {
|
||||
QString file_name;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString save_file = path.canonicalPath() + "/" + cap_file_.fileBaseName();
|
||||
QString extension;
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save RTPDump As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save RTPDump As…")),
|
||||
save_file, "RTPDump Format (*.rtpdump)", &extension);
|
||||
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -752,7 +752,7 @@ void RtpStreamDialog::on_actionExportAsRtpDump_triggered()
|
|||
g_free(dest_file);
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -891,7 +891,7 @@ void RtpStreamDialog::on_streamTreeWidget_itemSelectionChanged()
|
|||
|
||||
void RtpStreamDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_TELEPHONY_RTP_STREAMS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_TELEPHONY_RTP_STREAMS_DIALOG);
|
||||
}
|
||||
|
||||
void RtpStreamDialog::on_displayFilterCheckBox_toggled(bool checked _U_)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "sctp_assoc_analyse_dialog.h"
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
//#include "wireshark_application.h"
|
||||
//#include "main_application.h"
|
||||
#include "file.h"
|
||||
#include "ui/qt/main_window.h"
|
||||
|
||||
|
|
|
@ -308,7 +308,7 @@ void SCTPChunkStatisticsDialog::on_actionChunkTypePreferences_triggered()
|
|||
uatdialog->exec();
|
||||
// Emitting PacketDissectionChanged directly from a QDialog can cause
|
||||
// problems on macOS.
|
||||
wsApp->flushAppSignals();
|
||||
mainApp->flushAppSignals();
|
||||
|
||||
ui->tableWidget->clear();
|
||||
ui->tableWidget->setRowCount(0);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include <ui/qt/widgets/qcustomplot.h>
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
SCTPGraphDialog::SCTPGraphDialog(QWidget *parent, const sctp_assoc_info_t *assoc,
|
||||
capture_file *cf, int dir) :
|
||||
|
@ -478,7 +478,7 @@ void SCTPGraphDialog::graphClicked(QCPAbstractPlottable* plottable, int, QMouseE
|
|||
void SCTPGraphDialog::save_graph(QDialog *dlg, QCustomPlot *plot)
|
||||
{
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString pdf_filter = tr("Portable Document Format (*.pdf)");
|
||||
QString png_filter = tr("Portable Network Graphics (*.png)");
|
||||
QString bmp_filter = tr("Windows Bitmap (*.bmp)");
|
||||
|
@ -490,7 +490,7 @@ void SCTPGraphDialog::save_graph(QDialog *dlg, QCustomPlot *plot)
|
|||
.arg(bmp_filter)
|
||||
.arg(jpeg_filter);
|
||||
|
||||
file_name = WiresharkFileDialog::getSaveFileName(dlg, wsApp->windowTitleString(tr("Save Graph As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(dlg, mainApp->windowTitleString(tr("Save Graph As…")),
|
||||
path.canonicalPath(), filter, &extension);
|
||||
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -506,7 +506,7 @@ void SCTPGraphDialog::save_graph(QDialog *dlg, QCustomPlot *plot)
|
|||
}
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <wsutil/utf8_entities.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <QKeyEvent>
|
||||
#include <QCheckBox>
|
||||
|
||||
|
@ -347,7 +347,7 @@ void SearchFrame::on_searchTypeComboBox_currentIndexChanged(int idx)
|
|||
sf_ui_->searchLineEdit->checkFilter();
|
||||
} else {
|
||||
sf_ui_->searchLineEdit->setToolTip(QString());
|
||||
wsApp->popStatus(WiresharkApplication::FilterSyntax);
|
||||
mainApp->popStatus(MainApplication::FilterSyntax);
|
||||
}
|
||||
|
||||
updateWidgets();
|
||||
|
@ -448,8 +448,8 @@ void SearchFrame::on_findButton_clicked()
|
|||
|
||||
g_free(cap_file_->sfilter);
|
||||
cap_file_->sfilter = g_strdup(sf_ui_->searchLineEdit->text().toUtf8().constData());
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
wsApp->pushStatus(WiresharkApplication::FileStatus, tr("Searching for %1…").arg(sf_ui_->searchLineEdit->text()));
|
||||
mainApp->popStatus(MainApplication::FileStatus);
|
||||
mainApp->pushStatus(MainApplication::FileStatus, tr("Searching for %1…").arg(sf_ui_->searchLineEdit->text()));
|
||||
|
||||
if (cap_file_->hex) {
|
||||
/* Hex value in packet data */
|
||||
|
@ -502,15 +502,15 @@ void SearchFrame::on_findButton_clicked()
|
|||
}
|
||||
|
||||
search_done:
|
||||
wsApp->popStatus(WiresharkApplication::FileStatus);
|
||||
mainApp->popStatus(MainApplication::FileStatus);
|
||||
if (!err_string.isEmpty()) {
|
||||
wsApp->pushStatus(WiresharkApplication::FilterSyntax, err_string);
|
||||
mainApp->pushStatus(MainApplication::FilterSyntax, err_string);
|
||||
}
|
||||
}
|
||||
|
||||
void SearchFrame::on_cancelButton_clicked()
|
||||
{
|
||||
wsApp->popStatus(WiresharkApplication::FilterSyntax);
|
||||
mainApp->popStatus(MainApplication::FilterSyntax);
|
||||
animatedHide();
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "progress_frame.h"
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "sequence_diagram.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <ui/qt/utils/variant_pointer.h>
|
||||
#include <ui/alert_box.h>
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
@ -436,7 +436,7 @@ void SequenceDialog::on_buttonBox_clicked(QAbstractButton *button)
|
|||
void SequenceDialog::exportDiagram()
|
||||
{
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString pdf_filter = tr("Portable Document Format (*.pdf)");
|
||||
QString png_filter = tr("Portable Network Graphics (*.png)");
|
||||
QString bmp_filter = tr("Windows Bitmap (*.bmp)");
|
||||
|
@ -453,7 +453,7 @@ void SequenceDialog::exportDiagram()
|
|||
filter.append(QString(";;%5").arg(ascii_filter));
|
||||
}
|
||||
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Graph As…")),
|
||||
path.canonicalPath(), filter, &extension);
|
||||
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -478,7 +478,7 @@ void SequenceDialog::exportDiagram()
|
|||
}
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
} else {
|
||||
open_failure_alert_box(file_name.toUtf8().constData(), errno, TRUE);
|
||||
}
|
||||
|
@ -853,7 +853,7 @@ void SequenceDialog::rtpPlayerRemove()
|
|||
|
||||
void SequenceDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_STAT_FLOW_GRAPH);
|
||||
mainApp->helpTopicAction(HELP_STAT_FLOW_GRAPH);
|
||||
}
|
||||
|
||||
SequenceInfo::SequenceInfo(seq_analysis_info_t *sainfo) :
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "rpc_service_response_time_dialog.h"
|
||||
#include "scsi_service_response_time_dialog.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QTreeWidgetItemIterator>
|
||||
|
@ -34,7 +34,7 @@ srt_init(const char *args, void*) {
|
|||
if (args_l.length() > 2) {
|
||||
filter = QStringList(args_l.mid(2)).join(",");
|
||||
}
|
||||
wsApp->emitTapParameterSignal(srt, filter, NULL);
|
||||
mainApp->emitTapParameterSignal(srt, filter, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <ui_show_packet_bytes_dialog.h>
|
||||
|
||||
#include "main_window.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
#include "epan/charsets.h"
|
||||
|
@ -283,7 +283,7 @@ void ShowPacketBytesDialog::copyBytes()
|
|||
{
|
||||
QByteArray ba(field_bytes_);
|
||||
sanitizeBuffer(ba, true);
|
||||
wsApp->clipboard()->setText(ba);
|
||||
mainApp->clipboard()->setText(ba);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -295,26 +295,26 @@ void ShowPacketBytesDialog::copyBytes()
|
|||
case ShowAsJson:
|
||||
case ShowAsRAW:
|
||||
case ShowAsYAML:
|
||||
wsApp->clipboard()->setText(ui->tePacketBytes->toPlainText());
|
||||
mainApp->clipboard()->setText(ui->tePacketBytes->toPlainText());
|
||||
break;
|
||||
|
||||
case ShowAsHTML:
|
||||
wsApp->clipboard()->setText(ui->tePacketBytes->toHtml());
|
||||
mainApp->clipboard()->setText(ui->tePacketBytes->toHtml());
|
||||
break;
|
||||
|
||||
case ShowAsImage:
|
||||
wsApp->clipboard()->setImage(image_);
|
||||
mainApp->clipboard()->setImage(image_);
|
||||
break;
|
||||
|
||||
case ShowAsCodec:
|
||||
wsApp->clipboard()->setText(ui->tePacketBytes->toPlainText().toUtf8());
|
||||
mainApp->clipboard()->setText(ui->tePacketBytes->toPlainText().toUtf8());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ShowPacketBytesDialog::saveAs()
|
||||
{
|
||||
QString file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Selected Packet Bytes As…")));
|
||||
QString file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Selected Packet Bytes As…")));
|
||||
|
||||
if (file_name.isEmpty())
|
||||
return;
|
||||
|
@ -387,7 +387,7 @@ void ShowPacketBytesDialog::saveAs()
|
|||
|
||||
void ShowPacketBytesDialog::helpButton()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_SHOW_PACKET_BYTES_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_SHOW_PACKET_BYTES_DIALOG);
|
||||
}
|
||||
|
||||
void ShowPacketBytesDialog::on_bFind_clicked()
|
||||
|
@ -596,7 +596,7 @@ void ShowPacketBytesDialog::updatePacketBytes(void)
|
|||
static const gchar hexchars[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
|
||||
|
||||
ui->tePacketBytes->clear();
|
||||
ui->tePacketBytes->setCurrentFont(wsApp->monospaceFont());
|
||||
ui->tePacketBytes->setCurrentFont(mainApp->monospaceFont());
|
||||
|
||||
switch (show_as_) {
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <wsutil/wslog.h>
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <functional>
|
||||
#include <QCheckBox>
|
||||
|
@ -96,7 +96,7 @@ simple_dialog(ESD_TYPE_E type, gint btn_mask, const gchar *msg_format, ...)
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, msg_format);
|
||||
SimpleDialog sd(wsApp->mainWindow(), type, btn_mask, msg_format, ap);
|
||||
SimpleDialog sd(mainApp->mainWindow(), type, btn_mask, msg_format, ap);
|
||||
va_end(ap);
|
||||
|
||||
sd.exec();
|
||||
|
@ -109,7 +109,7 @@ simple_dialog_async(ESD_TYPE_E type, gint btn_mask, const gchar *msg_format, ...
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, msg_format);
|
||||
SimpleDialog sd(wsApp->mainWindow(), type, btn_mask, msg_format, ap);
|
||||
SimpleDialog sd(mainApp->mainWindow(), type, btn_mask, msg_format, ap);
|
||||
va_end(ap);
|
||||
|
||||
sd.show();
|
||||
|
@ -131,7 +131,7 @@ simple_message_box(ESD_TYPE_E type, gboolean *notagain,
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, msg_format);
|
||||
SimpleDialog sd(wsApp->mainWindow(), type, ESD_BTN_OK, msg_format, ap);
|
||||
SimpleDialog sd(mainApp->mainWindow(), type, ESD_BTN_OK, msg_format, ap);
|
||||
va_end(ap);
|
||||
|
||||
sd.setDetailedText(secondary_msg);
|
||||
|
@ -164,7 +164,7 @@ vsimple_error_message_box(const char *msg_format, va_list ap)
|
|||
exit(0);
|
||||
#endif
|
||||
|
||||
SimpleDialog sd(wsApp->mainWindow(), ESD_TYPE_ERROR, ESD_BTN_OK, msg_format, ap);
|
||||
SimpleDialog sd(mainApp->mainWindow(), ESD_TYPE_ERROR, ESD_BTN_OK, msg_format, ap);
|
||||
sd.show();
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ vsimple_warning_message_box(const char *msg_format, va_list ap)
|
|||
exit(0);
|
||||
#endif
|
||||
|
||||
SimpleDialog sd(wsApp->mainWindow(), ESD_TYPE_WARN, ESD_BTN_OK, msg_format, ap);
|
||||
SimpleDialog sd(mainApp->mainWindow(), ESD_TYPE_WARN, ESD_BTN_OK, msg_format, ap);
|
||||
sd.show();
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ SimpleDialog::SimpleDialog(QWidget *parent, ESD_TYPE_E type, int btn_mask, const
|
|||
return;
|
||||
}
|
||||
|
||||
if (!parent || !wsApp->isInitialized() || wsApp->isReloadingLua()) {
|
||||
if (!parent || !mainApp->isInitialized() || mainApp->isReloadingLua()) {
|
||||
message_queue_ << msg_pair;
|
||||
if (type > max_severity_) {
|
||||
max_severity_ = type;
|
||||
|
@ -299,7 +299,7 @@ void SimpleDialog::displayQueuedMessages(QWidget *parent)
|
|||
return;
|
||||
}
|
||||
|
||||
QMessageBox mb(parent ? parent : wsApp->mainWindow());
|
||||
QMessageBox mb(parent ? parent : mainApp->mainWindow());
|
||||
|
||||
switch(max_severity_) {
|
||||
case ESD_TYPE_ERROR:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
// To do:
|
||||
// - Hide rows with zero counts.
|
||||
|
@ -32,7 +32,7 @@ simple_stat_init(const char *args, void*) {
|
|||
if (args_l.length() > 2) {
|
||||
filter = QStringList(args_l.mid(2)).join(",");
|
||||
}
|
||||
wsApp->emitTapParameterSignal(simple_stat, filter, NULL);
|
||||
mainApp->emitTapParameterSignal(simple_stat, filter, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <QElapsedTimer>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
SupportedProtocolsDialog::SupportedProtocolsDialog(QWidget *parent) :
|
||||
GeometryStateDialog(parent),
|
||||
|
@ -34,7 +34,7 @@ SupportedProtocolsDialog::SupportedProtocolsDialog(QWidget *parent) :
|
|||
loadGeometry(parent->width() * 3 / 4, parent->height());
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Supported Protocols")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Supported Protocols")));
|
||||
|
||||
// Some of our names are unreasonably long.
|
||||
int one_em = fontMetrics().height();
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#include "progress_frame.h"
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QContextMenuEvent>
|
||||
|
@ -123,10 +123,10 @@ void TapParameterDialog::registerDialog(const QString title, const char *cfg_abb
|
|||
QString cfg_str = cfg_abbr;
|
||||
cfg_str_to_creator_[cfg_str] = creator;
|
||||
|
||||
QAction *tpd_action = new QAction(title, wsApp);
|
||||
QAction *tpd_action = new QAction(title, mainApp);
|
||||
tpd_action->setObjectName(action_name_);
|
||||
tpd_action->setData(cfg_str);
|
||||
wsApp->addDynamicMenuGroupItem(group, tpd_action);
|
||||
mainApp->addDynamicMenuGroupItem(group, tpd_action);
|
||||
}
|
||||
|
||||
TapParameterDialog *TapParameterDialog::showTapParameterStatistics(QWidget &parent, CaptureFile &cf, const QString cfg_str, const QString arg, void *)
|
||||
|
@ -533,7 +533,7 @@ void TapParameterDialog::on_applyFilterButton_clicked()
|
|||
|
||||
void TapParameterDialog::on_actionCopyToClipboard_triggered()
|
||||
{
|
||||
wsApp->clipboard()->setText(getTreeAsString(ST_FORMAT_PLAIN));
|
||||
mainApp->clipboard()->setText(getTreeAsString(ST_FORMAT_PLAIN));
|
||||
}
|
||||
|
||||
void TapParameterDialog::on_actionSaveAs_triggered()
|
||||
|
@ -548,7 +548,7 @@ void TapParameterDialog::on_actionSaveAs_triggered()
|
|||
#ifdef Q_OS_WIN
|
||||
HANDLE da_ctx = set_thread_per_monitor_v2_awareness();
|
||||
#endif
|
||||
QFileDialog SaveAsDialog(this, wsApp->windowTitleString(tr("Save Statistics As…")),
|
||||
QFileDialog SaveAsDialog(this, mainApp->windowTitleString(tr("Save Statistics As…")),
|
||||
get_last_open_dir());
|
||||
SaveAsDialog.setNameFilter(tr("Plain text file (*.txt);;"
|
||||
"Comma separated values (*.csv);;"
|
||||
|
@ -608,6 +608,6 @@ void TapParameterDialog::on_actionSaveAs_triggered()
|
|||
void TapParameterDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
if (help_topic_ > 0) {
|
||||
wsApp->helpTopicAction((topic_action_e) help_topic_);
|
||||
mainApp->helpTopicAction((topic_action_e) help_topic_);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <ui/qt/utils/tango_colors.h>
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "progress_frame.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include "ui/qt/widgets/wireshark_file_dialog.h"
|
||||
|
||||
#include <QCursor>
|
||||
|
@ -1843,7 +1843,7 @@ void TCPStreamDialog::transformYRange(const QCPRange &y_range1)
|
|||
void TCPStreamDialog::on_buttonBox_accepted()
|
||||
{
|
||||
QString file_name, extension;
|
||||
QDir path(wsApp->lastOpenDir());
|
||||
QDir path(mainApp->lastOpenDir());
|
||||
QString pdf_filter = tr("Portable Document Format (*.pdf)");
|
||||
QString png_filter = tr("Portable Network Graphics (*.png)");
|
||||
QString bmp_filter = tr("Windows Bitmap (*.bmp)");
|
||||
|
@ -1855,7 +1855,7 @@ void TCPStreamDialog::on_buttonBox_accepted()
|
|||
.arg(bmp_filter)
|
||||
.arg(jpeg_filter);
|
||||
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As…")),
|
||||
file_name = WiresharkFileDialog::getSaveFileName(this, mainApp->windowTitleString(tr("Save Graph As…")),
|
||||
path.canonicalPath(), filter, &extension);
|
||||
|
||||
if (file_name.length() > 0) {
|
||||
|
@ -1871,7 +1871,7 @@ void TCPStreamDialog::on_buttonBox_accepted()
|
|||
}
|
||||
// else error dialog?
|
||||
if (save_ok) {
|
||||
wsApp->setLastOpenDirFromFilename(file_name);
|
||||
mainApp->setLastOpenDirFromFilename(file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2212,5 +2212,5 @@ void TCPStreamDialog::GraphUpdater::doUpdate()
|
|||
|
||||
void TCPStreamDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_STATS_TCP_STREAM_GRAPHS_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_STATS_TCP_STREAM_GRAPHS_DIALOG);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "time_shift_dialog.h"
|
||||
#include <ui_time_shift_dialog.h>
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <ui/time_shift.h>
|
||||
#include <ui/qt/utils/color_utils.h>
|
||||
|
@ -24,7 +24,7 @@ TimeShiftDialog::TimeShiftDialog(QWidget *parent, capture_file *cf) :
|
|||
apply_button_(NULL)
|
||||
{
|
||||
ts_ui_->setupUi(this);
|
||||
setWindowTitle(wsApp->windowTitleString(tr("Time Shift")));
|
||||
setWindowTitle(mainApp->windowTitleString(tr("Time Shift")));
|
||||
apply_button_ = ts_ui_->buttonBox->button(QDialogButtonBox::Apply);
|
||||
apply_button_->setDefault(true);
|
||||
connect(apply_button_, &QPushButton::clicked, this, &TimeShiftDialog::applyTimeShift);
|
||||
|
@ -262,5 +262,5 @@ void TimeShiftDialog::applyTimeShift()
|
|||
|
||||
void TimeShiftDialog::on_buttonBox_helpRequested()
|
||||
{
|
||||
wsApp->helpTopicAction(HELP_TIME_SHIFT_DIALOG);
|
||||
mainApp->helpTopicAction(HELP_TIME_SHIFT_DIALOG);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "ui/recent.h"
|
||||
|
||||
#include "progress_frame.h"
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QClipboard>
|
||||
|
@ -70,8 +70,8 @@ TrafficTableDialog::TrafficTableDialog(QWidget &parent, CaptureFile &cf, const c
|
|||
nanosecond_timestamps_ = true;
|
||||
}
|
||||
|
||||
connect(wsApp, SIGNAL(addressResolutionChanged()), this, SLOT(currentTabChanged()));
|
||||
connect(wsApp, SIGNAL(addressResolutionChanged()), this, SLOT(updateWidgets()));
|
||||
connect(mainApp, SIGNAL(addressResolutionChanged()), this, SLOT(currentTabChanged()));
|
||||
connect(mainApp, SIGNAL(addressResolutionChanged()), this, SLOT(updateWidgets()));
|
||||
connect(ui->trafficTableTabWidget, SIGNAL(currentChanged(int)),
|
||||
this, SLOT(currentTabChanged()));
|
||||
connect(&cap_file_, SIGNAL(captureEvent(CaptureEvent)),
|
||||
|
@ -317,7 +317,7 @@ void TrafficTableDialog::copyAsCsv()
|
|||
}
|
||||
stream << rdsl.join(",") << '\n';
|
||||
}
|
||||
wsApp->clipboard()->setText(stream.readAll());
|
||||
mainApp->clipboard()->setText(stream.readAll());
|
||||
}
|
||||
|
||||
void TrafficTableDialog::copyAsYaml()
|
||||
|
@ -336,7 +336,7 @@ void TrafficTableDialog::copyAsYaml()
|
|||
stream << " - " << v.toString() << '\n';
|
||||
}
|
||||
}
|
||||
wsApp->clipboard()->setText(stream.readAll());
|
||||
mainApp->clipboard()->setText(stream.readAll());
|
||||
}
|
||||
|
||||
TrafficTableTreeWidget::TrafficTableTreeWidget(QWidget *parent, register_ct_t *table) :
|
||||
|
@ -348,7 +348,7 @@ TrafficTableTreeWidget::TrafficTableTreeWidget(QWidget *parent, register_ct_t *t
|
|||
setRootIsDecorated(false);
|
||||
sortByColumn(0, Qt::AscendingOrder);
|
||||
|
||||
connect(wsApp, SIGNAL(addressResolutionChanged()), this, SLOT(updateItemsForSettingChange()));
|
||||
connect(mainApp, SIGNAL(addressResolutionChanged()), this, SLOT(updateItemsForSettingChange()));
|
||||
}
|
||||
|
||||
QList<QVariant> TrafficTableTreeWidget::rowData(int row) const
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "uat_dialog.h"
|
||||
#include <ui_uat_dialog.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include "epan/strutil.h"
|
||||
#include "epan/uat-int.h"
|
||||
|
@ -345,11 +345,11 @@ void UatDialog::applyChanges()
|
|||
|
||||
if (uat_->flags & UAT_AFFECTS_FIELDS) {
|
||||
/* Recreate list with new fields and redissect packets */
|
||||
wsApp->queueAppSignal(WiresharkApplication::FieldsChanged);
|
||||
mainApp->queueAppSignal(MainApplication::FieldsChanged);
|
||||
}
|
||||
if (uat_->flags & UAT_AFFECTS_DISSECTION) {
|
||||
/* Just redissect packets if we have any */
|
||||
wsApp->queueAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->queueAppSignal(MainApplication::PacketDissectionChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "uat_frame.h"
|
||||
#include <ui_uat_frame.h>
|
||||
#include <ui/qt/widgets/display_filter_edit.h>
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
|
||||
#include <ui/qt/widgets/copy_from_profile_button.h>
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
|
@ -147,11 +147,11 @@ void UatFrame::applyChanges()
|
|||
|
||||
if (uat_->flags & UAT_AFFECTS_FIELDS) {
|
||||
/* Recreate list with new fields and redissect packets */
|
||||
wsApp->queueAppSignal(WiresharkApplication::FieldsChanged);
|
||||
mainApp->queueAppSignal(MainApplication::FieldsChanged);
|
||||
}
|
||||
if (uat_->flags & UAT_AFFECTS_DISSECTION) {
|
||||
/* Just redissect packets if we have any */
|
||||
wsApp->queueAppSignal(WiresharkApplication::PacketDissectionChanged);
|
||||
mainApp->queueAppSignal(MainApplication::PacketDissectionChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue