matrix_browser: update for QWebEngine from QWebKit
PATCH v2 1/1 matrix_browser: update for QWebEngine from QWebKit
Replace QWebkit with QWebEngine because QWebkit is obslete.
Signed-off-by Eric Ruei <[email protected]>
--- MatrixWebView.cpp | 5 +---- MatrixWebView.h | 5 ++--- main.cpp | 1 - matrix_browser.pro | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) mode change 100755 => 100644 main.cpp
MatrixWebView.cpp +1 -4
@@ -37,9 +37,6 @@ * */ -#include <QtWidgets> -#include <QtNetwork> -#include <QtWebKitWidgets> #include "MatrixWebView.h" #include <sys/types.h> #include <sys/socket.h>
@@ -53,7 +50,7 @@ MatrixWebView::MatrixWebView(const QUrl& url) if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigtermFd)) qFatal("Couldn't create TERM socketpair"); - view = new QWebView(this); + view = new QWebEngineView(this); view->load(url); setCentralWidget(view);
MatrixWebView.h +2 -3
@@ -40,8 +40,7 @@#define MATRIXWEBVIEW_H #include <QtWidgets> -#include <QWebView> -#include <QGraphicsWebView> +#include <QWebEngineView> #include <QSocketNotifier> #include <QMainWindow>
@@ -62,7 +61,7 @@ public slots: private:static int sigtermFd[2 ];QSocketNotifier *snTerm; - QWebView *view; + QWebEngineView *view; };#endif
main.cpp +0 -1
@@ -36,7 +36,6 @@ * */ -#include <QtWidgets> #include <iostream> #include <QApplication> #include "MatrixWebView.h"
matrix_browser.pro +1 -1
@@ -6,7 +6,7 @@ TEMPLATE = app TARGET = matrix_browser DEPENDPATH += . INCLUDEPATH += . -QT += webkit webkitwidgets +QT += webenginewidgets # Input SOURCES += main.cpp MatrixWebView.cpp HEADERS = MatrixWebView.h
Signature · 1 line
1.9.1
Pushed.
- Jake
Quoted 85 lines · Eric Ruei
Replace QWebkit with QWebEngine because QWebkit is obslete.
Signed-off-by Eric Ruei <[email protected]>--- MatrixWebView.cpp | 5 +---- MatrixWebView.h | 5 ++--- main.cpp | 1 - matrix_browser.pro | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-)mode change 100755 => 100644 main.cpp
MatrixWebView.cpp +1
-4@@ -37,9 +37,6 @@ * */ -#include <QtWidgets> -#include <QtNetwork> -#include <QtWebKitWidgets> #include "MatrixWebView.h" #include <sys/types.h> #include <sys/socket.h>@@ -53,7 +50,7 @@ MatrixWebView::MatrixWebView(const QUrl& url) if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigtermFd)) qFatal("Couldn't create TERM socketpair"); - view = new QWebView(this); + view = new QWebEngineView(this); view->load(url); setCentralWidget(view);MatrixWebView.h +2
-3@@ -40,8 +40,7 @@#define MATRIXWEBVIEW_H #include <QtWidgets> -#include <QWebView> -#include <QGraphicsWebView> +#include <QWebEngineView> #include <QSocketNotifier> #include <QMainWindow> @@ -62,7 +61,7 @@ public slots: private:static int sigtermFd[2 ];QSocketNotifier *snTerm; - QWebView *view; + QWebEngineView *view; };#endif main.cpp +0
-1@@ -36,7 +36,6 @@ * */ -#include <QtWidgets> #include <iostream> #include <QApplication> #include "MatrixWebView.h"matrix_browser.pro +1
-1@@ -6,7 +6,7 @@ TEMPLATE = app TARGET = matrix_browser DEPENDPATH += . INCLUDEPATH += . -QT += webkit webkitwidgets +QT += webenginewidgets # Input SOURCES += main.cpp MatrixWebView.cpp HEADERS = MatrixWebView.h