Skip to content

Commit f51470e

Browse files
committed
documentation update
1 parent 779ed48 commit f51470e

File tree

3 files changed

+33
-18
lines changed

3 files changed

+33
-18
lines changed

CREDITS.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ http://hackafe.org/
3030
https://github.com/richmoore/qt-examples/tree/master/sitespecificbrowser
3131
https://github.com/rsdn/avalon/blob/master/web_view.cpp
3232
https://github.com/ariya/phantomjs/blob/master/src/qt/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp
33+
https://github.com/OtterBrowser/otter-browser/blob/master/src/modules/backends/web/qtwebengine/QtWebEnginePage.cpp
34+
https://github.com/OtterBrowser/otter-browser/blob/master/src/modules/backends/web/qtwebengine/QtWebEnginePage.h
3335

3436
http://qt-project.org/doc/qt-4.8/qwebhistory.html
3537
http://qt-project.org/doc/qt-4.8/qdir.html
@@ -63,7 +65,9 @@ http://qt-project.org/forums/viewthread/15487 (How to list foreach from array)
6365
http://qt-project.org/forums/viewthread/8876 (Setting global variable in main())
6466

6567
http://doc.qt.digia.com/qtcreator-extending/coding-style.html
68+
6669
https://doc.qt.io/archives/4.6/webkit-fancybrowser-mainwindow-cpp.html
70+
http://doc.qt.io/archives/qt-5.5/qwebpage.html#windowCloseRequested
6771

6872
http://doc.qt.io/qt-4.8/qmake-advanced-usage.html
6973
http://doc.qt.io/qt-4.8/qwebframe.html
@@ -77,6 +81,12 @@ http://doc.qt.io/qt-5/qhash.html
7781
http://doc.qt.io/qt-5/qhash-iterator.html
7882
http://doc.qt.io/qt-5/qdesktopwidget.html
7983
http://doc.qt.io/archives/qt-5.5/qwebview.html
84+
http://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html
85+
http://doc.qt.io/qt-5/qwebenginepage.html#runJavaScript
86+
http://doc.qt.io/qt-5/qwebenginepage.html#fullScreenRequested
87+
http://doc.qt.io/qt-5/qwebenginepage.html#windowCloseRequested
88+
http://doc.qt.io/qt-5/qtwebengine-webenginewidgets-simplebrowser-example.html#adding-context-menu-items
89+
http://doc.qt.io/qt-5/qwebenginefullscreenrequest.html
8090

8191
https://wiki.qt.io/Qt_Coding_Style
8292
https://wiki.qt.io/Open_Web_Page_in_QWebView
@@ -138,11 +148,9 @@ http://stackoverflow.com/questions/19822211/qt-parsing-json-using-qjsondocument-
138148
http://stackoverflow.com/questions/25254043/is-it-possible-to-compare-ifdef-values-for-conditional-use
139149
http://stackoverflow.com/questions/10701504/command-working-in-terminal-but-not-via-qprocess
140150
http://stackoverflow.com/questions/17680207/qhash-iterator-example-no-match-for-operator
141-
142-
http://www.codeprogress.com/cpp/libraries/qt/showQtExample.php?index=598&key=QWebViewCustomContextMenu
143-
144-
http://comments.gmane.org/gmane.comp.lib.qt.user/960 (QString to QByteArray conversion)
145-
http://comments.gmane.org/gmane.comp.lib.qt.general/35521 (webkit - how to prevent alert popups)
151+
https://stackoverflow.com/questions/23174393/parse-jsonarray
152+
https://stackoverflow.com/questions/24899558/how-to-check-qt-version-to-include-different-header
153+
https://stackoverflow.com/questions/19822211/qt-parsing-json-using-qjsondocument-qjsonobject-qjsonarray
146154

147155
http://www.java2s.com/Code/Cpp/Qt/CheckfileexistanceandfilenamewithQFile.htm
148156
http://webkit.sed.hu/content/disabling-cache
@@ -155,6 +163,8 @@ http://habrahabr.ru/post/150329/ (Qt Coding Style)
155163
http://www.freehackers.org/thomas/2009/03/10/fixing-qmake-missing-rule-for-ts-qm/
156164
http://lemirep.wordpress.com/2013/06/01/deploying-qt-applications-on-linux-and-windows-3/
157165
https://unix.stackexchange.com/questions/116254/how-do-i-change-which-version-of-qt-is-used-for-qmake
166+
https://www.developpez.net/forums/d1549582/c-cpp/bibliotheques/qt/moteurs-web/runjavascript-fonction-lambda-plante/
167+
https://medium.com/genymobile/how-c-lambda-expressions-can-improve-your-qt-code-8cd524f4ed9f
158168

159169
## Perl 5
160170
https://perlbrew.pl/
@@ -192,10 +202,10 @@ http://www.tizag.com/perlT/perlhashes.php
192202
http://www.w3schools.com/bootstrap/bootstrap_tooltip.asp
193203
http://www.w3schools.com/bootstrap/bootstrap_ref_js_tooltip.asp
194204
http://www.w3schools.com/cssref/css_websafe_fonts.asp
195-
http://www.w3schools.com/html/html_lists.asp
196-
http://www.w3schools.com/jquery/html_html.asp
205+
http://www.w3schools.com/html/html_lists.asp
197206
http://www.w3schools.com/js/js_loop_for.asp
198207
http://www.w3schools.com/jsref/prop_html_innerhtml.asp
208+
https://www.w3schools.com/jsref/met_form_submit.asp
199209

200210
http://stackoverflow.com/questions/9051200/twitter-bootstrap-dropdown-menu
201211
http://stackoverflow.com/questions/2214066/get-list-of-all-input-objects-using-javascript-without-accessing-a-form-obj
@@ -204,6 +214,9 @@ http://stackoverflow.com/questions/8003089/dynamically-create-and-submit-form
204214
http://stackoverflow.com/questions/8003089/dynamically-create-and-submit-form
205215
http://stackoverflow.com/questions/588040/window-onload-vs-document-onload
206216
http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string
217+
https://stackoverflow.com/questions/6964927/how-to-create-a-form-dynamically-via-javascript
218+
https://stackoverflow.com/questions/16452699/how-to-reset-a-form-using-jquery-with-reset-method
219+
https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript
207220

208221
http://getbootstrap.com/components/#dropdowns
209222

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ These are the basic steps for building your first PEB-based application:
4545
* **2.** Write [a settings JavaScript object](#perl-scripts-api) for every Perl script you are going to run.
4646

4747
* **3.** Write your Perl scripts.
48-
Input from local HTML forms is read just like reading POST or GET requests in a Perl CGI script. Use the ``get-post-test.pl`` file within the PEB demo package as an example.
48+
Input from local HTML forms is read just like reading POST or GET requests in a Perl CGI script. Use the [get-post-test.pl](resources/app/perl/get-post-test.pl) file as an example.
4949

5050
* **4.** Connect your Perl scripts using a link to ``name-of-script-configuration-object.settings``.
5151

@@ -71,7 +71,7 @@ PEB is created to work from any folder without installation and all your local H
7171

7272
## Security
7373
* PEB does not need administrative privileges, but does not refuse to use them if needed.
74-
* PEB does not install or start any kind of server.
74+
* PEB does not use any kind of server.
7575
* PEB executes with no sandbox only local Perl 5 scripts and
7676
users have full access to their local files.
7777
* Cross-origin requests and cross-site scripting are disabled.
@@ -115,7 +115,9 @@ CONFIG += app_bundle
115115
```
116116

117117
## Runtime Requirements
118-
* Qt 5 libraries - their full Linux list can be found inside the ``start-peb.sh`` script,
118+
* Qt 5 libraries.
119+
Their full list for a QtWebKit Linux build of PEB can be found inside the ``start-peb-webkit.sh`` script.
120+
119121
* Perl 5 distribution - any Linux, Mac or Windows Perl distribution.
120122

121123
Tested successfully using the following Perl distributions:
@@ -129,11 +131,11 @@ CONFIG += app_bundle
129131
PEB can also use any Perl on PATH.
130132

131133
## Preparing a Perl Distribution for PEB
132-
Sometimes it is important to minimize the size of the relocatable (or portable) Perl distribution used by a PEB-based application. ``{PEB_binary_directory}/sdk/compactor.pl`` script is one solution to this problem. It finds all dependencies of all Perl scripts in the ``{PEB_binary_directory}/resources/app`` directory and copies them in a new ``{PEB_binary_directory}/perl/lib`` folder; a new ``{PEB_binary_directory}/perl/bin`` is also created. The original ``bin`` and ``lib`` folders are saved as ``{PEB_binary_directory}/perl/bin-original`` and ``{PEB_binary_directory}/perl/lib-original`` respectively. These directories should be manually archived for future use or removed.
134+
Sometimes it is important to minimize the size of the relocatable (or portable) Perl distribution used by a PEB-based application. [{PEB_binary_directory}/sdk/compactor.pl](sdk/compactor.pl) script is one solution to this problem. It finds all dependencies of all Perl scripts in the ``{PEB_binary_directory}/resources/app`` directory and copies them in a new ``{PEB_binary_directory}/perl/lib`` folder; a new ``{PEB_binary_directory}/perl/bin`` is also created. The original ``bin`` and ``lib`` folders are saved as ``{PEB_binary_directory}/perl/bin-original`` and ``{PEB_binary_directory}/perl/lib-original`` respectively. These directories should be manually archived for future use or removed.
133135

134-
``compactor.pl`` should be started using ``{PEB_binary_directory}/compactor.sh`` on a Linux or a Mac machine and ``{PEB_binary_directory}/compactor.cmd`` on a Windows machine to ensure that only the Perl distribution used by PEB is going to start ``compactor.pl``. This is necessary to avoid dependency mismatches with any other Perl on PATH.
136+
``compactor.pl`` should be started using [{PEB_binary_directory}/compactor.sh](compactor.sh) on a Linux or a Mac machine or [{PEB_binary_directory}/compactor.cmd](compactor.cmd) on a Windows machine to ensure that only the Perl distribution used by PEB is going to start ``compactor.pl``. This is necessary to avoid dependency mismatches with any other Perl on PATH.
135137

136-
``compactor.pl`` relies on ``Module::ScanDeps`` and ``File::Copy::Recursive`` CPAN modules, which are located in the ``{PEB_binary_directory}/sdk/lib`` folder.
138+
``compactor.pl`` relies on ``Module::ScanDeps`` and ``File::Copy::Recursive`` CPAN modules, which are included in the ``{PEB_binary_directory}/sdk/lib`` folder.
137139

138140
## Perl Scripts API
139141
Every Perl script run by PEB is called by clicking a link or submitting a form to a pseudo filename composed from the name of the JavaScript object with the settings of the Perl script and a ``.settings`` extension.
@@ -174,7 +176,7 @@ peb.startScript('perl_test.settings');
174176
*This object property is mandatory.*
175177

176178
* ``stdoutFunction``
177-
The ``stdoutFunction`` object property must be a JavaScript function. Every piece of script output is passed to this function as its only argument.
179+
Every piece of script output is passed to this function as its only argument.
178180
*This object property is mandatory.*
179181

180182
* ``requestMethod``
@@ -184,7 +186,7 @@ peb.startScript('perl_test.settings');
184186
This object property is useless if ``requestMethod`` is not set.
185187

186188
* ``inputDataHarvester``
187-
This object property is a function that can get input data from an HTML form or other data source and supply it to PEB.
189+
This object property is a function that can get input data from an HTML form and supply it to PEB.
188190

189191
Single input box example with no dependencies:
190192

@@ -255,7 +257,7 @@ The following code shows how to start an interactive Perl script right after a l
255257
</html>
256258
```
257259

258-
The ``index.htm`` file of the demo package demonstrates how to start one script in two instances immediately after a page is loaded.
260+
The [index.htm](resources/app/index.html) file of the demo package demonstrates how to start one script in two instances immediately after a page is loaded.
259261

260262
## Selecting Files and Folders
261263
Selecting files or folders with their full paths is performed by clicking a link to a pseudo filename composed from the name of the JavaScript object with the settings of the wanted dialog and a ``.dialog`` extension. Selected files or folders are seamlessly inserted in any local page by the ``receiverFunction`` taking all selected files or folders as its only argument.

start-peb.sh renamed to start-peb-webkit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /bin/sh
22

3-
# Sometimes the Qt libraries, that PEB depends on, are not available on PATH.
4-
# This script can start PEB with no Qt libraries on PATH,
3+
# Sometimes the Qt libraries that PEB depends on are not available on PATH.
4+
# This script can start a QtWebKit build of PEB with no Qt libraries on PATH,
55
# if the following libraries are placed in a folder named 'qt'
66
# inside the folder of PEB binary and this script:
77

0 commit comments

Comments
 (0)