summaryrefslogtreecommitdiffstats
path: root/src/webengine/ui_delegates_manager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Implement touch text selection for QQuickWebEngineViewPeter Varga2019-01-311-0/+79
| | | | | | | | Touch handle and touch selection menu are not implemented for widget. Task-number: QTBUG-59999 Change-Id: Ia492e58b83d3ad38cdf6877d468724c399f34367 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove some outdated Qt version checksAllan Sandfeld Jensen2018-10-231-5/+0
| | | | | | | | We can't not build with older than Qt 5.9 anyway due to QSG and qmake changes. Change-Id: Iff0247e70d9ffc1e045e2c571f0089d68df9a589 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Clean up WebEngineAction APIPeter Varga2018-09-201-1/+1
| | | | | | | | | - Rename iconText to iconName - Remove unused QQuickWebEngineAction::toggled signal - Remove argument of QQuickWebEngineAction::enabledChanged signal Change-Id: I37172c096003eea58e567753265abd91679dacf1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Introduce WebEngineAction in Quick APIValentin Fokin2018-08-021-22/+13
| | | | | | | | | | | Also implement QQuickWebEngineView::action() method similar to the Widget API to access the WebEngineActions. [ChangeLog][QtWebEngine] Introduce WebEngineAction in Quick API Task-number: QTBUG-56117 Change-Id: I758cd4703db4c111c1ed9187e091d4c845486c46 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Add support for loading UI delegates from resource filesRomain Pokrzywka2018-06-181-15/+34
| | | | | | | | | | | | | | | | | | Custom UI delegates can be specified for dialogs, context menus, etc. by placing them in a specific folder accessible from the import path, but it assumes that all import paths are folders on the os filesystem. But resource (.qrc) files are also supported as a built-in import path, so we should support loading UI delegates from there too. We just need a couple of adjustments for QFileInfo to look them up using the ":/" prefix, while still loading then using the "qrc:/" protocol. Also add support for partial controls override, so it's possible to customize only some UI delegates by prepending an import path with some delegate files in there, and use the built-in ones for the rest. Change-Id: I6c791ed0118b396639acd8af8e135e1d68b2c19b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-061-6/+9
| | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Remove an unnecessary ContextMenu SeparatorValentin Fokin2018-04-051-1/+1
| | | | | | | | | When right clicking on a simple image there would be a separator on the top of the DefaultContextMenu. This patch fixes it by checking if the context menu has any elements in it before adding a separator. Change-Id: I6bbe91fdac9f49006be8cc73df1d97d34f3c2848 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations to form validationAllan Sandfeld Jensen2018-03-151-34/+0
| | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2018-01-161-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/web_contents_adapter.cpp src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: I56c093ebab5ee8b577783ce71761719159cd3ddd
| * Fix backward compatibilityPeter Varga2018-01-081-0/+5
| | | | | | | | | | | | | | | | | | - Guard QTemporaryDir::filePath (5.9) usage in the drag and drop implementation. - Guard QQuickItem::mapToGlobal (5.7) usage in the Quick context menu implementation. Change-Id: If383fa55fbbd1b2a3fe4abd57373598a1703786c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-2/+31
|\| | | | | | | | | | | | | | | | | Conflicts: src/3rdparty tests/auto/quick/qmltests/qmltests.pro tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I2a1e3a83e29a1d6709f3e98fda3f7b4ab7ab297e
| * Fix position of keyboard-invoked context menu in QQuickWebEngineViewJoerg Bornemann2017-11-071-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QQuickWebEngineView the context menu is a QtQuickControls.Menu item. This menu is shown by calling popup() which always displays the menu below the mouse cursor. Work around the problem by moving the mouse cursor temporarily to the right position. Use a QObject property "pos" to store the requested menu position between addMenu() and showMenu() calls, because the Menu item doesn't have a "pos" QML property. Change-Id: Id772a0bb1a7548cad932e9f499ade68be32d86d3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Remove support for building with Qt versions < 5.8.0Allan Sandfeld Jensen2017-08-041-4/+0
|/ | | | | Change-Id: I2f2ba754111e198298b7d1a595343fcd773e05e5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix backwards compatibilityAllan Sandfeld Jensen2017-05-101-0/+5
| | | | | | | | | | QtWebEngine supports building with last stable and last LTS Qt releases. Guard some 5.7-5.9 API from being used when not available, and reinstate the default features for 5.6 LTS builds. Change-Id: Ia288a49109d011a2bee883d4a2d38d994b497d59 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix empty dialogs on window.onbeforeunloadSzabolcs David2017-02-211-1/+4
| | | | | | | | | Custom texts are not supported anymore in unload dialogs. Fill them with a better message. Task-number: QTBUG-58673 Change-Id: I820155452461db90bf1df2ae8a8ec10ee752aab1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix Q_ASSERT when m_messageBubbleItem is not createdMichal Klocek2016-10-281-1/+2
| | | | | | | | | | When custom dialogs are created for FormValidationRequest, it is possible to accept Show request but reject Move request, in that case default MessageBubbleItem is not created and request should be ignored. Change-Id: I5f168802a66d88baa68d76396a073b5ff6517542 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Clean up qt quick controls 1 dialogsMichal Klocek2016-10-041-4/+4
| | | | | | | | Based on code review for qqc2 integration, apply cleanup changes to qqc1. Change-Id: I9752ce944385a529a1d999a5419638868e18d799 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add dialog requests to qml apiMichal Klocek2016-08-311-5/+3
| | | | | | | | | | | | | | | | | Introduce qml APIs to support custom dialogs: * http and proxy authentication * javascript dialogs * file pickers * color pickers * form validation messages [ChangeLog][QtWebEngine][QML] Added ability to provide custom dialogs for HTTP and proxy authentication, JavaScript alerts, file and color picking, and form validation messages. Task-number: QTBUG-51190 Change-Id: I559ca59264750feb36ba7d3dba0bf0647509306d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add Qt Quick Controls 2 support for dialogsMichal Klocek2016-08-181-38/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | QtQuickControls1 does not handle embedded platforms too well. In case of eglfs platform we crash badly - only one window is supported. QtQuickControls2 on the other hand lacks the native look on desktop. Therefore on desktop platforms keep using QtQuickControls1, and on eglfs use QtQuickControls2. QtQuick.Dialogs are not implemented for QtQuickControls2, moreover required authentication dialog and prompt dialog are neither implemented in QtQuickControls1. As a workaround make new dialogs to give consistent look and feel. Replace close() with reject() signal in java script prompt dialog to unify handling between qqc1 and qqc2 [ChangeLog][QtWebEngine][General] Qt WebEngine (QML) now optionally uses Qt Quick 2 Controls to show standard dialogs. Task-number: QTBUG-53467 Task-number: QTBUG-51177 Change-Id: I42f9506357bbb82d4f04465f30a18c8013439e25 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add ToolTip support for Qt WebEngine (QML)Adam Kallai2016-07-201-0/+64
| | | | | | | | | [ChangeLog][QtWebEngineQML][QQuickWebEngineView] ToolTip (HTML global title attribute) are now handled. Task-numner: QTBUG-54108 Change-Id: I78cc3c1e934a822d6399ebd35c8c7895fbdf5749 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-06-171-12/+15
|\ | | | | | | Change-Id: If4d8a25f5a2192a658d031252435935cbc675725
| * Fix memory leak of qml menuMichal Klocek2016-06-131-12/+12
| | | | | | | | | | | | | | | | | | | | | | Current qml menu implementation uses always WebEngineView as the parent of the menu. However menu can be triggered several times during WebEngineView lifetime, each time creating new menu component. Use onDone menu signal instead to delete menu. Change-Id: I1a6064451e95453268a2cd46899e297e769dc1f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix memory leak of authentication qml dialogMichal Klocek2016-06-131-0/+3
| | | | | | | | | | Change-Id: I951c78e53ff0e05918daf34076fffc44b813a8d2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add spell checker supportMichal Klocek2016-02-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrate chromium spell checker: * add spellchecker and dependencies to build * underline misspelled words in html text areas * right-click context menu shows up to 4 options to correct the misspelled word * toggle spell check from context menu * add new qml and widget api calls to qwebengineprofile to enable/disable spell check, select spell check language, get list of supported languages/dictionaries * register new qml spell check properties for QtWebEngine 1.3 * CONFIG+="no_spellcheck" to remove spellcheck support Change-Id: Ie61434ab9493597d7759a6f33794f6859c4e3a4c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Unify license header usage.Jani Heikkinen2016-02-011-11/+14
| | | | | | | | | | | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-181-2/+3
|\| | | | | | | Change-Id: I038f3544785862f3a2e2f35b8fab0b163e75d542
| * Show host only in authentication dialog to reduce window sizeJoni Poikelin2016-01-141-2/+3
| | | | | | | | | | Change-Id: I6742fb003420404dafdcf204b5c3e9ffd9f474fc Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-121-1/+7
|\| | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * Implicitly use QStringBuilder in all modulesJoerg Bornemann2016-01-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | Every Qt module is built with QT_USE_QSTRINGBUILDER by default. Also define QT_USE_QSTRINGBUILDER in the core API library. Remove superfluous qstringbuilder.h includes. Keep the use of operator% to make sure that QT_USE_QSTRINGBUILDER won't vanish in future build system changes. Change-Id: I41fd036fc4e6063951cd758aaafdf9aefed7dd5a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * UIDelegate: setParentItem for dialogsJochen Seemann2016-01-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | Set the visual parent of the dialogs like we already do in showFilePicker(). This is needed when overriding the standard Window-based dialogs with Item-based dialog, e.g. on platforms that only support one window. Change-Id: I99e9397211994d027afea6f7557acf3ebc4ac424 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add support for html color inputAdam Kallai2015-12-021-0/+38
| | | | | | | | | | Change-Id: I501125631946f70aae1ff039b0e5bcb9198e7242 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2015-11-201-6/+6
|\| | | | | | | Change-Id: I05fe27b8321944cf68cc96dfa9dfcaeb54c8c8cd
| * fix translations in UIDelegatesManagerJoerg Bornemann2015-11-091-7/+6
| | | | | | | | | | | | | | | | | | Declare UIDelegatesManager::tr and harmonize translations in that class. Change-Id: I6dfdb29b24d8912150d0af637b8dc1af633e21df Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | fix includes in UIDelegatesManagerJoerg Bornemann2015-11-161-8/+4
|/ | | | | | | | Remove unnecessary includes and move as many as possible to the implementation. Fix local/global includes. Change-Id: Ia1efe447ed83d436997616a3c6a02ed30d9965d2 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Enable building with MSVC 2015Kai Koehne2015-10-191-1/+1
| | | | | | | | | Enable MSVC 2015 in prechecks and fix error C2308: concatenating mismatched strings Task-number: QTBUG-47541 Change-Id: Ia583e2963c7e6ef8327909b91c8df04aeb17eb07 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Implement unload dialogsSzabolcs David2015-09-271-0/+4
| | | | | | | | | This fixes the assertion that occurs when the application should show "Are you sure you want to leave this page?" dialog. We can reuse the already existing confirm dialog implementations. Change-Id: I22466d450f39b54d9becbb69e1ecadb3b98697b0 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add HTTP and proxy authentication dialogs to the QtQuick APIPeter Varga2015-09-091-0/+41
| | | | | Change-Id: Idba4c32df3aaecabfbdca0c79c80317e2e4577ba Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Replace QObject::trKai Koehne2015-09-031-3/+3
| | | | | | | Place translations in a better namespace than 'QObject' Change-Id: Id691050f2f50eba4f272b52ff36caf7056d017c2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Implement missing WebActions in QML APIAllan Sandfeld Jensen2015-07-101-33/+0
| | | | | | | | Implements the remaining WebActions from the widgets API in the QML API, so the available actions matches. Change-Id: I60dfd4a574b80cdd82b8891abfb27a8bfb1b88ec Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add WebAction to QML apiAllan Sandfeld Jensen2015-07-061-13/+0
| | | | | | | | | | Adds WebActions matching QWebEnginePage to QQuickWebEngineView, this makes it possible to support copy/paste on OS X, and makes it possible to do rich text copy to clipboard on all platforms. Change-Id: If43c1b2e8ae0496423f830cfe6b86e0fa1b8126e Task-number: QTBUG-44289 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Make QQuick contextmenu actions behave like widget counterpartsAllan Sandfeld Jensen2015-05-271-0/+21
| | | | | | | | | Updates a two of the context menu actions so they behave like the updated actions in qtwebenginewidgets. Also improves the default label of OpenInThisWindow, since by default there are no other windows. Change-Id: Iac0dc23e8f31598296cba87f93503cefd926983f Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devAllan Sandfeld Jensen2015-03-161-0/+33
|\ | | | | | | | | | | | | Conflicts: src/webengine/ui_delegates_manager.h Change-Id: I989280b6008fbc4844ed86d6d16f7e7aa6ba8db9
| * Support HTML5 form validation featurePeter Varga2015-03-131-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | HTML5 provides built-in form validation that is supported by chromium. The form validation messages should be shown by the browser therefore new MessageBubble UI element has been added to Quick and Widget implementations. This patch implements chromium's form validation events and shows the messages in a MessageBubble. Change-Id: I0c8f4f102823117e2bfb16ff8a4c503635491939 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devAllan Sandfeld Jensen2015-03-131-0/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/webengine/api/qquickwebengineview_p_p.h src/webengine/ui_delegates_manager.cpp src/webengine/ui_delegates_manager.h src/webenginewidgets/api/qwebenginepage_p.h Change-Id: I8052de4d3b2e68a950832226f6f99e2aafca5505
| * Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-021-0/+4
| | | | | | | | | | | | | | | | Adds the QtWebEngineCore namespace to all internal core API. This ensures we don't export any internal symbols in the global namespace. Change-Id: I26af888ea7c6c4c4d0f04c24a377c1a9d3c92751 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Refactor FilePickerControllerAdam Kallai2015-03-051-51/+9
|/ | | | | | | | | Move FilePickerController classes to the QtWebEngine core to providing common functionality of files selecetion for WebEngine and WebEngineWidgtes. Change-Id: I6ab407095460ef5b63b454f7d62b98215383fc21 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-131-9/+12
|\ | | | | | | Change-Id: Ic4388b2c28f46ca8047061c049128672041ceb0b
| * Also run the rejected signal handler when closing prompt dialogs.Michael Brüning2015-01-201-9/+12
| | | | | | | | | | | | | | | | | | | | The prompt dialog inherits ApplicationWindow, which emits the signal "closing" when the window gets closed by pressing the X button. Change-Id: I23e5cf6f8e81251869d765d7fd2864257f3c0b89 Task-number: QTBUG-43902 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Revert the QJSValue parameter type in UIDelegateAdam Kallai2015-02-061-8/+5
|/ | | | | | | | | | | | | The mapping of var signal parameters to QJSValue was reverted in qtdeclarative, commit 605777e6cf557dbaf2835c63562bf3fe1620ee45. Change the FilePickerController::accepted() slot parameter type from QJSValue to QVariant in UIDelegate. Task-number: QTBUG-44307 Change-Id: I373b37b6eb4c32e91fd92701ecad685eab9cb804 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>