-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.cpp
63 lines (49 loc) · 2.1 KB
/
main.cpp
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* Copyright © 2007 Michael Pyne <michael.pyne@kdemail.net>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "MainWindowImpl.h"
#include <QtGui>
#include <QtCore>
/**
* @todo All issues in list should be closed ASAP
* 1. App shows children only for first occurance of library
* -> if app depends on QtGui and QtCore, QtGui depends on QtCore,
* than 2 rows QtCore presented, but only one of them has children
*
* @todo Issues for some future
* 1. Add multidocument support (with tabs?)
* 2. Maybe add "open parent folder" context menu for rows
* 3. Maybe add column with library size
* 4. Add warning when file is not in ELF format
*/
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QTranslator *qtTranslator = new QTranslator(qApp);
qtTranslator->load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
qApp->installTranslator(qtTranslator);
QTranslator appTranslator;
appTranslator.load(":/i18n/translations/i18n_" + QLocale::system().name());
app.installTranslator(&appTranslator);
MainWindowImpl mw(0);
mw.show();
QStringList arguments = app.arguments();
if(arguments.count() > 1) {
mw.openFile(arguments.last());
}
app.connect(&mw, SIGNAL(quit()), SLOT(quit()));
return app.exec();
}
// vim: set ts=8 sw=4 et encoding=utf8: