Changeset View
Changeset View
Standalone View
Standalone View
src/drkonqibackends.cpp
Show All 30 Lines | |||||
31 | #include "drkonqi_debug.h" | 31 | #include "drkonqi_debug.h" | ||
32 | 32 | | |||
33 | #include "crashedapplication.h" | 33 | #include "crashedapplication.h" | ||
34 | #include "debugger.h" | 34 | #include "debugger.h" | ||
35 | #include "debuggermanager.h" | 35 | #include "debuggermanager.h" | ||
36 | #include "backtracegenerator.h" | 36 | #include "backtracegenerator.h" | ||
37 | #include "drkonqi.h" | 37 | #include "drkonqi.h" | ||
38 | 38 | | |||
39 | #ifdef Q_OS_MACOS | ||||
40 | #include <AvailabilityMacros.h> | ||||
41 | #endif | ||||
42 | | ||||
39 | AbstractDrKonqiBackend::~AbstractDrKonqiBackend() | 43 | AbstractDrKonqiBackend::~AbstractDrKonqiBackend() | ||
40 | { | 44 | { | ||
41 | } | 45 | } | ||
42 | 46 | | |||
43 | bool AbstractDrKonqiBackend::init() | 47 | bool AbstractDrKonqiBackend::init() | ||
44 | { | 48 | { | ||
45 | m_crashedApplication = constructCrashedApplication(); | 49 | m_crashedApplication = constructCrashedApplication(); | ||
46 | m_debuggerManager = constructDebuggerManager(); | 50 | m_debuggerManager = constructDebuggerManager(); | ||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Line(s) | 116 | { | |||
153 | 157 | | |||
154 | return a; | 158 | return a; | ||
155 | } | 159 | } | ||
156 | 160 | | |||
157 | DebuggerManager *KCrashBackend::constructDebuggerManager() | 161 | DebuggerManager *KCrashBackend::constructDebuggerManager() | ||
158 | { | 162 | { | ||
159 | QList<Debugger> internalDebuggers = Debugger::availableInternalDebuggers(QStringLiteral("KCrash")); | 163 | QList<Debugger> internalDebuggers = Debugger::availableInternalDebuggers(QStringLiteral("KCrash")); | ||
160 | KConfigGroup config(KSharedConfig::openConfig(), "DrKonqi"); | 164 | KConfigGroup config(KSharedConfig::openConfig(), "DrKonqi"); | ||
161 | #ifndef Q_OS_WIN | 165 | #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED > 1070 | ||
166 | QString defaultDebuggerName = config.readEntry("Debugger", QStringLiteral("lldb")); | ||||
167 | #elif !defined(Q_OS_WIN) | ||||
162 | QString defaultDebuggerName = config.readEntry("Debugger", QStringLiteral("gdb")); | 168 | QString defaultDebuggerName = config.readEntry("Debugger", QStringLiteral("gdb")); | ||
163 | #else | 169 | #else | ||
164 | QString defaultDebuggerName = config.readEntry("Debugger", QStringLiteral("kdbgwin")); | 170 | QString defaultDebuggerName = config.readEntry("Debugger", QStringLiteral("kdbgwin")); | ||
165 | #endif | 171 | #endif | ||
166 | 172 | | |||
167 | Debugger firstKnownGoodDebugger, preferredDebugger; | 173 | Debugger firstKnownGoodDebugger, preferredDebugger; | ||
168 | foreach (const Debugger & debugger, internalDebuggers) { | 174 | foreach (const Debugger & debugger, internalDebuggers) { | ||
169 | if (!firstKnownGoodDebugger.isValid() && debugger.isInstalled()) { | 175 | if (!firstKnownGoodDebugger.isValid() && debugger.isInstalled()) { | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |