summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Ruei2016-06-12 14:38:08 -0500
committerEric Ruei2016-06-12 14:38:08 -0500
commit78ad5db716d1abc4c05abfe435f066b6b88454d5 (patch)
treedfd77789fb21230bcb56e89cdbf7416ac4cc2903 /MatrixWebView.cpp
parent5ab1350db5892f1fec9995b53670f27977c69f8d (diff)
downloadmatrix_browser-78ad5db716d1abc4c05abfe435f066b6b88454d5.tar.gz
matrix_browser-78ad5db716d1abc4c05abfe435f066b6b88454d5.tar.xz
matrix_browser-78ad5db716d1abc4c05abfe435f066b6b88454d5.zip
MatrixWebView.h MatrixWebView.cpp main.cpp: Replace QWebView with QMainWindow as top-layer display window
This change is made to resolve the issue that QWebView.showFullScreen() does not work in QPA Linuxfb Signed-off-by: Eric Ruei <e-ruei1@ti.com>
Diffstat (limited to 'MatrixWebView.cpp')
-rw-r--r--MatrixWebView.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/MatrixWebView.cpp b/MatrixWebView.cpp
index 8126d65..48459b7 100644
--- a/MatrixWebView.cpp
+++ b/MatrixWebView.cpp
@@ -37,6 +37,9 @@
37 * 37 *
38*/ 38*/
39 39
40#include <QtWidgets>
41#include <QtNetwork>
42#include <QtWebKitWidgets>
40#include "MatrixWebView.h" 43#include "MatrixWebView.h"
41#include <sys/types.h> 44#include <sys/types.h>
42#include <sys/socket.h> 45#include <sys/socket.h>
@@ -45,12 +48,15 @@
45 48
46int MatrixWebView::sigtermFd[2]; 49int MatrixWebView::sigtermFd[2];
47 50
48MatrixWebView::MatrixWebView(QWidget* parent) 51MatrixWebView::MatrixWebView(const QUrl& url)
49 : QWebView(parent)
50{ 52{
51 if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigtermFd)) 53 if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigtermFd))
52 qFatal("Couldn't create TERM socketpair"); 54 qFatal("Couldn't create TERM socketpair");
53 55
56 view = new QWebView(this);
57 view->load(url);
58 setCentralWidget(view);
59
54 snTerm = new QSocketNotifier(sigtermFd[1], QSocketNotifier::Read, this); 60 snTerm = new QSocketNotifier(sigtermFd[1], QSocketNotifier::Read, this);
55 connect(snTerm, SIGNAL(activated(int)), this, SLOT(handleSigTerm())); 61 connect(snTerm, SIGNAL(activated(int)), this, SLOT(handleSigTerm()));
56} 62}