mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Enable the crash reporter before settings are loaded and (in case) deactivate afterwards to catch crashes in settings loading
This commit is contained in:
@@ -154,14 +154,22 @@ main( int argc, char *argv[] )
|
|||||||
|
|
||||||
TomahawkApp a( argc, argv );
|
TomahawkApp a( argc, argv );
|
||||||
|
|
||||||
|
#ifdef WITH_CRASHREPORTER
|
||||||
|
CrashReporter::Handler* handler = new CrashReporter::Handler( QDir::tempPath(), !TomahawkUtils::headless(), "tomahawk_crash_reporter" );
|
||||||
|
#endif
|
||||||
|
|
||||||
// MUST register StateHash ****before*** initing TomahawkSettingsGui as constructor of settings does upgrade before Gui subclass registers type
|
// MUST register StateHash ****before*** initing TomahawkSettingsGui as constructor of settings does upgrade before Gui subclass registers type
|
||||||
TomahawkSettings::registerCustomSettingsHandlers();
|
TomahawkSettings::registerCustomSettingsHandlers();
|
||||||
new TomahawkSettings( &a );
|
new TomahawkSettings( &a );
|
||||||
|
|
||||||
#ifdef WITH_CRASHREPORTER
|
#ifdef WITH_CRASHREPORTER
|
||||||
// new CrashReporter::Handler( QDir::tempPath(), TomahawkSettings::instance()->crashReporterEnabled() && !TomahawkUtils::headless(), "tomahawk_crash_reporter" );
|
if( !TomahawkUtils::headless() )
|
||||||
|
{
|
||||||
|
handler->setActive( TomahawkSettings::instance()->crashReporterEnabled() );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
KDSingleApplicationGuard guard( KDSingleApplicationGuard::AutoKillOtherInstances );
|
KDSingleApplicationGuard guard( KDSingleApplicationGuard::AutoKillOtherInstances );
|
||||||
QObject::connect( &guard, SIGNAL( instanceStarted( KDSingleApplicationGuard::Instance ) ), &a, SLOT( instanceStarted( KDSingleApplicationGuard::Instance ) ) );
|
QObject::connect( &guard, SIGNAL( instanceStarted( KDSingleApplicationGuard::Instance ) ), &a, SLOT( instanceStarted( KDSingleApplicationGuard::Instance ) ) );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user