File indexing completed on 2024-04-28 05:41:05
0001 /* 0002 Copyright (C) 2013-2014 Volker Krause <vkrause@kde.org> 0003 0004 This program is free software; you can redistribute it and/or modify it 0005 under the terms of the GNU Library General Public License as published by 0006 the Free Software Foundation; either version 2 of the License, or (at your 0007 option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, but WITHOUT 0010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0011 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 0012 License for more details. 0013 0014 You should have received a copy of the GNU General Public License 0015 along with this program. If not, see <https://www.gnu.org/licenses/>. 0016 */ 0017 0018 #include <config-elf-dissector-version.h> 0019 0020 #include <ui/mainwindow.h> 0021 #include <printers/dwarfprinter.h> 0022 0023 #include <QApplication> 0024 #include <QCommandLineParser> 0025 0026 int main(int argc, char** argv) 0027 { 0028 QApplication app(argc, argv); 0029 0030 QCoreApplication::setApplicationName(QStringLiteral("ELF Dissector")); 0031 QGuiApplication::setApplicationDisplayName(MainWindow::tr("ELF Dissector")); 0032 QCoreApplication::setOrganizationName(QStringLiteral("KDE")); 0033 QCoreApplication::setOrganizationDomain(QStringLiteral("kde.org")); 0034 QCoreApplication::setApplicationVersion(QStringLiteral(ELF_DISSECTOR_VERSION_STRING)); 0035 QGuiApplication::setDesktopFileName(QStringLiteral("org.kde.elf-dissector")); 0036 0037 Q_INIT_RESOURCE(plotter); 0038 DwarfPrinter::registerConverterFunctions(); 0039 0040 QCommandLineParser parser; 0041 parser.addHelpOption(); 0042 parser.addVersionOption(); 0043 parser.addPositionalArgument(QStringLiteral("elf"), MainWindow::tr("ELF file to open"), QStringLiteral("<elf>")); 0044 parser.process(app); 0045 0046 MainWindow mainWindow; 0047 mainWindow.show(); 0048 foreach (const QString &file, parser.positionalArguments()) 0049 mainWindow.loadFile(file); 0050 0051 return app.exec(); 0052 }