summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Chromium requires C++14Allan Sandfeld Jensen2018-10-115-5/+0
| | | | | | | | | QtWebEngineCore was only building because Chromium CPPFLAGS was overriding ours. And setting C++11 in our examples and tests now forces a downgrade. Change-Id: I3642394f15bb9974688991800552624d2379faf9 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Allan Sandfeld Jensen2018-09-1730-18/+154
|\ | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/core_common.pri Change-Id: I36dc3a70aa653e6c8a610c787b615034180a6127
| * Document Tango icons used in examplesKai Koehne2018-08-2130-18/+154
| | | | | | | | | | | | Task-number: QTBUG-62053 Change-Id: I2df300239f4f02bb74f1ec27a74874b3877aabd0 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Correct cert to certificateAllan Sandfeld Jensen2018-09-122-2/+2
| | | | | | | | | | Change-Id: I7534aa6cd0c2a95403ad997095d5de76216f228e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Improve QWebEngineUrlScheme APIJüri Valdmann2018-09-122-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following feedback from 5.12 API review: - Use enum class for Syntax - Add Q_FLAG for Flags - Mark constructor from name as explicit - Rename Secure to SecureScheme - Rename Local to LocalScheme - Rename addScheme to registerScheme - Rename findScheme to schemeByName Task-number: QTBUG-70247 Change-Id: Iae332c8d9843349506e8a4b07d70f0d234597375 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | WebUI example: Reduce duplicationsKai Koehne2018-09-063-7/+15
| | | | | | | | | | | | | | Declare scheme name and about URL in one place. Change-Id: Id8eb69f2a8516dd21e6abedc2adda828a5a9e18c Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix initial url in quicknanobrowser and minimal examplesMichal Klocek2018-08-282-2/+2
| | | | | | | | | | | | | | | | There is no qt.io. Use www.qt.io. Use https. Change-Id: I1bf44a3c99cbb50b93875d88881cbdfb083f27c5 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add webui exampleJüri Valdmann2018-08-239-1/+558
| | | | | | | | | | | | | | | | | | Example of using QWebEngineUrlScheme and QWebEngineUrlSchemeHandler. Change-Id: I1316831600e7c9b8f7ca7b205ecb3c29bfcdcd84 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into ↵Allan Sandfeld Jensen2018-08-2216-146/+1785
|\ \ | | | | | | | | | refs/staging/5.12
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Michael Brüning2018-08-2116-146/+1785
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc mkspecs/features/platform.prf src/3rdparty src/core/media_capture_devices_dispatcher.cpp src/core/net/url_request_context_getter_qt.cpp src/core/net/url_request_context_getter_qt.h src/core/web_contents_adapter.cpp Change-Id: I467133ba455b1f85f6bb61793794c31cb1094541
| | * Fix segfault in devtools openInNewTab handlingJüri Valdmann2018-07-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use OpenURL on the devtools WebContents. - Guard against self-destruction (otherwise quicknanobrowser crashes). - Change quicknanobrowser to open links in new tabs. Task-number: QTBUG-69359 Change-Id: I4db379731c6fa855124d38c5066b0aad622861d2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Update marked.js in examplesKai Koehne2018-07-1219-33/+3049
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update marked.js in examples to version 0.4.0. Also use the non-minified version; this is required by some downstream users like Debian. Task-number: QTBUG-69273 Change-Id: Ic4fffc2db0a457e54595cd846efee305b97b2238 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Fix typo in examples/webenginewidgets/webenginewidgets.proJüri Valdmann2018-08-211-1/+1
|/ / | | | | | | | | Change-Id: I86dc2f050644a354553aab82a221d986e95c81aa Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Make WebChannel an optional featureMichal Klocek2018-08-091-1/+1
| | | | | | | | | | | | | | Add webengine-webchannel feature. Change-Id: I600572180f8169aafe79cf0408527cc087d9a007 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix simplebrowser build without sslMichal Klocek2018-07-292-0/+6
| | | | | | | | | | Change-Id: I30dd5d438d9c17a1b96e858bf00cafdcf8d26544 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Update user dir associated to BrowserContext when chaging profile's pathPeter Varga2018-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | Otherwise, setting a WebEngineProfile to non-off-the-record would assert. Therefore, now it is safe to set the quicknanobrowser's defaultProfile to non-off-the-record. Task-number: QTBUG-69416 Change-Id: I5ca2230e12e457dd9963e386708f2394ae4c8cea Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Enable client certificate storeAllan Sandfeld Jensen2018-07-082-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Creates the default client cerficate store for the platform and when given a choice of client certificates forwards to the choice to the application. Only a Widgets API for now. Task-number: QTBUG-54877 Change-Id: Ie15152398d5769579fa0c07e3e3035c2374e9940 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-06-2610-10/+10
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json src/3rdparty tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Id79ff6cf01c2db3a2044881ddcbf044abdf84936
| * Doc: Add missing dots (qtwebengine)Paul Wicking2018-06-229-9/+9
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I395157a9931a0e0789b3791cc9b4d55dbcf8a4c2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: Fix quoting code from Recipe Browser exampleLeena Miettinen2018-06-221-1/+1
| | | | | | | | | | Change-Id: I4012d91241ea04a786792de1916997c09d9298b4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix webengine geolocation featureMichal Klocek2018-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use feature check in the configuration and in the implementation files. Make feature public, so developers can check if webengine was complied with or without geolocation. Change-Id: If679b5c366074c2f48fad5ba189870571567fe81 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Add sanity config check to examplesMichal Klocek2018-06-182-0/+9
| | | | | | | | | | | | | | | | Report error if example is used, but no support in webengine. Change-Id: Ic1c8f6c875c0197abdc9ffe92eea05af236c3318 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fine tune configure and clean up header includesMichal Klocek2018-06-122-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously configure was generating two config headers qtwebengine-config.h and qtwebengine-config_p.h, however those headers were never installed or included as dependency in Makefiles. Moreover, due to the name clash all features were included into qt_lib_webengine_*.pri which is QtWebEngine QML module. Move configure to core so all features belong now to qt_lib_webenginecore*.pri. Fix global includes to include qtwebenginecore-config*.h. Drop all DEFINES and use QT_CONFIG instead. Cleanup all evil looking includes in headers for webengine and webenginewidgets. Change-Id: Iddbc8bf4487d9a5f0c19a71a9569535083507756 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-062-2/+3
| | | | | | | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | simplebrowser: Handle featurePermissionRequested signalJüri Valdmann2018-06-012-0/+35
| | | | | | | | | | Change-Id: I012461722c006cbd6a4871279e94a442681d4fe5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-05-291-1/+1
|\| | | | | | | Change-Id: I9b1f2a0317290f0855da03eca9d26878b7faeb0a
| * CookieBrowser: Support also incomplete URL'sKai Koehne2018-05-251-1/+1
| | | | | | | | | | | | | | Use QUrl::fromUserInput to also handle URL's without protocol prefix. Change-Id: I8e9d4650ffe86886920b48170a6b188d2c0478c8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Update 3rd party code in markdown exampleKai Koehne2018-05-236-14/+1396
| | | | | | | | | | | | | | | | | | | | | | Update to marked 0.3.19. Also include the un-minified version, so that the code can be read. [ChangeLog][Third-Party Code] Updated "Marked (WebEngine Markdown Editor example)" to version 0.3.19. Change-Id: Ie068d003ec6cfab27803332b4aa12095c6c8a457 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-05-1814-450/+144
|\| | | | | | | Change-Id: Id171407c17533846e8efe0e586d6793a61543438
| * Remove qwebchannel.js from test and exampleMichal Klocek2018-05-173-432/+1
| | | | | | | | | | | | | | | | Use qwebchannel.js shipped with qtwebchannel. Change-Id: Iceead5131d22a6988bbb4e7a3cca1e9f21908e3e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Improve user experience in stylesheet exampleSzabolcs David2018-05-165-10/+87
| | | | | | | | | | | | | | | | | | | | | | - Add checkboxes to make configurable whether a stylesheet should be applied - Add a default stylesheet which rotates the page by 180 degree. Task-number: QTBUG-64816 Change-Id: Ic82c61f9d1e5384f3271a260bc390ac50f5b9a12 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Fix keyboard focus for speculative RenderFrameHostsJüri Valdmann2018-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When encountering a 301 redirect, one render frame/widget is created for the original URL plus one "speculative" render frame/widget for the new URL. Once the speculative frame commits, keyboard focus should switch to the corresponding widget. This doesn't work however, because QQuickItem::forceActiveFocus doesn't give focus to the containing QQuickWidget. Fixed by using QWidget::setFocus. Also changed simplebrowser to focus the QWebEngineView on startup. Task-number: QTBUG-68076 Change-Id: I8dc42ba89bfdcd46a86c7dca357fdf1e94f439d4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Remove hardcoded size from QWebEngineView::sizeHint()Szabolcs David2018-05-095-6/+54
| | | | | | | | | | | | | | | | | | | | | | | | 800x600 takes more space than expected when building a layout which contains QWebEngineView. Now this function does exactly the same as QWidget::sizeHint(). Add an auto test and update examples which were depending on this hardcoded size. Change-Id: I3b34b7d37cc99a8d6a49100d6c4b66b5b6a1c999 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix warning in debug build for quicknanobrowserMichal Klocek2018-05-171-1/+1
|/ | | | | | | | | Fixes qrc:/BrowserWindow.qml:293:25: QML MenuItem: Binding loop detected for property "checked" Change-Id: Ieac5e70af063c841a963a9c377a5fdf3cde8c7ac Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Examples: Use === where possibleKai Koehne2018-04-191-4/+4
| | | | | | | | This silences QtC warnings. Change-Id: Ia5580379a8ace01274265b3688cc267aa3540210 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Examples: Name signal argumentsKai Koehne2018-04-193-15/+26
| | | | | | | | | | Use a function declaration for all signal handlers that take at least one argument. Directly referencing the signal values is less robust and arguably too much magic. Change-Id: I49a48e336bdc2149643770b978826884515cc4ad Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* simplebrowser: Focus url bar for new tabs and windowsJüri Valdmann2018-04-171-3/+8
| | | | | Change-Id: Ib13db55adc065dde3bc257f3acc243480c2d03b4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Shorten names of permission classesJüri Valdmann2018-04-133-9/+9
| | | | | | | | | | | Remove 'permission' from class and signal names, so e.g. QWebEngineQuotaPermissionRequest becomes QWebEngineQuotaRequest and quotaPermissionRequested becomes quotaRequested. Rename the internal controller classes to public name + "Controller". Change-Id: I247714ab0a2880adbf4ed8ee68f1b78838ae7a14 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Adaptations to form validationAllan Sandfeld Jensen2018-03-155-77/+9
| | | | | | | | Form validations messages has moved entirely to being done by Blink. Change-Id: I6742c111fc59f0baba75b8b37f5d0ec9ae2fb920 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Rename protocol() to scheme() in QWERPHPermissionRequestJüri Valdmann2018-03-082-2/+2
| | | | | | | | | Scheme refers to a part of a URL. Protocol refers to a formal standard for communication over a network. Therefore scheme is more accurate here, since registerProtocolHandler only defines simple aliases. Change-Id: I71a1511aa92e41c3e3aca4c0403f54af6d91c563 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add ninja icon to simplebrowserMichal Klocek2018-03-063-0/+10
| | | | | | Task-number: QTBUG-65944 Change-Id: Ie30f2088ca3be90a75d3592433f0c6cf56381dde Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix some QDoc warningsJüri Valdmann2018-03-022-7/+2
| | | | | Change-Id: I1af130982db78184fca763dd61568f350d8a2d42 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Prevent Qt Quick Compiler from removing qrc Javascript source codeAlexandru Croitor2018-02-203-0/+11
| | | | | | | | | | | | | | | | | By default whenever a Qt application is built with Qt Quick compiler, it will scan all qrc resources for javascript files, generate corresponding C++ code, and remove the original JS code. This is problematic for web pages that are loaded in WebEngine because the pages won't be able to access the javascript code, and silently fail (or if you are lucky, you will get some unrelated "can not be found" error). Use the undocumented QtQuick Compiler QTQUICK_COMPILER_SKIPPED_RESOURCES qmake variable to specify that Javascript source code found in qrc files should be left as is. Task-number: QTBUG-66155 Change-Id: Ib1dc744901baddd9e0c17c53db1ffede5c31e544 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for registerProtocolHandlerJüri Valdmann2018-02-133-0/+24
| | | | | | | | | | | | | | | | | | | Extend initialization of URLRequestContextGetterQt to create a content::ProtocolHandlerRegistry for each content::BrowserContext and add the registry's URL request interceptor to the front of the interceptor chain. Implement methods in WebContentsDelegateQt to add/remove protocol handlers to/from the ProtocolHandlerRegistry. Add permission request signal and classes for core, quick and widgets. Add widgets autotest. Add signal handlers to quicknanobrowser and simplebrowser. Task-number: QTBUG-62783 Change-Id: I808e7eb9a1cb4d7216686deed4895de14fe46310 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.10.1' into 5.11Liang Qi2018-02-121-1/+1
|\ | | | | | | Change-Id: If971fbfcb158c921e2328dfcdef3bd3322f30c4b
| * Merge remote-tracking branch 'origin/5.9' into 5.10.1Michael Brüning2018-02-051-1/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/core/web_engine_context.cpp Change-Id: I004994a0ab6dbc54370b6973de1816cd673154c6
| | * Fix quicknanobrowser to use unique storage locationMichal Klocek2018-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not use "Default" as custom profile, global profile uses "Default" as storge name, this ends up on creating two browser context adapters using the same files. Change-Id: I298fa87ee14c5c83a15683710ba3fbb29c201714 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Allan Sandfeld Jensen2018-02-061-3/+3
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2018-02-021-3/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/download_manager_delegate_qt.cpp src/core/download_manager_delegate_qt.h src/core/render_widget_host_view_qt.cpp src/core/web_contents_adapter.cpp src/webengine/api/qquickwebengineview.cpp tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp Change-Id: I2308414ce257ae5bb0fc9f6493aa111a267ff39b
| | * | Fix FDL license headerKai Koehne2018-01-231-3/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I8d7cf992d1f51cc82168d5e01bbe4c062be09992 Reviewed-by: Michael Brüning <michael.bruning@qt.io>