Initialize crash handler.

This commit is contained in:
Teo Mrnjavac 2016-03-16 13:20:39 +01:00
parent fe1e1cb3c0
commit 8f86b197f2

View File

@ -19,10 +19,16 @@
#include "CalamaresApplication.h" #include "CalamaresApplication.h"
#include "CalamaresConfig.h"
#include "kdsingleapplicationguard/kdsingleapplicationguard.h" #include "kdsingleapplicationguard/kdsingleapplicationguard.h"
#include "utils/CalamaresUtils.h" #include "utils/CalamaresUtils.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#ifdef WITH_KCRASH
#include <KF5/KCrash/KCrash>
#include <KF5/KCoreAddons/KAboutData>
#endif
#include <QCommandLineParser> #include <QCommandLineParser>
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
@ -32,6 +38,22 @@ main( int argc, char* argv[] )
{ {
CalamaresApplication a( argc, argv ); CalamaresApplication a( argc, argv );
#ifdef WITH_KCRASH
KAboutData aboutData( "calamares",
"Calamares",
a.applicationVersion(),
"The universal system installer",
KAboutLicense::GPL_V3,
QString(),
QString(),
"https://calamares.io",
"teo@kde.org" );
KAboutData::setApplicationData( aboutData );
KCrash::initialize();
KCrash::setCrashHandler();
// TODO: umount anything in /tmp/calamares-... as an emergency save function
#endif
QCommandLineParser parser; QCommandLineParser parser;
parser.setApplicationDescription( "Distribution-independent installer framework" ); parser.setApplicationDescription( "Distribution-independent installer framework" );
parser.addHelpOption(); parser.addHelpOption();