Changeset View
Changeset View
Standalone View
Standalone View
documentation/qthelp/qthelpdocumentation.cpp
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Line(s) | 250 | } else { | |||
---|---|---|---|---|---|
256 | view->page()->setNetworkAccessManager(m_sharedQNAM.data()); | 256 | view->page()->setNetworkAccessManager(m_sharedQNAM.data()); | ||
257 | view->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); | 257 | view->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); | ||
258 | view->setContextMenuPolicy(Qt::CustomContextMenu); | 258 | view->setContextMenuPolicy(Qt::CustomContextMenu); | ||
259 | connect(view, &StandardDocumentationView::customContextMenuRequested, this, &QtHelpDocumentation::viewContextMenuRequested); | 259 | connect(view, &StandardDocumentationView::customContextMenuRequested, this, &QtHelpDocumentation::viewContextMenuRequested); | ||
260 | 260 | | |||
261 | QObject::connect(view, &StandardDocumentationView::linkClicked, this, &QtHelpDocumentation::jumpedTo); | 261 | QObject::connect(view, &StandardDocumentationView::linkClicked, this, &QtHelpDocumentation::jumpedTo); | ||
262 | 262 | | |||
263 | setUserStyleSheet(view, m_current.value()); | 263 | setUserStyleSheet(view, m_current.value()); | ||
264 | view->setContent(m_provider->engine()->fileData(m_current.value()), QStringLiteral("text/html"), m_current.value()); | 264 | view->setHtml(m_provider->engine()->fileData(m_current.value())); | ||
265 | view->setUrl(m_current.value()); | ||||
265 | lastView = view; | 266 | lastView = view; | ||
266 | return view; | 267 | return view; | ||
267 | } | 268 | } | ||
268 | } | 269 | } | ||
269 | 270 | | |||
270 | void QtHelpDocumentation::viewContextMenuRequested(const QPoint& pos) | 271 | void QtHelpDocumentation::viewContextMenuRequested(const QPoint& pos) | ||
271 | { | 272 | { | ||
272 | StandardDocumentationView* view = qobject_cast<StandardDocumentationView*>(sender()); | 273 | StandardDocumentationView* view = qobject_cast<StandardDocumentationView*>(sender()); | ||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |