Skip to contentSkip to conversation

matrix_browser: update for QWebEngine from QWebKit

PATCH Superseded Eric Ruei 2 participants 5 messages Aug 24, 2017 – Aug 25, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Eric Ruei

author
#0 lore raw

PATCH 1/1 matrix_browser: update for QWebEngine from QWebKit

Replace QWebkit with QWebEngine because QWebkit is obslete.

---
 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
index 48459b7..72c4967 100644
@@ -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
index fec7249..b6d2cc5 100644
@@ -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
old mode 100755
new mode 100644
index a1ccd80..dceece5
@@ -36,7 +36,6 @@
  *
 */
 
-#include <QtWidgets>
 #include <iostream> 
 #include <QApplication>
 #include "MatrixWebView.h"
matrix_browser.pro +1 -1
index a6d8e1c..c6d9894 100755
@@ -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
#1 lore raw

Eric,

Please indicate the component this patch is meant for in square brackets.

Quoted 92 lines · Eric Ruei

Replace QWebkit with QWebEngine because QWebkit is obslete.

---
 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
index 48459b7..72c4967 100644
@@ -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
index fec7249..b6d2cc5 100644
@@ -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
old mode 100755
new mode 100644
index a1ccd80..dceece5
@@ -36,7 +36,6 @@
  *
 */
 
-#include <QtWidgets>
 #include <iostream> 
 #include <QApplication>
 #include "MatrixWebView.h"
matrix_browser.pro +1 -1
index a6d8e1c..c6d9894 100755
@@ -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 · 6 lines
1.9.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
author
#2 lore raw

Hi, Denys:

Do you mean meta-arago component?

For example:

[meta-arago] [matrix-gui-browser: PATCH v2] matrix_browser: update for QWebEngine from QWebKit

Best regards,

Eric

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, August 24, 2017 7:22 PM
To: Ruei, Eric
Cc: [email protected]
Subject: Re: [meta-arago] [PATCH] matrix_browser: update for QWebEngine from QWebKit

Eric,

Please indicate the component this patch is meant for in square brackets.

Quoted 91 lines · Eric Ruei

Replace QWebkit with QWebEngine because QWebkit is obslete.

---
 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 index renamed from MatrixWebView.cpp +0 -0

48459b7..72c4967 100644

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 index fec7249..b6d2cc5 renamed from MatrixWebView.h +0 -0

100644

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
old mode 100755
new mode 100644
index a1ccd80..dceece5
@@ -36,7 +36,6 @@
  *
 */
 
-#include <QtWidgets>
 #include <iostream>
 #include <QApplication>
 #include "MatrixWebView.h"
matrix_browser.pro index renamed from matrix_browser.pro +0 -0

a6d8e1c..c6d9894 100755

matrix_browser.pro +1 -2
@@ -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
--

1.9.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

author
#4 lore raw
In reply to Denys Dmytriyenko

Hi, Denys:

Do you require v2 as shown below?

Hongmei: can you merge the change if there are no other comments?

Best regards,

Eric

-----Original Message-----
From: Ruei, Eric
Sent: Friday, August 25, 2017 9:53 AM
To: Dmytriyenko, Denys
Cc: [email protected]
Subject: RE: [meta-arago] [PATCH] matrix_browser: update for QWebEngine from QWebKit

Hi, Denys:

Do you mean meta-arago component?

For example:

[meta-arago] [matrix-gui-browser: PATCH v2] matrix_browser: update for QWebEngine from QWebKit

Best regards,

Eric

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, August 24, 2017 7:22 PM
To: Ruei, Eric
Cc: [email protected]
Subject: Re: [meta-arago] [PATCH] matrix_browser: update for QWebEngine from QWebKit

Eric,

Please indicate the component this patch is meant for in square brackets.

Quoted 91 lines · Eric Ruei

Replace QWebkit with QWebEngine because QWebkit is obslete.

---
 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 index renamed from MatrixWebView.cpp +0 -0

48459b7..72c4967 100644

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 index fec7249..b6d2cc5 renamed from MatrixWebView.h +0 -0

100644

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
old mode 100755
new mode 100644
index a1ccd80..dceece5
@@ -36,7 +36,6 @@
  *
 */
 
-#include <QtWidgets>
 #include <iostream>
 #include <QApplication>
 #include "MatrixWebView.h"
matrix_browser.pro index renamed from matrix_browser.pro +0 -0

a6d8e1c..c6d9894 100755

matrix_browser.pro +1 -2
@@ -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
--

1.9.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#3 lore raw
In reply to Ruei, Eric

Eric,

See here for several examples of different components:

http://arago-project.org/pipermail/meta-arago/2017-July/thread.html

Signature · 1 line
Denys
Quoted 118 lines · Eric

Hi, Denys:

Do you mean meta-arago component?

For example:

[meta-arago] [matrix-gui-browser: PATCH v2] matrix_browser: update for QWebEngine from QWebKit

Best regards,

Eric

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Thursday, August 24, 2017 7:22 PM
To: Ruei, Eric
Cc: [email protected]
Subject: Re: [meta-arago] [PATCH] matrix_browser: update for QWebEngine from QWebKit

Eric,

Please indicate the component this patch is meant for in square brackets.

Quoted 91 lines · Eric Ruei

Replace QWebkit with QWebEngine because QWebkit is obslete.

---
 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 index renamed from MatrixWebView.cpp +0 -0

48459b7..72c4967 100644

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 index fec7249..b6d2cc5 renamed from MatrixWebView.h +0 -0

100644

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
old mode 100755
new mode 100644
index a1ccd80..dceece5
@@ -36,7 +36,6 @@
  *
 */
 
-#include <QtWidgets>
 #include <iostream>
 #include <QApplication>
 #include "MatrixWebView.h"
matrix_browser.pro index renamed from matrix_browser.pro +0 -0

a6d8e1c..c6d9894 100755

matrix_browser.pro +1 -2
@@ -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
--

1.9.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago