/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. #include "CrashReporter.h"
  19. #include <QTranslator>
  20. #include <iostream>
  21. const char* k_usage =
  22. "Usage:\n"
  23. " CrashReporter <logDir> <dumpFileName> <productName>\n";
  24. int main( int argc, char* argv[] )
  25. {
  26. // used by some Qt stuff, eg QSettings
  27. // leave first! As Settings object is created quickly
  28. QCoreApplication::setApplicationName( "Tomahawk" );
  29. QCoreApplication::setOrganizationName( "Tomahawk" );
  30. QCoreApplication::setOrganizationDomain( "tomahawk-player.org" );
  31. QApplication app( argc, argv );
  32. QString langCode;
  33. QTranslator translatorApp;
  34. QTranslator translatorQt;
  35. /* app.installTranslator( &translatorApp );
  36. app.installTranslator( &translatorQt );*/
  37. if ( app.arguments().size() != 4 )
  38. {
  39. std::cout << k_usage;
  40. return 1;
  41. }
  42. CrashReporter reporter( app.arguments() );
  43. reporter.show();
  44. return app.exec();
  45. }