X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fquassel.cpp;h=f5954c0df99551a2176eb82e55f0daa3edff6c45;hp=6490eb9b70752b9fd58432bb9a27bb7f8a4d5887;hb=8440be1fc6350dec8aa582d1493a8d2911c070a3;hpb=ce26c3770b254362c7bd1e094ba8f8bf22133653 diff --git a/src/common/quassel.cpp b/src/common/quassel.cpp index 6490eb9b..f5954c0d 100644 --- a/src/common/quassel.cpp +++ b/src/common/quassel.cpp @@ -22,7 +22,7 @@ #include #include -#if !defined Q_OS_WIN32 && !defined Q_OS_MAC +#if !defined Q_OS_WIN && !defined Q_OS_MAC # include # include # include @@ -91,22 +91,22 @@ bool Quassel::init() if (_handleCrashes) { // we have crashhandler for win32 and unix (based on execinfo). -#if defined(Q_OS_WIN32) || defined(HAVE_EXECINFO) -# ifndef Q_OS_WIN32 +#if defined(Q_OS_WIN) || defined(HAVE_EXECINFO) +# ifndef Q_OS_WIN // we only handle crashes ourselves if coredumps are disabled struct rlimit *limit = (rlimit *)malloc(sizeof(struct rlimit)); int rc = getrlimit(RLIMIT_CORE, limit); if (rc == -1 || !((long)limit->rlim_cur > 0 || limit->rlim_cur == RLIM_INFINITY)) { -# endif /* Q_OS_WIN32 */ +# endif /* Q_OS_WIN */ signal(SIGABRT, handleSignal); signal(SIGSEGV, handleSignal); -# ifndef Q_OS_WIN32 +# ifndef Q_OS_WIN signal(SIGBUS, handleSignal); } free(limit); -# endif /* Q_OS_WIN32 */ -#endif /* Q_OS_WIN32 || HAVE_EXECINFO */ +# endif /* Q_OS_WIN */ +#endif /* Q_OS_WIN || HAVE_EXECINFO */ } _initialized = true; @@ -287,7 +287,7 @@ void Quassel::handleSignal(int sig) break; case SIGABRT: case SIGSEGV: -#ifndef Q_OS_WIN32 +#ifndef Q_OS_WIN case SIGBUS: #endif logBacktrace(coreDumpFileName()); @@ -355,12 +355,12 @@ QString Quassel::configDirPath() _configDirPath = Quassel::optionValue("configdir"); } else { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // On Mac, the path is always the same _configDirPath = QDir::homePath() + "/Library/Application Support/Quassel/"; #else // We abuse QSettings to find us a sensible path on the other platforms -# ifdef Q_WS_WIN +# ifdef Q_OS_WIN // don't use the registry QSettings::Format format = QSettings::IniFormat; # else @@ -369,7 +369,7 @@ QString Quassel::configDirPath() QSettings s(format, QSettings::UserScope, QCoreApplication::organizationDomain(), buildInfo().applicationName); QFileInfo fileInfo(s.fileName()); _configDirPath = fileInfo.dir().absolutePath(); -#endif /* Q_WS_MAC */ +#endif /* Q_OS_MAC */ } if (!_configDirPath.endsWith(QDir::separator()) && !_configDirPath.endsWith('/')) @@ -403,12 +403,12 @@ QStringList Quassel::findDataDirPaths() const } else { // Provide a fallback -#ifdef Q_OS_WIN32 +#ifdef Q_OS_WIN dataDirNames << qgetenv("APPDATA") + QCoreApplication::organizationDomain() + "/share/apps/quassel/" << qgetenv("APPDATA") + QCoreApplication::organizationDomain() << QCoreApplication::applicationDirPath(); } -#elif defined Q_WS_MAC +#elif defined Q_OS_MAC dataDirNames << QDir::homePath() + "/Library/Application Support/Quassel/" << QCoreApplication::applicationDirPath(); }