From 780d21e1290cb289ae330c46597a381c61b2d86c Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Date: Wed, 20 Apr 2016 18:50:12 +0200
Subject: [PATCH] fix example installs

Change-Id: Ib34795f10b1d7120b28958127ced049af3b4f72b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
---
 examples/corelib/tools/customtype/customtype.pro              | 2 +-
 .../corelib/tools/customtypesending/customtypesending.pro     | 2 +-
 examples/opengl/contextinfo/contextinfo.pro                   | 4 ++++
 examples/widgets/itemviews/storageview/storageview.pro        | 4 ++++
 examples/widgets/tools/echoplugin/echoplugin.pro              | 4 ----
 examples/widgets/tools/echoplugin/echowindow/echowindow.pro   | 2 ++
 examples/widgets/tools/echoplugin/plugin/plugin.pro           | 4 +++-
 examples/widgets/tools/plugandpaint/app/app.pro               | 2 ++
 .../tools/plugandpaint/plugins/basictools/basictools.pro      | 2 ++
 .../tools/plugandpaint/plugins/extrafilters/extrafilters.pro  | 2 ++
 examples/widgets/tools/styleplugin/plugin/plugin.pro          | 2 ++
 examples/widgets/tools/styleplugin/styleplugin.pro            | 4 ----
 .../widgets/tools/styleplugin/stylewindow/stylewindow.pro     | 2 ++
 13 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/examples/corelib/tools/customtype/customtype.pro b/examples/corelib/tools/customtype/customtype.pro
index 1bd792db85a..0e0fe9b1a5a 100644
--- a/examples/corelib/tools/customtype/customtype.pro
+++ b/examples/corelib/tools/customtype/customtype.pro
@@ -4,5 +4,5 @@ SOURCES   = main.cpp \
 QT += widgets
 
 # install
-target.path = $$[QT_INSTALL_EXAMPLES]/corelib/tools/customcompleter
+target.path = $$[QT_INSTALL_EXAMPLES]/corelib/tools/customtype
 INSTALLS += target
diff --git a/examples/corelib/tools/customtypesending/customtypesending.pro b/examples/corelib/tools/customtypesending/customtypesending.pro
index 672f6569c28..da351ce828f 100644
--- a/examples/corelib/tools/customtypesending/customtypesending.pro
+++ b/examples/corelib/tools/customtypesending/customtypesending.pro
@@ -6,5 +6,5 @@ SOURCES   = main.cpp \
 QT += widgets
 
 # install
-target.path = $$[QT_INSTALL_EXAMPLES]/corelib/tools/customcompleter
+target.path = $$[QT_INSTALL_EXAMPLES]/corelib/tools/customtypesending
 INSTALLS += target
diff --git a/examples/opengl/contextinfo/contextinfo.pro b/examples/opengl/contextinfo/contextinfo.pro
index ddaa084f384..2836e5ea5a3 100644
--- a/examples/opengl/contextinfo/contextinfo.pro
+++ b/examples/opengl/contextinfo/contextinfo.pro
@@ -7,3 +7,7 @@ SOURCES += main.cpp \
 
 HEADERS += widget.h \
            renderwindow.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/opengl/contextinfo
+INSTALLS += target
diff --git a/examples/widgets/itemviews/storageview/storageview.pro b/examples/widgets/itemviews/storageview/storageview.pro
index c5c01dc4f1a..07e7fb51456 100644
--- a/examples/widgets/itemviews/storageview/storageview.pro
+++ b/examples/widgets/itemviews/storageview/storageview.pro
@@ -5,3 +5,7 @@ SOURCES += storagemodel.cpp \
     main.cpp
 HEADERS += \
     storagemodel.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/itemviews/storageview
+INSTALLS += target
diff --git a/examples/widgets/tools/echoplugin/echoplugin.pro b/examples/widgets/tools/echoplugin/echoplugin.pro
index d95eb6b64aa..1e3d625b2f3 100644
--- a/examples/widgets/tools/echoplugin/echoplugin.pro
+++ b/examples/widgets/tools/echoplugin/echoplugin.pro
@@ -3,7 +3,3 @@ TEMPLATE    = subdirs
 SUBDIRS	    = echowindow \
 	      plugin
 #! [0]
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin
-INSTALLS += target
diff --git a/examples/widgets/tools/echoplugin/echowindow/echowindow.pro b/examples/widgets/tools/echoplugin/echowindow/echowindow.pro
index fca0252a826..092258dd307 100644
--- a/examples/widgets/tools/echoplugin/echowindow/echowindow.pro
+++ b/examples/widgets/tools/echoplugin/echowindow/echowindow.pro
@@ -17,3 +17,5 @@ win32 {
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin
 INSTALLS += target
+
+CONFIG += install_ok  # Do not cargo-cult this!
diff --git a/examples/widgets/tools/echoplugin/plugin/plugin.pro b/examples/widgets/tools/echoplugin/plugin/plugin.pro
index 4afe56c024c..a4b54b18f6c 100644
--- a/examples/widgets/tools/echoplugin/plugin/plugin.pro
+++ b/examples/widgets/tools/echoplugin/plugin/plugin.pro
@@ -12,5 +12,7 @@ DESTDIR         = ../plugins
 EXAMPLE_FILES = echoplugin.json
 
 # install
-target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin/plugin
+target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin/plugins
 INSTALLS += target
+
+CONFIG += install_ok  # Do not cargo-cult this!
diff --git a/examples/widgets/tools/plugandpaint/app/app.pro b/examples/widgets/tools/plugandpaint/app/app.pro
index 45fb7224e0d..8139cd53ad2 100644
--- a/examples/widgets/tools/plugandpaint/app/app.pro
+++ b/examples/widgets/tools/plugandpaint/app/app.pro
@@ -24,3 +24,5 @@ if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint
 INSTALLS += target
+
+CONFIG += install_ok  # Do not cargo-cult this!
diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro b/examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro
index 0c0a262339b..f28be96b036 100644
--- a/examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro
+++ b/examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro
@@ -12,3 +12,5 @@ DESTDIR       = ../../plugins
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins
 INSTALLS += target
+
+CONFIG += install_ok  # Do not cargo-cult this!
diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro b/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro
index 0c86a575f38..deb3c5e70e5 100644
--- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro
+++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro
@@ -12,3 +12,5 @@ DESTDIR       = ../../plugins
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins
 INSTALLS += target
+
+CONFIG += install_ok  # Do not cargo-cult this!
diff --git a/examples/widgets/tools/styleplugin/plugin/plugin.pro b/examples/widgets/tools/styleplugin/plugin/plugin.pro
index c7e8de6ee24..35184fc82a9 100644
--- a/examples/widgets/tools/styleplugin/plugin/plugin.pro
+++ b/examples/widgets/tools/styleplugin/plugin/plugin.pro
@@ -20,3 +20,5 @@ EXAMPLE_FILES += simplestyle.json
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/styleplugin/styles
 INSTALLS += target
+
+CONFIG += install_ok  # Do not cargo-cult this!
diff --git a/examples/widgets/tools/styleplugin/styleplugin.pro b/examples/widgets/tools/styleplugin/styleplugin.pro
index b9f251116df..4f120637b0c 100644
--- a/examples/widgets/tools/styleplugin/styleplugin.pro
+++ b/examples/widgets/tools/styleplugin/styleplugin.pro
@@ -1,7 +1,3 @@
 TEMPLATE	= subdirs
 SUBDIRS		= stylewindow \
 		  plugin
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/styleplugin
-INSTALLS += target
diff --git a/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro b/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro
index 56aa373b0e2..cdc1bd2fda4 100644
--- a/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro
+++ b/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro
@@ -15,3 +15,5 @@ win32 {
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/styleplugin
 INSTALLS += target
+
+CONFIG += install_ok  # Do not cargo-cult this!
-- 
GitLab