Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/documentation/standarddocumentationview.cpp
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 93 | { | |||
---|---|---|---|---|---|
96 | QObject::connect(m_view, &QWebView::linkClicked, parent, &StandardDocumentationView::linkClicked); | 96 | QObject::connect(m_view, &QWebView::linkClicked, parent, &StandardDocumentationView::linkClicked); | ||
97 | } | 97 | } | ||
98 | #else | 98 | #else | ||
99 | QWebEngineView* m_view = nullptr; | 99 | QWebEngineView* m_view = nullptr; | ||
100 | StandardDocumentationPage* m_page = nullptr; | 100 | StandardDocumentationPage* m_page = nullptr; | ||
101 | 101 | | |||
102 | void init(StandardDocumentationView* parent) | 102 | void init(StandardDocumentationView* parent) | ||
103 | { | 103 | { | ||
104 | // prevent QWebEngine (Chromium) from overriding the signal handlers of KCrash | ||||
105 | const auto chromiumFlags = qgetenv("QTWEBENGINE_CHROMIUM_FLAGS"); | ||||
106 | if (!chromiumFlags.contains("disable-in-process-stack-traces")) { | ||||
107 | qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromiumFlags + " --disable-in-process-stack-traces"); | ||||
108 | } | ||||
104 | // not using the shared default profile here: | 109 | // not using the shared default profile here: | ||
105 | // prevents conflicts with qthelp scheme handler being registered onto that single default profile | 110 | // prevents conflicts with qthelp scheme handler being registered onto that single default profile | ||
106 | // due to async deletion of old pages and their CustomSchemeHandler instance | 111 | // due to async deletion of old pages and their CustomSchemeHandler instance | ||
107 | auto* profile = new QWebEngineProfile(parent); | 112 | auto* profile = new QWebEngineProfile(parent); | ||
108 | m_page = new StandardDocumentationPage(profile, parent); | 113 | m_page = new StandardDocumentationPage(profile, parent); | ||
109 | m_view = new QWebEngineView(parent); | 114 | m_view = new QWebEngineView(parent); | ||
110 | m_view->setPage(m_page); | 115 | m_view->setPage(m_page); | ||
111 | // workaround for Qt::NoContextMenu broken with QWebEngineView, contextmenu event is always eaten | 116 | // workaround for Qt::NoContextMenu broken with QWebEngineView, contextmenu event is always eaten | ||
▲ Show 20 Lines • Show All 283 Lines • Show Last 20 Lines |