aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-23 13:20:31 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-23 13:20:31 +0200
commit0851cfc8a01843d977fa19ef9fcb8d34546d6da4 (patch)
treefa47599979a9187cd1b14fca908a54626edc5d66
parentFix link errors (diff)
downloadsmolbote-0851cfc8a01843d977fa19ef9fcb8d34546d6da4.tar.xz
Fix SingleApplication segfault
-rw-r--r--3rd-party/SingleApplication/meson.build1
-rw-r--r--src/browser.cpp4
-rw-r--r--src/meson.build2
3 files changed, 4 insertions, 3 deletions
diff --git a/3rd-party/SingleApplication/meson.build b/3rd-party/SingleApplication/meson.build
index 54ef8e4..0f0e918 100644
--- a/3rd-party/SingleApplication/meson.build
+++ b/3rd-party/SingleApplication/meson.build
@@ -2,6 +2,7 @@ SingleApplication_inc = include_directories('SingleApplication.git')
SingleApplication_moc = qt5.preprocess(
moc_headers: ['SingleApplication.git/singleapplication.h', 'SingleApplication.git/singleapplication_p.h'],
+ moc_extra_arguments: ['-DQAPPLICATION_CLASS=QApplication'],
dependencies: dep_qt5
)
diff --git a/src/browser.cpp b/src/browser.cpp
index a0b02d8..cf39c4e 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -36,7 +36,7 @@ Browser::Browser(int &argc, char *argv[], bool allowSecondary)
: SingleApplication(argc, argv, allowSecondary, SingleApplication::User | SingleApplication::SecondaryNotification | SingleApplication::ExcludeAppVersion)
{
setApplicationName(CONFIG_POI_NAME);
- //setWindowIcon(QIcon(CONFIG_POI_ICON));
+ setWindowIcon(QIcon(CONFIG_POI_ICON));
setApplicationVersion(poi_Version);
}
@@ -133,7 +133,7 @@ void Browser::setup(QVector<QPluginLoader *> plugins)
if(stylesheet) {
QFile f(stylesheet.value());
if(f.open(QIODevice::ReadOnly)) {
- //setStyleSheet(f.readAll());
+ setStyleSheet(f.readAll());
f.close();
}
}
diff --git a/src/meson.build b/src/meson.build
index 63e7225..52c8d42 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -10,9 +10,9 @@ poi_moc = qt5.preprocess(
)
poi = executable('poi', install: true,
+ cpp_args: '-DQAPPLICATION_CLASS=QApplication',
dependencies: [dep_qt5, dep_boost, dep_breakpad, dep_SingleApplication,
dep_about, dep_addressbar, dep_bookmarks, dep_configuration, dep_downloads, dep_urlfilter, dep_web],
- cpp_args : '-DQAPPLICATION_CLASS=QApplication',
include_directories: [include, genheader_inc, lib_inc, thirdparty_inc],
sources: ['main.cpp', poi_moc,
'browser.cpp',