blob: fa55420dfd7c96c0780d9231e3cb43069d708e4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtWidgets/qapplication.h>
#include "mainwindow.h"
#include <stdio.h>
using namespace Qt::StringLiterals;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QCoreApplication::setOrganizationName(u"QtProject"_s);
QCoreApplication::setApplicationName(u"QDBusViewer"_s);
MainWindow mw;
#if !defined(Q_OS_OSX) && !defined(Q_OS_WIN)
app.setWindowIcon(QIcon(":/qt-project.org/qdbusviewer/images/qdbusviewer.png"_L1));
#endif
#ifdef Q_OS_OSX
mw.setWindowTitle(qApp->translate("QtDBusViewer", "Qt D-Bus Viewer"));
#endif
QStringList args = app.arguments();
while (args.size()) {
QString arg = args.takeFirst();
if (arg == "--bus"_L1)
mw.addCustomBusTab(args.takeFirst());
}
mw.show();
return app.exec();
}
|