summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2023-03-20 08:46:13 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-03-22 12:48:47 +0000
commitb71403faeedf2955e3af541f9e140305af9ba0a8 (patch)
tree5c3537c500c5c65dc473c9fd3e2d45b327fdcd95
parent7d9805df3a471e7172bf72ff1bc08c63ccfd67fa (diff)
Move custom dialogs example to manual tests
This example shows how to use dialogs, however documentation already provides snippets for that added in 3cbe59e29a. The only missing one was tooltip, therefore add missing snippet and move example to manual tests. Task-number: QTBUG-108751 Change-Id: I84eda805455fb0276046ed1089389d605a8af672 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 6bf30525ee49d270dae6a6440bc607513f21237c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/webenginequick/CMakeLists.txt1
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-auth1.pngbin18549 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-auth2.pngbin5064 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-color1.pngbin9729 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-color2.pngbin3952 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-file1.pngbin18540 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-file2.pngbin6773 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-menu.pngbin5484 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-prompt1.pngbin14845 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-prompt2.pngbin4764 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs-tooltip.pngbin1617 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/images/customdialogs.pngbin9093 -> 0 bytes
-rw-r--r--examples/webenginequick/customdialogs/doc/src/customdialogs.qdoc309
-rw-r--r--examples/webenginequick/webenginequick.pro1
-rw-r--r--src/core/doc/src/qtwebengine-features.qdoc1
-rw-r--r--src/webenginequick/api/qquickwebenginedialogrequests.cpp29
-rw-r--r--tests/manual/examples/quick/CMakeLists.txt1
-rw-r--r--tests/manual/examples/quick/customdialogs/CMakeLists.txt (renamed from examples/webenginequick/customdialogs/CMakeLists.txt)32
-rw-r--r--tests/manual/examples/quick/customdialogs/MessageRectangle.qml (renamed from examples/webenginequick/customdialogs/MessageRectangle.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/SwitchButton.qml (renamed from examples/webenginequick/customdialogs/SwitchButton.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/WebView.qml (renamed from examples/webenginequick/customdialogs/WebView.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/customdialogs.pro (renamed from examples/webenginequick/customdialogs/customdialogs.pro)0
-rw-r--r--tests/manual/examples/quick/customdialogs/customdialogs.qrc (renamed from examples/webenginequick/customdialogs/customdialogs.qrc)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/Authentication.qml (renamed from examples/webenginequick/customdialogs/forms/Authentication.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/AuthenticationForm.ui.qml (renamed from examples/webenginequick/customdialogs/forms/AuthenticationForm.ui.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/ColorCell.qml (renamed from examples/webenginequick/customdialogs/forms/ColorCell.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/ColorPicker.qml (renamed from examples/webenginequick/customdialogs/forms/ColorPicker.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/ColorPickerForm.ui.qml (renamed from examples/webenginequick/customdialogs/forms/ColorPickerForm.ui.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/CustomButton.qml (renamed from examples/webenginequick/customdialogs/forms/CustomButton.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/FilePicker.qml (renamed from examples/webenginequick/customdialogs/forms/FilePicker.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/FilePickerForm.ui.qml (renamed from examples/webenginequick/customdialogs/forms/FilePickerForm.ui.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/FileRow.qml (renamed from examples/webenginequick/customdialogs/forms/FileRow.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/JavaScript.qml (renamed from examples/webenginequick/customdialogs/forms/JavaScript.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/JavaScriptForm.ui.qml (renamed from examples/webenginequick/customdialogs/forms/JavaScriptForm.ui.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/Menu.qml (renamed from examples/webenginequick/customdialogs/forms/Menu.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/MenuForm.ui.qml (renamed from examples/webenginequick/customdialogs/forms/MenuForm.ui.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/TouchSelectionMenu.qml (renamed from examples/webenginequick/customdialogs/forms/TouchSelectionMenu.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/TouchSelectionMenuForm.ui.qml (renamed from examples/webenginequick/customdialogs/forms/TouchSelectionMenuForm.ui.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/forms/forms.qmlproject (renamed from examples/webenginequick/customdialogs/forms/forms.qmlproject)0
-rw-r--r--tests/manual/examples/quick/customdialogs/icon.svg (renamed from examples/webenginequick/customdialogs/icon.svg)0
-rw-r--r--tests/manual/examples/quick/customdialogs/index.html (renamed from examples/webenginequick/customdialogs/index.html)0
-rw-r--r--tests/manual/examples/quick/customdialogs/main.cpp (renamed from examples/webenginequick/customdialogs/main.cpp)0
-rw-r--r--tests/manual/examples/quick/customdialogs/main.qml (renamed from examples/webenginequick/customdialogs/main.qml)0
-rw-r--r--tests/manual/examples/quick/customdialogs/server.cpp (renamed from examples/webenginequick/customdialogs/server.cpp)0
-rw-r--r--tests/manual/examples/quick/customdialogs/server.h (renamed from examples/webenginequick/customdialogs/server.h)0
-rw-r--r--tests/manual/examples/quick/customdialogs/style.css (renamed from examples/webenginequick/customdialogs/style.css)0
46 files changed, 36 insertions, 338 deletions
diff --git a/examples/webenginequick/CMakeLists.txt b/examples/webenginequick/CMakeLists.txt
index 4b64c2926..30ecb9808 100644
--- a/examples/webenginequick/CMakeLists.txt
+++ b/examples/webenginequick/CMakeLists.txt
@@ -1,7 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-qt_internal_add_example(customdialogs)
qt_internal_add_example(customtouchhandle)
qt_internal_add_example(lifecycle)
qt_internal_add_example(quicknanobrowser)
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-auth1.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-auth1.png
deleted file mode 100644
index 042712f5c..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-auth1.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-auth2.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-auth2.png
deleted file mode 100644
index 41828d36d..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-auth2.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-color1.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-color1.png
deleted file mode 100644
index 7f0492f87..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-color1.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-color2.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-color2.png
deleted file mode 100644
index 9087fdf14..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-color2.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-file1.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-file1.png
deleted file mode 100644
index 5023ced6f..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-file1.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-file2.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-file2.png
deleted file mode 100644
index aa25579d7..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-file2.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-menu.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-menu.png
deleted file mode 100644
index 3409c951c..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-menu.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-prompt1.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-prompt1.png
deleted file mode 100644
index c34080b4d..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-prompt1.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-prompt2.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-prompt2.png
deleted file mode 100644
index 2c8d92649..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-prompt2.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs-tooltip.png b/examples/webenginequick/customdialogs/doc/images/customdialogs-tooltip.png
deleted file mode 100644
index 498de9595..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs-tooltip.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/images/customdialogs.png b/examples/webenginequick/customdialogs/doc/images/customdialogs.png
deleted file mode 100644
index c42114a16..000000000
--- a/examples/webenginequick/customdialogs/doc/images/customdialogs.png
+++ /dev/null
Binary files differ
diff --git a/examples/webenginequick/customdialogs/doc/src/customdialogs.qdoc b/examples/webenginequick/customdialogs/doc/src/customdialogs.qdoc
deleted file mode 100644
index d89d76f71..000000000
--- a/examples/webenginequick/customdialogs/doc/src/customdialogs.qdoc
+++ /dev/null
@@ -1,309 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
-
-/*!
- \example webenginequick/customdialogs
- \title WebEngine Qt Quick Custom Dialogs Example
- \ingroup webengine-examples
- \brief Customizes UI elements of \QWE's dialogs.
-
- \image customdialogs.png
-
- A web page might request dialogs for various purposes, such as
- authentication, picking colors, choosing files, and responding to JavaScript
- alerts, confirmation requests, and prompts.
-
- \e {Custom Dialogs} demonstrates how to use WebEngine dialog request objects
- to implement custom dialogs for use instead of the default dialogs.
-
- \include examples-run.qdocinc
-
- \section1 UI Elements of WebEngineView
-
- In this example, we create a simple \c index.html page that contains buttons
- and text fields for triggering a context menu and the following dialogs:
-
- \list
- \li HTTP Authentication Dialog
- \li Proxy Authentication Dialog
- \li JavaScript Alert, Confirm, and Prompt Dialogs
- \li Color Picker Dialog
- \li File Picker Dialog
- \endlist
-
- \section1 Triggering Dialogs
-
- As mentioned, the \c index.html file is responsible for triggering the
- dialogs from the side of HTML and JavaScript. Additionally, the example
- program starts a localhost TCP server returning the mocked HTTP responses
- needed to trigger proxy and HTTP authentication dialogs.
-
- \section1 Custom Dialogs
-
- The custom dialogs are just \e {Qt Quick Designer UI Forms} without any
- business logic. The point here is to present the glue code that is required
- to display the custom dialog for a particular web engine dialog or a menu
- request.
-
- \section1 Creating the Main Window
-
- In \c main.cpp, we initialize the WebEngine the same way as in the
- \l {WebEngine Qt Quick Minimal Example}:
-
- \quotefromfile webenginequick/customdialogs/main.cpp
- \skipto main
- \printuntil }
-
- In addition, we set up a proxy and a TCP server to be able to simulate proxy
- and HTTP authetication requests.
-
- In \c main.qml, we create a top level window, which contains a StackView
- with a SwitchButton and a WebView:
-
- \quotefromfile webenginequick/customdialogs/main.qml
- \skipto Window
- \printuntil Component
- \printuntil }
- \printline }
-
- \section1 Handling Web Engine Requests
-
- In this example, we implement the handling of the following web engine
- requests:
-
- \list
- \li ContextMenuRequest
- \li AuthenticationDialogRequest
- \li JavaScriptDialogRequest
- \li ColorDialogRequest
- \li FileDialogRequest
- \endlist
-
- \section2 Context Menu Requests
-
- \l [QML]{ContextMenuRequest} is a request object that is passed as a
- parameter of the WebEngineView::contextMenuRequested signal. We use the
- \c onContextMenuRequested signal handler to handle requests for
- \c #openMenu URL links:
-
- \quotefromfile webenginequick/customdialogs/WebView.qml
- \skipto WebEngineView
- \printuntil {
- \dots 4
- \skipto onContextMenuRequested
- \printuntil }
- \printuntil }
- \printuntil }
- \dots 4
- \skipuntil onFileDialogRequested
- \skipuntil }});
- \skipuntil }
- \skipto }
- \printline }
-
- The first text field from the top on our page triggers the request. Next,
- we check whether we should use the default menu. If not, we accept the
- request and switch the view to show the \c MenuForm:
-
- \image customdialogs-menu.png
-
- \quotefromfile webenginequick/customdialogs/forms/Menu.qml
- \skipto MenuForm
- \printuntil }
- \printuntil }
-
- To keep things simple, we do not provide any logic on component completion,
- and we simply close the form on any action.
-
- \section2 Tooltip Requests
-
- \l [QML]{TooltipRequest} is a request object that is passed as a
- parameter of the WebEngineView::tooltipRequested signal. We use the
- \c onTooltipRequested signal handler to handle requests for
- custom tooltip menus at specific positions:
-
- \quotefromfile webenginequick/customdialogs/WebView.qml
- \skipto WebEngineView
- \printuntil {
- \dots 4
- \skipto onTooltipRequested
- \printuntil }
- \printuntil }
- \printuntil }
- \dots 4
- \skipuntil onFileDialogRequested
- \skipuntil }});
- \skipuntil }
- \skipto }
- \printline }
-
- The second text field from the top on our page triggers the request. Next,
- we check whether we should use the default menu. If not, we accept the
- request and show a custom QML element as tooltip:
-
- \image customdialogs-tooltip.png
-
- \quotefromfile webenginequick/customdialogs/WebView.qml
- \skipto Rectangle
- \printuntil }
-
- \section2 Authentication Dialog Requests
-
- \image customdialogs-auth1.png
-
- \l [QML]{AuthenticationDialogRequest} is a request object that is passed
- as a parameter of the WebEngineView::authenticationDialogRequested signal:
-
- \quotefromfile webenginequick/customdialogs/WebView.qml
- \skipto WebEngineView
- \printuntil {
- \dots 4
- \skipto onAuthenticationDialogRequested
- \printuntil }
- \printuntil }
- \dots 4
- \skipuntil onFileDialogRequested
- \skipuntil }});
- \skipuntil }
- \skipto }
- \printline }
-
- We use the \c onAuthenticationDialogRequested signal handler to check
- whether we should use the default authentication dialog. If not, we accept
- the request and switch the view to show the \c AuthenticationForm:
-
- \image customdialogs-auth2.png
-
- \quotefromfile webenginequick/customdialogs/forms/Authentication.qml
- \skipto AuthenticationForm
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
-
- On component completion, we log the request type. The user can fill in the
- credentials and click \uicontrol Login. We provide \c onClicked handlers to
- accept or reject the authentication dialog. The TCP server on localhost does
- not handle real authentication, and therefore we call \c rejectDialog()
- instead of \c acceptDialog() also for the login button \c clicked signal.
-
- \section2 JavaScript Dialog Requests
-
- \image customdialogs-prompt1.png
-
- \l [QML]{JavaScriptDialogRequest} is a request object that is passed as a
- parameter of the WebEngineView::javaScriptDialogRequested signal:
-
- \quotefromfile webenginequick/customdialogs/WebView.qml
- \skipto WebEngineView
- \printuntil {
- \dots 4
- \skipto onJavaScriptDialogRequested
- \printuntil }
- \printuntil }
- \dots 4
- \skipuntil onFileDialogRequested
- \skipuntil }});
- \skipuntil }
- \skipto }
- \printline }
-
- We use the \c onJavaScriptDialogRequested signal handler to check
- whether we should use the default JavaScript dialog. If not, we accept the
- request and switch the view to show the \c JavaScriptForm:
-
- \image customdialogs-prompt2.png
-
- \quotefromfile webenginequick/customdialogs/forms/JavaScript.qml
- \skipto JavaScriptForm
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
-
- On component completion, we customize the form based on the request type.
- For a JavaScript prompt dialog we use \c dialogAccept() with the
- \c prompt.text argument.
-
- \section2 Color Dialog Requests
-
- \image customdialogs-color1.png
-
- \l [QML]{ColorDialogRequest} is a request object that is passed as a
- parameter of the WebEngineView::colorDialogRequested signal:
-
- \quotefromfile webenginequick/customdialogs/WebView.qml
- \skipto WebEngineView
- \printuntil {
- \dots 4
- \skipto onColorDialogRequested
- \printuntil }
- \printuntil }
- \dots 4
- \skipuntil onFileDialogRequested
- \skipuntil }});
- \skipuntil }
- \skipto }
- \printline }
-
- We use the \c onColorDialogRequested signal handler to check whether
- we should use the default color picker dialog. If not, we accept the request
- and switch the view to show the \c ColorPickerForm:
-
- \image customdialogs-color2.png
-
- \quotefromfile webenginequick/customdialogs/forms/ColorPicker.qml
- \skipto ColorPickerForm
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
-
- On component completion, we create callbacks for all the color cells. When
- the user selects the color and clicks \c OK, we pass the selected color to
- the \c dialogAccept() method.
-
- \section2 File Dialog Requests
-
- \image customdialogs-file1.png
-
- \l [QML]{FileDialogRequest} is a request object that is passed as a
- parameter of the WebEngineView::fileDialogRequested signal:
-
- \quotefromfile webenginequick/customdialogs/WebView.qml
- \skipto WebEngineView
- \printuntil {
- \dots 4
- \skipto onFileDialogRequested
- \printuntil }
- \printuntil }
- \printuntil }
-
- We use the \c onFileDialogRequested signal handler to check whether
- we should use the default file picker dialog. If not, we accept the request
- and switch the view to show the \c FilePickerForm:
-
- \image customdialogs-file2.png
-
- \quotefromfile webenginequick/customdialogs/forms/FilePicker.qml
- \skipto FilePickerForm
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
- \printuntil }
-
- On component completion, we create callbacks for selecting files. When the user selects a
- file and clicks \c OK, we pass the selected file to the \c dialogAccept
- method.
-
-*/
diff --git a/examples/webenginequick/webenginequick.pro b/examples/webenginequick/webenginequick.pro
index 6a0a858d6..8c7343017 100644
--- a/examples/webenginequick/webenginequick.pro
+++ b/examples/webenginequick/webenginequick.pro
@@ -1,7 +1,6 @@
TEMPLATE=subdirs
SUBDIRS += \
- customdialogs \
customtouchhandle \
quicknanobrowser \
webengineaction
diff --git a/src/core/doc/src/qtwebengine-features.qdoc b/src/core/doc/src/qtwebengine-features.qdoc
index a564641a5..9242c257f 100644
--- a/src/core/doc/src/qtwebengine-features.qdoc
+++ b/src/core/doc/src/qtwebengine-features.qdoc
@@ -383,7 +383,6 @@
WebEngineView::colorDialogRequested(),
WebEngineView::fileDialogRequested(), and
WebEngineView::formValidationMessageRequested() signals. For an example,
- see \l{WebEngine Qt Quick Custom Dialogs Example}.
\section1 Pepper Plugin API
diff --git a/src/webenginequick/api/qquickwebenginedialogrequests.cpp b/src/webenginequick/api/qquickwebenginedialogrequests.cpp
index 3c9f8a9a7..d49f17397 100644
--- a/src/webenginequick/api/qquickwebenginedialogrequests.cpp
+++ b/src/webenginequick/api/qquickwebenginedialogrequests.cpp
@@ -685,6 +685,35 @@ void QQuickWebEngineFileDialogRequest::dialogReject()
\since QtWebEngine 1.10
\brief A request for showing a tooltip to the user.
+
+ A TooltipRequest is a request object that is passed as a
+ parameter of the WebEngineView::tooltipRequested signal. Use the
+ \c onTooltipRequested signal handler to handle requests for
+ custom tooltip menus at specific positions.
+
+ The \l accepted property of the request indicates whether the request
+ is handled by the user code or the default tooltip should
+ be displayed.
+
+ The following code uses a custom tooltip to handle the request:
+
+ \code
+ WebEngineView {
+ // ...
+ onTooltipRequested: function(request) {
+ if (request.type == TooltipRequest.Show) {
+ tooltip.visible = true;
+ tooltip.x = request.x;
+ tooltip.y = request.y;
+ tooltip.text = request.text;
+ } else {
+ tooltip.visible = false;
+ }
+ request.accepted = true;
+ }
+ // ...
+ }
+ \endcode
*/
QQuickWebEngineTooltipRequest::QQuickWebEngineTooltipRequest(
diff --git a/tests/manual/examples/quick/CMakeLists.txt b/tests/manual/examples/quick/CMakeLists.txt
index d853ba634..72b86d185 100644
--- a/tests/manual/examples/quick/CMakeLists.txt
+++ b/tests/manual/examples/quick/CMakeLists.txt
@@ -1 +1,2 @@
add_subdirectory(minimal)
+add_subdirectory(customdialogs)
diff --git a/examples/webenginequick/customdialogs/CMakeLists.txt b/tests/manual/examples/quick/customdialogs/CMakeLists.txt
index 7908bec62..f0cdd54fa 100644
--- a/examples/webenginequick/customdialogs/CMakeLists.txt
+++ b/tests/manual/examples/quick/customdialogs/CMakeLists.txt
@@ -1,23 +1,14 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-cmake_minimum_required(VERSION 3.16)
-project(customdialogs LANGUAGES CXX)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+if (NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(customdialogs LANGUAGES CXX)
+ find_package(Qt6 REQUIRED COMPONENTS Core Gui WebEngineQuick)
endif()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webenginequick/customdialogs")
-
-find_package(Qt6 REQUIRED COMPONENTS Core Gui WebEngineQuick)
-
-qt_add_executable(customdialogs
- main.cpp
- server.cpp server.h
+qt_internal_add_manual_test(customdialogs
+ SOURCES main.cpp server.cpp server.h
)
set_target_properties(customdialogs PROPERTIES
@@ -63,14 +54,3 @@ qt_add_resources(customdialogs "customdialogs"
${customdialogs_resource_files}
)
-if(TARGET Qt::Widgets)
- target_link_libraries(customdialogs PUBLIC
- Qt::Widgets
- )
-endif()
-
-install(TARGETS customdialogs
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/webenginequick/customdialogs/MessageRectangle.qml b/tests/manual/examples/quick/customdialogs/MessageRectangle.qml
index 09a202cf3..09a202cf3 100644
--- a/examples/webenginequick/customdialogs/MessageRectangle.qml
+++ b/tests/manual/examples/quick/customdialogs/MessageRectangle.qml
diff --git a/examples/webenginequick/customdialogs/SwitchButton.qml b/tests/manual/examples/quick/customdialogs/SwitchButton.qml
index 69fc1427e..69fc1427e 100644
--- a/examples/webenginequick/customdialogs/SwitchButton.qml
+++ b/tests/manual/examples/quick/customdialogs/SwitchButton.qml
diff --git a/examples/webenginequick/customdialogs/WebView.qml b/tests/manual/examples/quick/customdialogs/WebView.qml
index 5c99ee7e7..5c99ee7e7 100644
--- a/examples/webenginequick/customdialogs/WebView.qml
+++ b/tests/manual/examples/quick/customdialogs/WebView.qml
diff --git a/examples/webenginequick/customdialogs/customdialogs.pro b/tests/manual/examples/quick/customdialogs/customdialogs.pro
index 1b9a6778e..1b9a6778e 100644
--- a/examples/webenginequick/customdialogs/customdialogs.pro
+++ b/tests/manual/examples/quick/customdialogs/customdialogs.pro
diff --git a/examples/webenginequick/customdialogs/customdialogs.qrc b/tests/manual/examples/quick/customdialogs/customdialogs.qrc
index bb2677198..bb2677198 100644
--- a/examples/webenginequick/customdialogs/customdialogs.qrc
+++ b/tests/manual/examples/quick/customdialogs/customdialogs.qrc
diff --git a/examples/webenginequick/customdialogs/forms/Authentication.qml b/tests/manual/examples/quick/customdialogs/forms/Authentication.qml
index 151a7c4aa..151a7c4aa 100644
--- a/examples/webenginequick/customdialogs/forms/Authentication.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/Authentication.qml
diff --git a/examples/webenginequick/customdialogs/forms/AuthenticationForm.ui.qml b/tests/manual/examples/quick/customdialogs/forms/AuthenticationForm.ui.qml
index f14986b20..f14986b20 100644
--- a/examples/webenginequick/customdialogs/forms/AuthenticationForm.ui.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/AuthenticationForm.ui.qml
diff --git a/examples/webenginequick/customdialogs/forms/ColorCell.qml b/tests/manual/examples/quick/customdialogs/forms/ColorCell.qml
index 57151780c..57151780c 100644
--- a/examples/webenginequick/customdialogs/forms/ColorCell.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/ColorCell.qml
diff --git a/examples/webenginequick/customdialogs/forms/ColorPicker.qml b/tests/manual/examples/quick/customdialogs/forms/ColorPicker.qml
index 63269ddff..63269ddff 100644
--- a/examples/webenginequick/customdialogs/forms/ColorPicker.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/ColorPicker.qml
diff --git a/examples/webenginequick/customdialogs/forms/ColorPickerForm.ui.qml b/tests/manual/examples/quick/customdialogs/forms/ColorPickerForm.ui.qml
index 060aeef7d..060aeef7d 100644
--- a/examples/webenginequick/customdialogs/forms/ColorPickerForm.ui.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/ColorPickerForm.ui.qml
diff --git a/examples/webenginequick/customdialogs/forms/CustomButton.qml b/tests/manual/examples/quick/customdialogs/forms/CustomButton.qml
index 00a06d558..00a06d558 100644
--- a/examples/webenginequick/customdialogs/forms/CustomButton.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/CustomButton.qml
diff --git a/examples/webenginequick/customdialogs/forms/FilePicker.qml b/tests/manual/examples/quick/customdialogs/forms/FilePicker.qml
index 45ffefb3a..45ffefb3a 100644
--- a/examples/webenginequick/customdialogs/forms/FilePicker.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/FilePicker.qml
diff --git a/examples/webenginequick/customdialogs/forms/FilePickerForm.ui.qml b/tests/manual/examples/quick/customdialogs/forms/FilePickerForm.ui.qml
index 1e99b1a91..1e99b1a91 100644
--- a/examples/webenginequick/customdialogs/forms/FilePickerForm.ui.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/FilePickerForm.ui.qml
diff --git a/examples/webenginequick/customdialogs/forms/FileRow.qml b/tests/manual/examples/quick/customdialogs/forms/FileRow.qml
index 1a0cfc0a0..1a0cfc0a0 100644
--- a/examples/webenginequick/customdialogs/forms/FileRow.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/FileRow.qml
diff --git a/examples/webenginequick/customdialogs/forms/JavaScript.qml b/tests/manual/examples/quick/customdialogs/forms/JavaScript.qml
index 132c95697..132c95697 100644
--- a/examples/webenginequick/customdialogs/forms/JavaScript.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/JavaScript.qml
diff --git a/examples/webenginequick/customdialogs/forms/JavaScriptForm.ui.qml b/tests/manual/examples/quick/customdialogs/forms/JavaScriptForm.ui.qml
index b535e7ef9..b535e7ef9 100644
--- a/examples/webenginequick/customdialogs/forms/JavaScriptForm.ui.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/JavaScriptForm.ui.qml
diff --git a/examples/webenginequick/customdialogs/forms/Menu.qml b/tests/manual/examples/quick/customdialogs/forms/Menu.qml
index b90802a0c..b90802a0c 100644
--- a/examples/webenginequick/customdialogs/forms/Menu.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/Menu.qml
diff --git a/examples/webenginequick/customdialogs/forms/MenuForm.ui.qml b/tests/manual/examples/quick/customdialogs/forms/MenuForm.ui.qml
index b4c06bb7d..b4c06bb7d 100644
--- a/examples/webenginequick/customdialogs/forms/MenuForm.ui.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/MenuForm.ui.qml
diff --git a/examples/webenginequick/customdialogs/forms/TouchSelectionMenu.qml b/tests/manual/examples/quick/customdialogs/forms/TouchSelectionMenu.qml
index 1b0c19789..1b0c19789 100644
--- a/examples/webenginequick/customdialogs/forms/TouchSelectionMenu.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/TouchSelectionMenu.qml
diff --git a/examples/webenginequick/customdialogs/forms/TouchSelectionMenuForm.ui.qml b/tests/manual/examples/quick/customdialogs/forms/TouchSelectionMenuForm.ui.qml
index bed39566f..bed39566f 100644
--- a/examples/webenginequick/customdialogs/forms/TouchSelectionMenuForm.ui.qml
+++ b/tests/manual/examples/quick/customdialogs/forms/TouchSelectionMenuForm.ui.qml
diff --git a/examples/webenginequick/customdialogs/forms/forms.qmlproject b/tests/manual/examples/quick/customdialogs/forms/forms.qmlproject
index b06afaaf1..b06afaaf1 100644
--- a/examples/webenginequick/customdialogs/forms/forms.qmlproject
+++ b/tests/manual/examples/quick/customdialogs/forms/forms.qmlproject
diff --git a/examples/webenginequick/customdialogs/icon.svg b/tests/manual/examples/quick/customdialogs/icon.svg
index 48271180b..48271180b 100644
--- a/examples/webenginequick/customdialogs/icon.svg
+++ b/tests/manual/examples/quick/customdialogs/icon.svg
diff --git a/examples/webenginequick/customdialogs/index.html b/tests/manual/examples/quick/customdialogs/index.html
index d5de2827c..d5de2827c 100644
--- a/examples/webenginequick/customdialogs/index.html
+++ b/tests/manual/examples/quick/customdialogs/index.html
diff --git a/examples/webenginequick/customdialogs/main.cpp b/tests/manual/examples/quick/customdialogs/main.cpp
index c114ea935..c114ea935 100644
--- a/examples/webenginequick/customdialogs/main.cpp
+++ b/tests/manual/examples/quick/customdialogs/main.cpp
diff --git a/examples/webenginequick/customdialogs/main.qml b/tests/manual/examples/quick/customdialogs/main.qml
index d0cb6f324..d0cb6f324 100644
--- a/examples/webenginequick/customdialogs/main.qml
+++ b/tests/manual/examples/quick/customdialogs/main.qml
diff --git a/examples/webenginequick/customdialogs/server.cpp b/tests/manual/examples/quick/customdialogs/server.cpp
index efb870618..efb870618 100644
--- a/examples/webenginequick/customdialogs/server.cpp
+++ b/tests/manual/examples/quick/customdialogs/server.cpp
diff --git a/examples/webenginequick/customdialogs/server.h b/tests/manual/examples/quick/customdialogs/server.h
index 563465013..563465013 100644
--- a/examples/webenginequick/customdialogs/server.h
+++ b/tests/manual/examples/quick/customdialogs/server.h
diff --git a/examples/webenginequick/customdialogs/style.css b/tests/manual/examples/quick/customdialogs/style.css
index e4c25e7eb..e4c25e7eb 100644
--- a/examples/webenginequick/customdialogs/style.css
+++ b/tests/manual/examples/quick/customdialogs/style.css