[Qt-creator] Very simple patch

Vlad Seryakov vseryakov at gmail.com
Sat Sep 24 23:26:48 CEST 2016


Hi,

This is a 2 line patch for the latest QtC to compile with 5.6 and 5.7, i did not think it is worth a bug record.

Thanks


diff --git a/src/plugins/help/webenginehelpviewer.cpp b/src/plugins/help/webenginehelpviewer.cpp
index 785d628..9ff0b19 100644
--- a/src/plugins/help/webenginehelpviewer.cpp
+++ b/src/plugins/help/webenginehelpviewer.cpp
@@ -35,7 +35,9 @@
 #include <QContextMenuEvent>
 #include <QCoreApplication>
 #include <QVBoxLayout>
+#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
 #include <QWebEngineContextMenuData>
+#endif
 #include <QWebEngineHistory>
 #include <QWebEngineProfile>
 #include <QWebEngineSettings>
@@ -307,7 +309,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
         QUrl url = page()->contextMenuData().linkUrl();
         if (m_viewer->isActionVisible(HelpViewer::Action::NewPage)) {
             auto openLink = new QAction(QCoreApplication::translate("HelpViewer",
-                                        Constants::TR_OPEN_LINK_IN_NEW_PAGE), menu);
+                                        Constants::TR_OPEN_LINK_AS_NEW_PAGE), menu);
             connect(openLink, &QAction::triggered, m_viewer, [this, url] {
                 m_viewer->newPageRequested(url);
             });


More information about the Qt-creator mailing list