2012-01-04 22:13:01 +00:00
|
|
|
/* wireshark_application.cpp
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-07 11:26:45 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2012-01-04 22:13:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "wireshark_application.h"
|
|
|
|
|
|
|
|
WiresharkApplication *wsApp = NULL;
|
|
|
|
|
|
|
|
WiresharkApplication::WiresharkApplication(int &argc, char **argv) :
|
2022-02-01 03:30:09 +00:00
|
|
|
MainApplication(argc, argv)
|
2012-01-04 22:13:01 +00:00
|
|
|
{
|
2021-11-10 19:48:26 +00:00
|
|
|
wsApp = this;
|
2022-09-01 00:36:49 +00:00
|
|
|
Q_INIT_RESOURCE(wsicon);
|
2014-12-29 19:42:01 +00:00
|
|
|
setApplicationName("Wireshark");
|
2022-01-12 00:41:48 +00:00
|
|
|
setDesktopFileName(QStringLiteral("org.wireshark.Wireshark"));
|
2012-01-04 22:13:01 +00:00
|
|
|
}
|
|
|
|
|
2017-02-03 22:15:56 +00:00
|
|
|
WiresharkApplication::~WiresharkApplication()
|
|
|
|
{
|
2021-11-10 19:48:26 +00:00
|
|
|
wsApp = NULL;
|
2019-11-21 14:57:11 +00:00
|
|
|
}
|
2022-09-09 23:24:08 +00:00
|
|
|
|
|
|
|
void WiresharkApplication::initializeIcons()
|
|
|
|
{
|
|
|
|
// Do this as late as possible in order to allow time for
|
|
|
|
// MimeDatabaseInitThread to do its work.
|
|
|
|
QList<int> icon_sizes = QList<int>() << 16 << 24 << 32 << 48 << 64 << 128 << 256 << 512 << 1024;
|
|
|
|
foreach (int icon_size, icon_sizes) {
|
|
|
|
QString icon_path = QString(":/wsicon/wsicon%1.png").arg(icon_size);
|
|
|
|
normal_icon_.addFile(icon_path);
|
|
|
|
icon_path = QString(":/wsicon/wsiconcap%1.png").arg(icon_size);
|
|
|
|
capture_icon_.addFile(icon_path);
|
|
|
|
}
|
|
|
|
}
|