diff options
author | Kai Koehne <kai.koehne@qt.io> | 2018-04-17 17:02:30 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2018-04-19 06:41:07 +0000 |
commit | f55df96ab51e590f73a7878742662758c1c4369b (patch) | |
tree | c287eb8656bf5272dad232db0d578d00e1ff1bd2 /examples/webengine/recipebrowser | |
parent | c1a01e2a07934f1c051780a02324cb84c0f1d168 (diff) |
Examples: Name signal arguments
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>
Diffstat (limited to 'examples/webengine/recipebrowser')
-rw-r--r-- | examples/webengine/recipebrowser/resources/qml/main.qml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/webengine/recipebrowser/resources/qml/main.qml b/examples/webengine/recipebrowser/resources/qml/main.qml index 899d307cf..2639b6b5d 100644 --- a/examples/webengine/recipebrowser/resources/qml/main.qml +++ b/examples/webengine/recipebrowser/resources/qml/main.qml @@ -99,7 +99,9 @@ ApplicationWindow { Layout.fillHeight: true focus: true KeyNavigation.tab: webView - onRecipeSelected: webView.showRecipe(url) + onRecipeSelected: function(url) { + webView.showRecipe(url) + } } WebEngineView { @@ -118,7 +120,7 @@ ApplicationWindow { } property bool firstLoadComplete: false - onLoadingChanged: { + onLoadingChanged: function(loadRequest) { if (loadRequest.status === WebEngineView.LoadSucceededStatus && !firstLoadComplete) { // Debounce the showing of the web content, so images are more likely |