summaryrefslogtreecommitdiffstats
path: root/src/webengine/ui_delegates_manager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* JS dialogs in QtQuickPierre Rossi2014-01-151-2/+75
| | | | | | | | | | Refactor JavaScriptDialogManagerQt to support a Qt Quick dialogs friendly approach. Qt Quick dialogs are still missing a prompt, so we use a "handmade" one. This should be solved before 5.3 though. Change-Id: I965df66837b2e81d6e4618a8da1167a37661c26e Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Pave the way for our UI delegation strategy.Pierre Rossi2014-01-151-0/+233
Starting with the context Menus for QtQuick. Add default UI delegates as a subproject. We allow ourselves to use Qt Quick Controls there for in order to get a nice "out of the box" experience for things like context menus, dialogs, etc while leaving the door open for system embedders to override this. Opting out of the deployment of these QML files is still very primitive but can be done by passing WEBENGINE_CONFIG+=no_ui_delegates at qmake time. Customization of context menus could be done via a qml component, which is probably best kept in experimental for now while we address its shortcomings. Change-Id: I0705b20d5ddd3bb010f9371b65a181c6b02a03e1 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>