summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets/simplebrowser
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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-132-6/+6
| | | | | | | | | | | 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>
* Rename protocol() to scheme() in QWERPHPermissionRequestJüri Valdmann2018-03-081-1/+1
| | | | | | | | | 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-021-6/+1
| | | | | Change-Id: I1af130982db78184fca763dd61568f350d8a2d42 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Add support for registerProtocolHandlerJüri Valdmann2018-02-132-0/+19
| | | | | | | | | | | | | | | | | | | 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>
* Make default context menus look more like chrome's oneValentin Fokin2018-02-022-20/+22
| | | | | | | | | | | | | | - Implement EditFlags in ContextMenuData - Unify Quick and Widget default context menus - Add workaround for QTBUG-65044 - Update the SimpleBrowser example and its documentation [ChangeLog][QtWebEngine][QtWebEngineWidgets] Unify Quick and Widget default context menus Task-number: QTBUG-62414 Change-Id: I16a380f9f17e160497dfb8ac9c172341eb28c6c8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix compilation of simplebrowser exampleKai Koehne2018-01-161-0/+1
| | | | | | | | | | | Previously qstyle.h was included indirectly through the uic generated code, but this got changed in qtbase commit 058474884c2505a8a0. Task-number: QTBUG-65793 Change-Id: I56a1cd045d53b268999d728f6907ee8d952ba6e9 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Introduce devtools frontendAllan Sandfeld Jensen2017-12-068-34/+75
| | | | | | | | | | Makes it possible to use devtools without using the remote-debugger Task-number: QTBUG-47899 Task-number: QTBUG-50725 Task-number: QTBUG-50766 Change-Id: Id32e13f773372d9917599ebbb64ab4af61bbf1d8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-037-15/+86
|\ | | | | | | | | | | | | Conflicts: src/3rdparty Change-Id: Ie6b1922db2269e0e0561022162228a7c8609c9ba
| * Merge branch '5.9' into 5.10Allan Sandfeld Jensen2017-11-017-15/+86
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/core_module.pro src/core/delegated_frame_node.cpp src/core/surface_factory_qt.cpp src/webenginewidgets/api/qwebengineprofile.cpp tests/auto/widgets/widgets.pro Change-Id: I92f3ef4eee779afef6c5381a7aa8b551417c1b17
| | * Add off-the-record mode to simplebrowser exampleJüri Valdmann2017-10-257-15/+86
| | | | | | | | | | | | | | | | | | Change-Id: I9b87f870c4f6ad63142bc0497722b0c95095cd6b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Merge branch '5.10' into devAllan Sandfeld Jensen2017-10-1318-44/+214
|\| | | | | | | | | | | Change-Id: I3a411e4019a5ec2f7d1a967b62a00ad7cf92f6f4
| * | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Allan Sandfeld Jensen2017-09-2918-37/+207
| |\ \ | | | | | | | | | | | | refs/staging/5.10
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2017-09-2918-37/+207
| | |\| | | | | | | | | | | | | Change-Id: I7094e85a7770303a2ae30baccbc484c04f33600e
| | | * Fix license header for examplesKai Koehne2017-09-2018-34/+204
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-60006 Change-Id: Ie1604aed3d5a9ba566e898eae232227ba340bfaa Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | * Fix not working "OpenFile" in simplebrowserMichal Klocek2017-09-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3e9baf47d0491f0031a9a9864eecd12b09773eff Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | | Change the minimal example to be minimally usefulAllan Sandfeld Jensen2017-09-281-7/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Open the first non-flag argument if one is given Fixes up simplebrowser to act similarly Change-Id: I40270a0f7bc06ce52117f23f7ccbdd743d3d97f6 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* / / Implement geometryChangeRequested signal in the Quick APISzabolcs David2017-10-051-4/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium includes the size of the frame in the requested geometry, but QWindow::setGeometry() and the related properties of QML Window expect a size without frame. This patch - fixes the geometry handling in Demobrowser example. - implements a new signal in the QML API which sends both frameless and extended geometries to the application, because QML doesn't have capability to determine the size of the frame and handle extended geometry correctly. Task-number: QTBUG-51181 Change-Id: I8595593aecca33d7cd46986c7abbad0cc7c18ec2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devAllan Sandfeld Jensen2017-08-1435-359/+751
|\| | | | | | | | | | | Includes sha1 bump of src/3rdparty to head of 58-based. Change-Id: I37743c3979c1b6fb21f71eab7048e82f7aa5d78b
| * Fix signal name in simplebrowser example documentationJüri Valdmann2017-08-031-1/+1
| | | | | | | | | | Change-Id: Id3bf1218e43609cdb471e087e2077d4c0c0e5153 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Fix simplebrowser crash on exit while downloadingMichal Klocek2017-08-022-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | On webengine profile destruction all download items in progress are canceled. This triggered stateChanged of QWebEngineDownloadItem which called lambda function on already deleted object. Do not use lambda functions in this case. Change-Id: Ia1d359fe47204baa51f1380d1c3547c28550bc28 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
| * Update Simple Browser exampleJüri Valdmann2017-07-1935-354/+750
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Accept downloads and add a downloads list. - Fix toolbar icons being pixelated on hidpi screens by - enabling attribute AA_UseHighDpiPixmaps, and - replacing the 22x22 icons with 32x32 versions. - Move favicon selection to WebView to reduce duplication. - Replace UrlLineEdit with a standard QLineEdit using a QAction for the favicon and setClearButtonEnabled(true) for the clear button. - Fix bug where the "File -> New Tab" action would create background tabs because the QAction::triggered(bool) signal was connected to the TabWidget::createTab(bool) slot with the bool argument having a completely different meaning between the two. - Make the toolbar unmovable. Nobody wants to move the toolbar. - Add tooltips to toolbar buttons. - Add tooltips to the tab bar (page titles). - Stop adding icons to menu items only to disable them right after. Task-number: QTBUG-60655 Change-Id: I10cc0fa82dbf39281bbdbbf9ef901e1b26402f80 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
| * Add Search in page to Simple BrowserJüri Valdmann2017-06-132-1/+48
| | | | | | | | | | | | | | Task-number: QTBUG-59824 Change-Id: Id72428996721bd60596becc5b13b29a132f70e69 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit af422d3fc6061ef057bb6f8b58b97af62304e836)
* | Fix viewport information in simplebrowserPeter Varga2017-08-021-1/+6
| | | | | | | | | | | | | | | | | | Resize QWebEngineView explicitly as a workaround for background tabs. Task-number: QTBUG-61770 Change-Id: Iaa792cb01788c9c33b6992a08a05b0cf11d0579d Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devAllan Sandfeld Jensen2017-05-301-0/+7
|\| | | | | | | Change-Id: I962033871a1ef624807a4e1869fe869406aa73f7
| * SimpleBrowser: Press Ctrl-L to focus the location barJoerg Bornemann2017-05-041-0/+7
| | | | | | | | | | | | | | | | This commonly used short cut is a must-have for every browser, even simple ones. Change-Id: I2a0bde05bceeb5a4334e3a7168bd45a9335311ee Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Add Search in page to Simple BrowserJüri Valdmann2017-04-262-1/+48
|/ | | | | | Task-number: QTBUG-59824 Change-Id: Id72428996721bd60596becc5b13b29a132f70e69 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix crash on context menuAllan Sandfeld Jensen2017-02-221-1/+0
| | | | | | | | | | Instead of calling deleteLater, just tell close to delete the menu itself. Task-number: QTBUG-59080 Change-Id: I3eae382781f813ed3c6f27b78088b94ed1c486dd Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-08-021-2/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/resources/resources.gyp src/webengine/doc/src/qtwebengine-overview.qdoc src/webenginewidgets/api/qwebenginepage.cpp src/webenginewidgets/api/qwebenginescriptcollection.cpp src/webenginewidgets/api/qwebenginescriptcollection_p.h tests/auto/widgets/qwebenginepage/BLACKLIST And readded newly in 5.6 enabled tests to the BLACKLIST. Change-Id: I4ab1fc54ebfaaf940df81b0d8d6bdd15cae8b7c4
| * Fixup Back/Forward short-cutsAllan Sandfeld Jensen2016-07-221-2/+20
| | | | | | | | | | | | | | | | | | | | | | Remove backspace short-cut, Chromium will already handle that if it is standard on the platform. Also we were not triggering on Back/Forward buttons due to those being mapped to prev/next tab item in Qt. Task-number: QTBUG-54546 Change-Id: I9a4f48c718c5685ca9ca1b032d8b04409ac622ca Reviewed-by: Jesus Fernandez <jesus.fernandez@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-06-271-0/+2
|\| | | | | | | Change-Id: Ic6686df8f82f710a3441501b7eeaffe69fbcbdf7
| * Make all examples high-dpi awareKai Koehne2016-06-201-0/+2
| | | | | | | | | | | | | | | | | | Setting the Qt::AA_EnableHighDpiScaling attribute makes sure that the scrollbars are scaled, and that the default zoom level is sensible. Task-number: QTBUG-54113 Change-Id: I0ae7eb97cb9e2824e7f9b92d77cf2986cac66685 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-06-111-0/+1
|\| | | | | | | Change-Id: Ib010ede9756fb02992a3276ae7ec90ef1ab56a00
| * Fix build of webenginewidgets/simplebrowserJoerg Bornemann2016-06-101-0/+1
| | | | | | | | | | | | | | | | | | Add missing include to fix error C2027: use of undefined type 'QDebug' on MSVC. Change-Id: Icc62cdf36f417f30691445ab4994b822c8e37db9 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Enable plugins in the simplebrowserAllan Sandfeld Jensen2016-06-071-0/+3
| | | | | | | | | | | | | | | | This makes it possible to also test flash from simplebrowser. Change-Id: I94677383fdbea4a723432ea6811ee72314c019fd Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-201-3/+15
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/browser_context_adapter.cpp src/core/web_contents_adapter.cpp tests/auto/widgets/qwebenginepage/BLACKLIST Change-Id: I45ee0a33f6316f585555d58fede8072fe514aecf
| * [Simplebrowser] Fix command line option parsing.Alexandru Croitor2016-05-111-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Passing just command line options to Chromium prevents loading of the initial startup url. This happens because the startup url is overridden by the last command line argument, which happens to be a Chromium option, thus an invalid URL. Fix consists in using the last command line argument as the loading url only if it can be parsed as valid url. Change-Id: I3615ef57b6eddc5098de79cba1b1ba6b6af193ef Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Change messagebox in simplebrowser exampleMichal Klocek2016-05-091-2/+5
| | | | | | | | | | | | | | | | In case of render epic fails, let the user leave the loaded page with dignity. Change-Id: I27f692fc0bb181c1d4f7ce43f5772d5573d7e385 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-04-251-2/+4
|\| | | | | | | Change-Id: I329397621f19ba3890be5daf44a6bb2d668ad2d8
| * Fix contextMenu handling in examplesMichal Klocek2016-04-211-2/+4
| | | | | | | | | | | | | | | | Adds missing deleteLater on close Change-Id: Id337856f138e0d38f0c72d3962ccac309d36c73e Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | SimpleBrowser: Use new QWebEnginePage::icon APIKai Koehne2016-04-207-82/+19
| | | | | | | | | | | | | | Change-Id: I38d16a57116517aee21f6f84c5fca82192cb1572 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Merge branch '5.6' into 5.7Allan Sandfeld Jensen2016-04-181-1/+1
|\| | | | | | | Change-Id: I490e0ee46d3ff040ca26426feb7e4d6ef7098f94
| * SimpleBrowser: Fix loading iconKai Koehne2016-04-151-1/+1
| | | | | | | | | | Change-Id: I008b649b43069978b6ce19b2faf5a557dd67c756 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | SimpleBrowser: Handle WebBrowserBackgroundTabKai Koehne2016-04-071-0/+4
|/ | | | | | | | | | | Fix compilation warning: qtwebengine/examples/webenginewidgets/simplebrowser/webview.cpp:131: warning: enumeration value 'WebBrowserBackgroundTab' not handled in switch [-Wswitch] switch (type) { ^ Change-Id: I590207c56525db740e62403b6cb949c6281d765c Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* Strip down demobrowser to become simplebrowserMichal Klocek2016-03-1631-0/+3438
Demobrowser changes: * remove QLocalServer/Socket * remove AutoSaver * remove restoreLastSession * remove general QSettings * remove downloadManager * remove bookmarkManager * remove historyManager * remove searchBar * favor setStyleSheet over overriding paint methods * use lambdas where suitable * use QProgressBar instead of own painted widget * use QToolButton instead of own painted buttons * remove QStackWidget, use single UrlLineEdit per window instead of per tab * split files to keep own classes: webpage and webview * remove tracking windows by QPoiner * remove WebPageActionMapper, TabBar classes * remove QDrag dead code * remove special OS X close app handling * fix encapsulation, clean up application logic Change-Id: I4849b6a2de739dea4f01229abdb90418601a2397 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>