summaryrefslogtreecommitdiffstats
path: root/src/webengine/ui_delegates_manager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* UIDelegatesManager: Remove creationContextForComponent.Robin Burchell2015-01-061-14/+5
| | | | | | | | | This doesn't seem to be too much sense, and according to the QQmlContext documentation, may not work as expected: "This is only valid for components created directly from QML." Change-Id: I49db5dad49288d196e8519b1a60dcf2192147672 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* UIDelegatesManager: Communicate load failure back to the dialog controller.Robin Burchell2015-01-061-1/+5
| | | | | | | | | | | If the dialog controller has asked to show a dialog, then if we cannot show a dialog, we should reject its request. Not doing this results in the WebView becoming frozen for input if the load fails, seemingly. Change-Id: I7dddd5357c712f896499cdebb142e60b5e80b4f2 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* UIDelegatesManager: Always print errors if component loading fails.Robin Burchell2015-01-061-3/+3
| | | | | | | | | | | This setting is useful when developing a new UI set, and one may not initially know about the suppression of errors, which is a painful problem to run into. Furthermore, make sure to delete the failed component so that subsequent attempted use of it doesn't succeed if UI_DELEGATES_DEBUG isn't enabled. Change-Id: I3d2abc19fb4a007d06795d2e8149ae78d7c9c020 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Replace QStringLiteral with QLatin1String where appropriateKai Koehne2014-10-071-1/+1
| | | | | | | | | It's faster to use QLatin1String in places where we don't actually need a QString object (like for comparison, or when creating a string with QStringBuilder). Change-Id: I9b8e28040dc2b79a767e15015b85822d06141bbe Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix the type of argument in FilePickerController::accepted() slot.Adam Kallai2014-09-101-6/+8
| | | | | | | | | The filesSelected QML signal is connected to FilePickerController::accepted slot but the type of the parameters were different. Change-Id: I36a33857b557797fc18699144c4d558d0e454cf8 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Update License Headers for Qt WebEngine to LGPLv3.Zeno Albisser2014-08-211-15/+10
| | | | | | | Change-Id: Idbe0eafb51d77cc00e3a93179b81770724d5bfaa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Don't use the private QQmlMetaType::defaultPropertyJocelyn Turcotte2014-08-011-4/+15
| | | | | | | | | Duplicate the small implementation of that function, which uses QMetaObject public API together with the semi-public fact that the meta class info named DefaultProperty needs to be fetched. Change-Id: I37413bd28a0b0ead55853e4e3db5864dfc39966b Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Fix warnings produced by QT_ASCII_CAST_WARNINGS in ui delegatesAdam Kallai2014-07-241-1/+1
| | | | | Change-Id: Iffb04ff0c61e7a5e0c42ca224b1b04d0a62c66f8 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix crash when loading context menu on Windows.Michael Brüning2014-06-261-1/+1
| | | | | | | | | | | Use QUrl::fromLocalFile to load components from the installation Qml directory. Using just the absolute file path wasn't a problem on Linux, but did not work on Windows. Other Qt modules are also using QUrl::fromLocalFile to do this. Change-Id: I689c516dc63a6c966435eedb94441d7c9246dd25 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix a crash when running witout UI delegates.Pierre Rossi2014-05-201-8/+23
| | | | | | | | | Lookup the correct UIDelegates import path once lazily, and reuse this information. If there is none, then we don't expect any UI delegation to work, but it should not crash. Change-Id: I73be7273d83b8d89b74641dc550341cf2b7eb602 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add a way of using UI dialogs for authorizationPierre Rossi2014-04-291-4/+8
| | | | | | | | We could use this to prompt the user for various feature permissions that we are not ready to expose in our API. Change-Id: If6e6a16aca4142b0564121dfc7677b7c4996f742 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* UI: fix a crash on shutdownPierre Rossi2014-03-141-8/+12
| | | | | | | | | | Use a raw pointer instead of QScopedPointer for the UI components. Since the components are always parented to the view and deleted through the QObject cleanup mechanism, it was not correct to use QScopedPointer in the first place. Change-Id: I0c8fd9526e898439c52c6a6f538a66f8a1185ef9 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Fix string concatenation in WebEngine on WindowsZoltan Arvai2014-02-111-0/+6
| | | | | | | | | | MSVC thinks the firs part of that string is wide while the second part is narrow and it won't allow to concetanete them directly. Adding literal for wide string before ".qml" on Windows will resolve it. Change-Id: I934fed6fe9e9401461a8165a524e8110cec3c3fa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Qt Quick File PickerPierre Rossi2014-01-151-0/+93
| | | | | Change-Id: I6195c49f1647c78b16d9d47770ab37ba998a61a5 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>