From 0b611c393e8208af717bd1c5e6c1aed1379d03ca Mon Sep 17 00:00:00 2001
From: Simon Hausmann <simon.hausmann@digia.com>
Date: Wed, 15 Jan 2014 11:41:51 +0100
Subject: [PATCH] Fix installation of most examples

* Make sure the example source code is installed
* Make sure the installation path is consistent with the path within the module, to ensure
  that the sources end up next to the compiled binary.
* Skip the widgets nano browser from the installation, as it's a developer tool.

Change-Id: I35b421e12f8e6ddd3f2045e318b21543ff929cd8
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
---
 .qmake.conf                                                | 1 +
 examples/quick/quicknanobrowser/quicknanobrowser.pro       | 3 +++
 examples/widgets/browser/browser.pro                       | 2 +-
 examples/widgets/widgetsnanobrowser/widgetsnanobrowser.pro | 2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.qmake.conf b/.qmake.conf
index 66245228b..9f986403f 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,5 +1,6 @@
 QMAKEPATH += $$PWD/tools/qmake
 load(qt_build_config)
+CONFIG += qt_example_installs
 
 # All modules share the same version number. We plan on following Qt's releases for now.
 MODULE_VERSION = 5.2.0
diff --git a/examples/quick/quicknanobrowser/quicknanobrowser.pro b/examples/quick/quicknanobrowser/quicknanobrowser.pro
index aae724c55..2c4ae9080 100644
--- a/examples/quick/quicknanobrowser/quicknanobrowser.pro
+++ b/examples/quick/quicknanobrowser/quicknanobrowser.pro
@@ -17,3 +17,6 @@ QT_PRIVATE += quick-private gui-private core-private
 qtHaveModule(widgets) {
     QT += widgets # QApplication is required to get native styling with QtQuickControls
 }
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/quicknanobrowser
+INSTALLS += target
diff --git a/examples/widgets/browser/browser.pro b/examples/widgets/browser/browser.pro
index c63602412..050e9fa83 100644
--- a/examples/widgets/browser/browser.pro
+++ b/examples/widgets/browser/browser.pro
@@ -99,5 +99,5 @@ wince*: {
 EXAMPLE_FILES = Info_mac.plist browser.icns browser.ico browser.rc
 
 # install
-target.path = $$[QT_INSTALL_EXAMPLES]/webkitwidgets/browser
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/browser
 INSTALLS += target
diff --git a/examples/widgets/widgetsnanobrowser/widgetsnanobrowser.pro b/examples/widgets/widgetsnanobrowser/widgetsnanobrowser.pro
index c79d314c2..39963222d 100644
--- a/examples/widgets/widgetsnanobrowser/widgetsnanobrowser.pro
+++ b/examples/widgets/widgetsnanobrowser/widgetsnanobrowser.pro
@@ -9,3 +9,5 @@ SOURCES = widgetwindow.cpp main.cpp
 RESOURCES += ../../common/common_resources.qrc
 
 QT += webenginewidgets
+
+CONFIG -= qt_example_installs
-- 
GitLab