aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build3
-rw-r--r--src/main.cpp9
-rw-r--r--src/meson.build9
3 files changed, 18 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 9348bdf..9d4c661 100644
--- a/meson.build
+++ b/meson.build
@@ -12,6 +12,9 @@ dep_boost = dependency('boost', modules: ['program_options'])
# Breakpad
dep_breakpad = dependency('breakpad-client', required : get_option('Breakpad'))
+if dep_breakpad.found()
+ dep_thread = dependency('threads')
+endif
# Generate config header
include = include_directories('include')
diff --git a/src/main.cpp b/src/main.cpp
index 4d24084..6ceacab 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -153,8 +153,11 @@ int main(int argc, char **argv)
app.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings, true);
#ifdef BreakpadEnabled
+ const std::string crashpath = config->value<std::string>("browser.crash.path").value_or("/tmp");
+ assert(!crashpath.empty());
+
BreakpadContext ctx;
- google_breakpad::MinidumpDescriptor descriptor(config->value<std::string>("browser.crash.path").value_or("/tmp").c_str());
+ google_breakpad::MinidumpDescriptor descriptor(crashpath.c_str());
const auto crashHandler = config->value<std::string>("browser.crash.handler");
if(crashHandler) {
@@ -166,6 +169,10 @@ int main(int argc, char **argv)
// minidump descriptor, filter callback, minidump callback, callback_context, install handler, server_fd
google_breakpad::ExceptionHandler eh(descriptor, nullptr, dumpCallback, &ctx, true, -1);
+
+#ifdef QT_DEBUG
+ qDebug("Installed breakpad exception handler (path=%s)", crashpath.c_str());
+#endif
#endif
// translator
diff --git a/src/meson.build b/src/meson.build
index 9ce42d4..0af2be0 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -9,9 +9,14 @@ poi_moc = qt5.preprocess(
dependencies: dep_qt5
)
+features = []
+if dep_breakpad.found()
+ features += '-DBreakpadEnabled'
+endif
+
poi = executable('poi', install: true,
- cpp_args: '-DQAPPLICATION_CLASS=QApplication',
- dependencies: [dep_qt5, dep_boost, dep_breakpad, dep_SingleApplication,
+ cpp_args: ['-DQAPPLICATION_CLASS=QApplication', features],
+ dependencies: [dep_qt5, dep_boost, dep_breakpad, dep_thread, dep_SingleApplication,
dep_about, dep_addressbar, dep_bookmarks, dep_configuration, dep_downloads, dep_urlfilter, dep_web],
include_directories: [include, genheader_inc],
sources: ['main.cpp', poi_moc,