PageRenderTime 75ms CodeModel.GetById 33ms app.highlight 4ms RepoModel.GetById 37ms app.codeStats 0ms

/src/breakpad/CrashReporter/main.cpp

http://github.com/tomahawk-player/tomahawk
C++ | 56 lines | 24 code | 11 blank | 21 comment | 2 complexity | ddecf48bb1e8d5111b4905ef76646ed9 MD5 | raw file
 1/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
 2 *
 3 *   Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
 4 *
 5 *   Tomahawk is free software: you can redistribute it and/or modify
 6 *   it under the terms of the GNU General Public License as published by
 7 *   the Free Software Foundation, either version 3 of the License, or
 8 *   (at your option) any later version.
 9 *
10 *   Tomahawk is distributed in the hope that it will be useful,
11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *   GNU General Public License for more details.
14 *
15 *   You should have received a copy of the GNU General Public License
16 *   along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include "CrashReporter.h"
20
21#include <QTranslator>
22
23#include <iostream>
24
25const char* k_usage =
26    "Usage:\n"
27    "  CrashReporter <logDir> <dumpFileName> <productName>\n";
28
29int main( int argc, char* argv[] )
30{
31    // used by some Qt stuff, eg QSettings
32    // leave first! As Settings object is created quickly
33    QCoreApplication::setApplicationName( "Tomahawk" );
34    QCoreApplication::setOrganizationName( "Tomahawk" );
35    QCoreApplication::setOrganizationDomain( "tomahawk-player.org" );
36
37    QApplication app( argc, argv );
38
39    QString langCode;
40    QTranslator translatorApp;
41    QTranslator translatorQt;
42
43/*    app.installTranslator( &translatorApp );
44    app.installTranslator( &translatorQt );*/
45
46    if ( app.arguments().size() != 4 )
47    {
48        std::cout << k_usage;
49        return 1;
50    }
51
52    CrashReporter reporter( app.arguments() );
53    reporter.show();
54
55    return app.exec();
56}