X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmain.cpp;h=b5e205b8e6360a46c44dfede86778c6889e89b18;hp=5ce1ac9ccaf33cf0f31e19b5e6d2e3b7c3798180;hb=85b55cf023c96f4dbd61ec415a15214f99e281b3;hpb=4cf82c9e10e1301ddfc47e5ac23e22b96ffb0bf3 diff --git a/src/common/main.cpp b/src/common/main.cpp index 5ce1ac9c..b5e205b8 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -54,7 +54,7 @@ #include -#if not defined(Q_OS_WIN32) && not defined(MAC_10_4_SDK) +#if defined(HAVE_EXECINFO) and not defined(Q_OS_MAC) #include #include #include @@ -66,8 +66,9 @@ void handle_signal(int sig) { QCoreApplication::quit(); } -#if not defined(Q_OS_WIN32) && not defined(MAC_10_4_SDK) +#if defined(HAVE_EXECINFO) and not defined(Q_OS_MAC) void handle_crash(int sig) { + Q_UNUSED(sig) void* callstack[128]; int i, frames = backtrace(callstack, 128); @@ -128,7 +129,7 @@ void handle_crash(int sig) { dumpFile.close(); exit(27); } -#endif // ifndef Q_OS_WIN32 +#endif // #if defined(HAVE_EXECINFO) and not defined(Q_OS_MAC) int main(int argc, char **argv) { @@ -136,27 +137,15 @@ int main(int argc, char **argv) { signal(SIGTERM, handle_signal); signal(SIGINT, handle_signal); -#if not defined(Q_OS_WIN32) && not defined(MAC_10_4_SDK) +#if defined(HAVE_EXECINFO) and not defined(Q_OS_MAC) signal(SIGABRT, handle_crash); signal(SIGBUS, handle_crash); signal(SIGSEGV, handle_crash); -#endif // ndef Q_OS_WIN32 - +#endif // #if defined(HAVE_EXECINFO) and not defined(Q_OS_MAC) + Global::registerMetaTypes(); Global::setupVersion(); -/* -#if defined BUILD_CORE - Global::runMode = Global::CoreOnly; - QCoreApplication app(argc, argv); -#elif defined BUILD_QTUI - Global::runMode = Global::ClientOnly; - QApplication app(argc, argv); -#else - Global::runMode = Global::Monolithic; - QApplication app(argc, argv); -#endif -*/ #if defined BUILD_CORE Global::runMode = Global::CoreOnly; QCoreApplication app(argc, argv); @@ -168,8 +157,6 @@ int main(int argc, char **argv) { QtUiApplication app(argc, argv); #endif - - Global::parser = CliParser(QCoreApplication::arguments()); #ifndef BUILD_QTUI @@ -231,7 +218,7 @@ int main(int argc, char **argv) { QCoreApplication::setApplicationName("Quassel IRC"); QCoreApplication::setOrganizationName("Quassel Project"); - + #ifndef BUILD_QTUI Core::instance(); // create and init the core #endif @@ -253,10 +240,10 @@ int main(int argc, char **argv) { } #endif -#ifndef BUILD_CORE +#ifndef BUILD_CORE app.resumeSessionIfPossible(); #endif - + int exitCode = app.exec(); #ifndef BUILD_QTUI