Skip to contentSkip to conversation

qtwebbrowser-example: add QT web browser example

PATCH Superseded Eric Ruei 2 participants 5 messages Jun 5, 2017

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Eric Ruei

author
#0 lore raw

PATCH 1/2 qtwebbrowser-example: add QT web browser example

- This is a touch-friendly web broswer based on qtwebengine and QML

---
 ...0001-qtwebbrowser-disable-FullScreen-mode.patch | 28 ++++++++++++++++++
 .../recipes-qt/qt5/qtwebbrowser-example_1.0.bb     | 33 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example/0001-qtwebbrowser-disable-FullScreen-mode.patch
 create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example_1.0.bb
meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example/0001-qtwebbrowser-disable-FullScreen-mode.patch new file +28 -0
new file mode 100644
index 0000000..9cac96a
@@ -0,0 +1,28 @@
+From 268cf8dec9486fd875ab7fae241273e7b5b2a143 Mon Sep 17 00:00:00 2001
+From: Eric Ruei <[email protected]>
+Date: Fri, 2 Jun 2017 15:29:01 -0400
+Subject: [PATCH] qtwebbrowser: disable FullScreen mode
+
+We need to disable full-screen mode because there is no way to exit in that mode
+
+Signed-off-by: Eric Ruei <[email protected]>
+---
+ src/main.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 2181f15..5f146b6 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -101,7 +101,7 @@ int main(int argc, char **argv)
+     if (view.size().isEmpty())
+         view.setGeometry(0, 0, 800, 600);
+ #else
+-    view.showFullScreen();
++    view.show();
+ #endif
+ 
+     app.exec();
+-- 
+1.9.1
+
meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example_1.0.bb new file +33 -0
new file mode 100644
index 0000000..a063207
@@ -0,0 +1,33 @@
+SUMMARY = "Qt Touch-Friendly WebBroswer"
+HOMEPAGE = "http://blog.qt.io/blog/2016/07/18/qt-webbrowser-1-0/"
+SECTION = "multimedia"
+LICENSE = "GPL-3.0 & GFDL-1.3"
+LIC_FILES_CHKSUM = " \
+    file://LICENSE.GPLv3;md5=a40e2bb02b1ac431f461afd03ff9d1d6 \
+    file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
+"
+DEPENDS += "qtwebengine"
+
+PR = "r1"
+
+BRANCH = "dev"
+SRCREV = "023733af5523a5ad84359926224fa106001215f4"
+
+SRC_URI = "git://code.qt.io/qt-apps/qtwebbrowser.git;protocol=git;branch=${BRANCH} \
+    file://0001-qtwebbrowser-disable-FullScreen-mode.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit qt-provider
+
+# Install qtwebbrowser under /usr/share/qt5/examples/webengine
+do_install() {
+    install -d ${D}${datadir}/qt5/examples/webengine/webbrowser/src
+    install -m 0755 src/qtwebbrowser ${D}${datadir}/qt5/examples/webengine/webbrowser/qtwebbrowser
+    cp -r ${S}/* ${D}${datadir}/qt5/examples/webengine/webbrowser/.
+}
+
+FILES_${PN} +=  " \
+/usr/share/qt5/examples/webengine/webbrowser/* \
+"
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 2/2 packagegroup-arago-tisdk-qte: add qtwebbrowser-example to the list and sort it

---
 .../recipes-core/packagegroups/packagegroup-arago-tisdk-qte.bb           | 1 +
 1 file changed, 1 insertion(+)
meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-qte.bb +1 -0
index f2f87be..d7b8f0b 100644
@@ -24,6 +24,7 @@ QT5_DEMOS = "\
     qtscript-examples \
     qtsvg-examples \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'qtwayland-examples', '', d)} \
+    qtwebbrowser-example \
     qtwebengine-examples \
     qtwebkit-examples-examples \
 "
Signature · 1 line
1.9.1
#2 lore raw
In reply to Eric Ruei

Eric,

Is it a standalone app? Why did you call it qtwebbrowser-example?

Also, would it make sense to keep the main recipe in meta-arago-extra and apply the fullscreen patch in meta-arago-distro? BTW, the patch is missing Upstream-Status field.

It seems you are copying the sources to the target as well - is it expected? Also, when using "cp" to copy files, please use below or similar:
cp -R --no-dereference --preserve=mode,links

Signature · 1 line
Denys
Quoted 90 lines · Eric Ruei

- This is a touch-friendly web broswer based on qtwebengine and QML

---
 ...0001-qtwebbrowser-disable-FullScreen-mode.patch | 28 ++++++++++++++++++
 .../recipes-qt/qt5/qtwebbrowser-example_1.0.bb     | 33 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example/0001-qtwebbrowser-disable-FullScreen-mode.patch
 create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example_1.0.bb
meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example/0001-qtwebbrowser-disable-FullScreen-mode.patch new file +28 -0
new file mode 100644
index 0000000..9cac96a
@@ -0,0 +1,28 @@
+From 268cf8dec9486fd875ab7fae241273e7b5b2a143 Mon Sep 17 00:00:00 2001
+From: Eric Ruei <[email protected]>
+Date: Fri, 2 Jun 2017 15:29:01 -0400
+Subject: [PATCH] qtwebbrowser: disable FullScreen mode
+
+We need to disable full-screen mode because there is no way to exit in that mode
+
+Signed-off-by: Eric Ruei <[email protected]>
+---
+ src/main.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 2181f15..5f146b6 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -101,7 +101,7 @@ int main(int argc, char **argv)
+     if (view.size().isEmpty())
+         view.setGeometry(0, 0, 800, 600);
+ #else
+-    view.showFullScreen();
++    view.show();
+ #endif
+ 
+     app.exec();
+-- 
+1.9.1
+
meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example_1.0.bb new file +33 -0
new file mode 100644
index 0000000..a063207
@@ -0,0 +1,33 @@
+SUMMARY = "Qt Touch-Friendly WebBroswer"
+HOMEPAGE = "http://blog.qt.io/blog/2016/07/18/qt-webbrowser-1-0/"
+SECTION = "multimedia"
+LICENSE = "GPL-3.0 & GFDL-1.3"
+LIC_FILES_CHKSUM = " \
+    file://LICENSE.GPLv3;md5=a40e2bb02b1ac431f461afd03ff9d1d6 \
+    file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
+"
+DEPENDS += "qtwebengine"
+
+PR = "r1"
+
+BRANCH = "dev"
+SRCREV = "023733af5523a5ad84359926224fa106001215f4"
+
+SRC_URI = "git://code.qt.io/qt-apps/qtwebbrowser.git;protocol=git;branch=${BRANCH} \
+    file://0001-qtwebbrowser-disable-FullScreen-mode.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit qt-provider
+
+# Install qtwebbrowser under /usr/share/qt5/examples/webengine
+do_install() {
+    install -d ${D}${datadir}/qt5/examples/webengine/webbrowser/src
+    install -m 0755 src/qtwebbrowser ${D}${datadir}/qt5/examples/webengine/webbrowser/qtwebbrowser
+    cp -r ${S}/* ${D}${datadir}/qt5/examples/webengine/webbrowser/.
+}
+
+FILES_${PN} +=  " \
+/usr/share/qt5/examples/webengine/webbrowser/* \
+"
Signature · 6 lines
1.9.1

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

Hi, Denys:

Please see my answers in-line below:

Best regards,

Eric

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, June 05, 2017 5:59 PM
To: Ruei, Eric
Cc: [email protected]
Subject: Re: [meta-arago] [morty/master][PATCH 1/2] qtwebbrowser-example: add QT web browser example

Eric,

Is it a standalone app? Why did you call it qtwebbrowser-example?
[ER] Yes, it is a standalone QT app.
I call it qtwebbrowser-example to indicate that it is a QT demo example, not a QT module such as qtwebengine. What name do you suggest?

Also, would it make sense to keep the main recipe in meta-arago-extra and apply the fullscreen patch in meta-arago-distro? BTW, the patch is missing Upstream-Status field. [ER] Yes, I can do that.

It seems you are copying the sources to the target as well - is it expected? [ER] Yes, we would like the source code to be available just like some other QT demo programs.

Also, when using "cp" to copy files, please use below or similar:
cp -R --no-dereference --preserve=mode,links
[ER] Yes, I will follow your reference.

--
Denys

Quoted 90 lines · Eric Ruei

- This is a touch-friendly web broswer based on qtwebengine and QML

---
 ...0001-qtwebbrowser-disable-FullScreen-mode.patch | 28 ++++++++++++++++++
 .../recipes-qt/qt5/qtwebbrowser-example_1.0.bb     | 33 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example/0001-qtwebbrowser-disable-FullScreen-mode.patch
 create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example_1.0.bb
meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example/0001-qtwebbrowser-disable-FullScreen-mode.patch new file +28 -0
new file mode 100644
index 0000000..9cac96a
@@ -0,0 +1,28 @@
+From 268cf8dec9486fd875ab7fae241273e7b5b2a143 Mon Sep 17 00:00:00 2001
+From: Eric Ruei <[email protected]>
+Date: Fri, 2 Jun 2017 15:29:01 -0400
+Subject: [PATCH] qtwebbrowser: disable FullScreen mode
+
+We need to disable full-screen mode because there is no way to exit in that mode
+
+Signed-off-by: Eric Ruei <[email protected]>
+---
+ src/main.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 2181f15..5f146b6 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -101,7 +101,7 @@ int main(int argc, char **argv)
+     if (view.size().isEmpty())
+         view.setGeometry(0, 0, 800, 600);
+ #else
+-    view.showFullScreen();
++    view.show();
+ #endif
+ 
+     app.exec();
+-- 
+1.9.1
+
meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example_1.0.bb new file +33 -0
new file mode 100644
index 0000000..a063207
@@ -0,0 +1,33 @@
+SUMMARY = "Qt Touch-Friendly WebBroswer"
+HOMEPAGE = "http://blog.qt.io/blog/2016/07/18/qt-webbrowser-1-0/"
+SECTION = "multimedia"
+LICENSE = "GPL-3.0 & GFDL-1.3"
+LIC_FILES_CHKSUM = " \
+    file://LICENSE.GPLv3;md5=a40e2bb02b1ac431f461afd03ff9d1d6 \
+    file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
+"
+DEPENDS += "qtwebengine"
+
+PR = "r1"
+
+BRANCH = "dev"
+SRCREV = "023733af5523a5ad84359926224fa106001215f4"
+
+SRC_URI = "git://code.qt.io/qt-apps/qtwebbrowser.git;protocol=git;branch=${BRANCH} \
+    file://0001-qtwebbrowser-disable-FullScreen-mode.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit qt-provider
+
+# Install qtwebbrowser under /usr/share/qt5/examples/webengine
+do_install() {
+    install -d ${D}${datadir}/qt5/examples/webengine/webbrowser/src
+    install -m 0755 src/qtwebbrowser ${D}${datadir}/qt5/examples/webengine/webbrowser/qtwebbrowser
+    cp -r ${S}/* ${D}${datadir}/qt5/examples/webengine/webbrowser/.
+}
+
+FILES_${PN} +=  " \
+/usr/share/qt5/examples/webengine/webbrowser/* \
+"
Signature · 6 lines
1.9.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
#4 lore raw
Quoted 16 lines · Eric

Hi, Denys:

Please see my answers in-line below:

Best regards,

Eric

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, June 05, 2017 5:59 PM
To: Ruei, Eric
Cc: [email protected]
Subject: Re: [meta-arago] [morty/master][PATCH 1/2] qtwebbrowser-example: add QT web browser example

Quoted 6 lines

Eric,

Is it a standalone app? Why did you call it qtwebbrowser-example?
[ER] Yes, it is a standalone QT app.
I call it qtwebbrowser-example to indicate that it is a QT demo example, not a QT module such as qtwebengine. What name do you suggest?

It is always recommended to keep the original name of the source, which seems to be "qtwebbrowser":

http://code.qt.io/cgit/qt-apps/qtwebbrowser.git/

Quoted 7 lines

Also, would it make sense to keep the main recipe in meta-arago-extra and apply the fullscreen patch in meta-arago-distro? BTW, the patch is missing Upstream-Status field.
[ER] Yes, I can do that.

It seems you are copying the sources to the target as well - is it expected? [ER] Yes, we would like the source code to be available just like some other QT demo programs.

Well, I don't believe this is really an example, but rather a standalone application. Even though, it may be possible to package the source code - then you'd want to install the binary into bindir, package it into the main package and package sources into something like ${PN}-example or such.

Quoted 99 lines

Also, when using "cp" to copy files, please use below or similar:
cp -R --no-dereference --preserve=mode,links
[ER] Yes, I will follow your reference.

--
Denys

Quoted 90 lines · Eric Ruei

- This is a touch-friendly web broswer based on qtwebengine and QML

---
 ...0001-qtwebbrowser-disable-FullScreen-mode.patch | 28 ++++++++++++++++++
 .../recipes-qt/qt5/qtwebbrowser-example_1.0.bb     | 33 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example/0001-qtwebbrowser-disable-FullScreen-mode.patch
 create mode 100644 meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example_1.0.bb
meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example/0001-qtwebbrowser-disable-FullScreen-mode.patch new file +28 -0
new file mode 100644
index 0000000..9cac96a
@@ -0,0 +1,28 @@
+From 268cf8dec9486fd875ab7fae241273e7b5b2a143 Mon Sep 17 00:00:00 2001
+From: Eric Ruei <[email protected]>
+Date: Fri, 2 Jun 2017 15:29:01 -0400
+Subject: [PATCH] qtwebbrowser: disable FullScreen mode
+
+We need to disable full-screen mode because there is no way to exit in that mode
+
+Signed-off-by: Eric Ruei <[email protected]>
+---
+ src/main.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 2181f15..5f146b6 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -101,7 +101,7 @@ int main(int argc, char **argv)
+     if (view.size().isEmpty())
+         view.setGeometry(0, 0, 800, 600);
+ #else
+-    view.showFullScreen();
++    view.show();
+ #endif
+ 
+     app.exec();
+-- 
+1.9.1
+
meta-arago-distro/recipes-qt/qt5/qtwebbrowser-example_1.0.bb new file +33 -0
new file mode 100644
index 0000000..a063207
@@ -0,0 +1,33 @@
+SUMMARY = "Qt Touch-Friendly WebBroswer"
+HOMEPAGE = "http://blog.qt.io/blog/2016/07/18/qt-webbrowser-1-0/"
+SECTION = "multimedia"
+LICENSE = "GPL-3.0 & GFDL-1.3"
+LIC_FILES_CHKSUM = " \
+    file://LICENSE.GPLv3;md5=a40e2bb02b1ac431f461afd03ff9d1d6 \
+    file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
+"
+DEPENDS += "qtwebengine"
+
+PR = "r1"
+
+BRANCH = "dev"
+SRCREV = "023733af5523a5ad84359926224fa106001215f4"
+
+SRC_URI = "git://code.qt.io/qt-apps/qtwebbrowser.git;protocol=git;branch=${BRANCH} \
+    file://0001-qtwebbrowser-disable-FullScreen-mode.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit qt-provider
+
+# Install qtwebbrowser under /usr/share/qt5/examples/webengine
+do_install() {
+    install -d ${D}${datadir}/qt5/examples/webengine/webbrowser/src
+    install -m 0755 src/qtwebbrowser ${D}${datadir}/qt5/examples/webengine/webbrowser/qtwebbrowser
+    cp -r ${S}/* ${D}${datadir}/qt5/examples/webengine/webbrowser/.
+}
+
+FILES_${PN} +=  " \
+/usr/share/qt5/examples/webengine/webbrowser/* \
+"
Signature · 6 lines
1.9.1

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