From aeb036ed8715d0c099d3dca87f7def4dbaf8e9b4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 27 Nov 2012 20:40:16 +0100 Subject: centralize and fixup example sources install targets it's confusing for the users if the examples' project files contain code to install their own sources. also, this constitutes an enormous code duplication, and lots of mistakes. consequently, automate it. more or less as a side effect, this also removes the entirely meaningless target installs in subdirs projects. Task-number: QTBUG-28184 Change-Id: I9fc1367a06db9e2c46aeb67d68729a4f67163ef9 Reviewed-by: hjk --- examples/widgets/tools/codecs/codecs.pro | 6 +++--- examples/widgets/tools/completer/completer.pro | 4 +--- examples/widgets/tools/customcompleter/customcompleter.pro | 4 +--- examples/widgets/tools/echoplugin/echoplugin.pro | 4 +--- examples/widgets/tools/echoplugin/echowindow/echowindow.pro | 4 +--- examples/widgets/tools/echoplugin/plugin/plugin.pro | 7 +++---- examples/widgets/tools/i18n/i18n.pro | 4 +--- examples/widgets/tools/plugandpaint/plugandpaint.pro | 4 +--- .../widgets/tools/plugandpaintplugins/basictools/basictools.pro | 5 +---- .../tools/plugandpaintplugins/extrafilters/extrafilters.pro | 6 +----- examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro | 6 ------ examples/widgets/tools/regexp/regexp.pro | 4 +--- examples/widgets/tools/settingseditor/settingseditor.pro | 6 +++--- examples/widgets/tools/styleplugin/plugin/plugin.pro | 7 +++---- examples/widgets/tools/styleplugin/styleplugin.pro | 4 +--- examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro | 4 +--- examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro | 4 +--- examples/widgets/tools/undo/undo.pro | 4 +--- examples/widgets/tools/undoframework/undoframework.pro | 4 +--- 19 files changed, 26 insertions(+), 65 deletions(-) (limited to 'examples/widgets/tools') diff --git a/examples/widgets/tools/codecs/codecs.pro b/examples/widgets/tools/codecs/codecs.pro index 377dfaa8c9..410411d870 100644 --- a/examples/widgets/tools/codecs/codecs.pro +++ b/examples/widgets/tools/codecs/codecs.pro @@ -4,11 +4,11 @@ SOURCES += main.cpp \ mainwindow.cpp \ previewform.cpp +EXAMPLE_FILES = encodedfiles + # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/codecs -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS encodedfiles codecs.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/codecs -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/completer/completer.pro b/examples/widgets/tools/completer/completer.pro index a735b7ceae..c0fcf8d1fb 100644 --- a/examples/widgets/tools/completer/completer.pro +++ b/examples/widgets/tools/completer/completer.pro @@ -7,9 +7,7 @@ RESOURCES = completer.qrc # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/completer -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS completer.pro resources -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/completer -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/customcompleter/customcompleter.pro b/examples/widgets/tools/customcompleter/customcompleter.pro index b61cb510e9..24d973cf82 100644 --- a/examples/widgets/tools/customcompleter/customcompleter.pro +++ b/examples/widgets/tools/customcompleter/customcompleter.pro @@ -7,9 +7,7 @@ RESOURCES = customcompleter.qrc # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS customcompleter.pro resources -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/echoplugin/echoplugin.pro b/examples/widgets/tools/echoplugin/echoplugin.pro index ffd48fd25f..685227c6c4 100644 --- a/examples/widgets/tools/echoplugin/echoplugin.pro +++ b/examples/widgets/tools/echoplugin/echoplugin.pro @@ -6,8 +6,6 @@ SUBDIRS = echowindow \ # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS echoplugin.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/echoplugin/echowindow/echowindow.pro b/examples/widgets/tools/echoplugin/echowindow/echowindow.pro index 90bc831de1..cd91693ec0 100644 --- a/examples/widgets/tools/echoplugin/echowindow/echowindow.pro +++ b/examples/widgets/tools/echoplugin/echowindow/echowindow.pro @@ -14,9 +14,7 @@ win32 { # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS echowindow.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/echowindow -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/echoplugin/plugin/plugin.pro b/examples/widgets/tools/echoplugin/plugin/plugin.pro index 532a382586..a586130b76 100644 --- a/examples/widgets/tools/echoplugin/plugin/plugin.pro +++ b/examples/widgets/tools/echoplugin/plugin/plugin.pro @@ -4,15 +4,14 @@ CONFIG += plugin INCLUDEPATH += ../echowindow HEADERS = echoplugin.h SOURCES = echoplugin.cpp -OTHER_FILES += echoplugin.json TARGET = $$qtLibraryTarget(echoplugin) DESTDIR = ../plugins #! [0] +EXAMPLE_FILES = echoplugin.json + # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/plugin -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugin.pro echoplugin.json -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/echoplugin/plugin -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/i18n/i18n.pro b/examples/widgets/tools/i18n/i18n.pro index a02e25dcd0..57514781eb 100644 --- a/examples/widgets/tools/i18n/i18n.pro +++ b/examples/widgets/tools/i18n/i18n.pro @@ -21,9 +21,7 @@ TRANSLATIONS += translations/i18n_ar.ts \ # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/i18n -sources.files = $$SOURCES $$HEADERS $$RESOURCES translations i18n.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/i18n -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/plugandpaint/plugandpaint.pro b/examples/widgets/tools/plugandpaint/plugandpaint.pro index cbf573dd4b..ffa408df66 100644 --- a/examples/widgets/tools/plugandpaint/plugandpaint.pro +++ b/examples/widgets/tools/plugandpaint/plugandpaint.pro @@ -18,8 +18,6 @@ if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugandpaint.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro b/examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro index 3190e45c46..731034fb3c 100644 --- a/examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro +++ b/examples/widgets/tools/plugandpaintplugins/basictools/basictools.pro @@ -4,15 +4,12 @@ CONFIG += plugin static INCLUDEPATH += ../.. HEADERS = basictoolsplugin.h SOURCES = basictoolsplugin.cpp -OTHER_FILES += basictools.json TARGET = $$qtLibraryTarget(pnp_basictools) DESTDIR = ../../plugandpaint/plugins #! [0] # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint/plugins -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS basictools.pro basictools.json -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins/basictools -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro b/examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro index bc7ccffc0a..7a18e49dc1 100644 --- a/examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro +++ b/examples/widgets/tools/plugandpaintplugins/extrafilters/extrafilters.pro @@ -4,16 +4,12 @@ CONFIG += plugin INCLUDEPATH += ../.. HEADERS = extrafiltersplugin.h SOURCES = extrafiltersplugin.cpp -OTHER_FILES += extrafilters.json TARGET = $$qtLibraryTarget(pnp_extrafilters) DESTDIR = ../../plugandpaint/plugins #! [0] # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaint/plugins -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extrafilters.pro extrafilters.json -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins/extrafilters -INSTALLS += target sources - +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro b/examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro index 8eab48e92d..6f077c952e 100644 --- a/examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro +++ b/examples/widgets/tools/plugandpaintplugins/plugandpaintplugins.pro @@ -2,10 +2,4 @@ TEMPLATE = subdirs SUBDIRS = basictools \ extrafilters -# install -target.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugandpaintplugins.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/plugandpaintplugins -INSTALLS += target sources - QT += widgets diff --git a/examples/widgets/tools/regexp/regexp.pro b/examples/widgets/tools/regexp/regexp.pro index 8e88511ead..eead58807f 100644 --- a/examples/widgets/tools/regexp/regexp.pro +++ b/examples/widgets/tools/regexp/regexp.pro @@ -4,9 +4,7 @@ SOURCES = regexpdialog.cpp \ # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/regexp -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS regexp.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/regexp -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/settingseditor/settingseditor.pro b/examples/widgets/tools/settingseditor/settingseditor.pro index 2499b22436..9d7c776067 100644 --- a/examples/widgets/tools/settingseditor/settingseditor.pro +++ b/examples/widgets/tools/settingseditor/settingseditor.pro @@ -8,11 +8,11 @@ SOURCES = locationdialog.cpp \ settingstree.cpp \ variantdelegate.cpp +EXAMPLE_FILES = inifiles + # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/settingseditor -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS settingseditor.pro inifiles -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/settingseditor -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/styleplugin/plugin/plugin.pro b/examples/widgets/tools/styleplugin/plugin/plugin.pro index c13af5a36c..65a41087e6 100644 --- a/examples/widgets/tools/styleplugin/plugin/plugin.pro +++ b/examples/widgets/tools/styleplugin/plugin/plugin.pro @@ -5,7 +5,6 @@ HEADERS = simplestyle.h \ simplestyleplugin.h SOURCES = simplestyle.cpp \ simplestyleplugin.cpp -OTHER_FILES += simplestyle.json TARGET = simplestyleplugin #! [0] win32 { @@ -15,11 +14,11 @@ win32 { DESTDIR = ../styles/ } +EXAMPLE_FILES += simplestyle.json + # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/styles -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugin.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/plugin -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/styleplugin/styleplugin.pro b/examples/widgets/tools/styleplugin/styleplugin.pro index 63805a14cc..4df48ae6b4 100644 --- a/examples/widgets/tools/styleplugin/styleplugin.pro +++ b/examples/widgets/tools/styleplugin/styleplugin.pro @@ -4,8 +4,6 @@ SUBDIRS = stylewindow \ # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS styleplugin.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro b/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro index 658a46134b..3bfcf23bbb 100644 --- a/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro +++ b/examples/widgets/tools/styleplugin/stylewindow/stylewindow.pro @@ -12,8 +12,6 @@ win32 { # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stylewindow.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/stylewindow -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro b/examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro index ffdf9b647d..818f242b48 100644 --- a/examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro +++ b/examples/widgets/tools/treemodelcompleter/treemodelcompleter.pro @@ -7,9 +7,7 @@ RESOURCES = treemodelcompleter.qrc # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/treemodelcompleter -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS treemodelcompleter.pro resources -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/treemodelcompleter -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/undo/undo.pro b/examples/widgets/tools/undo/undo.pro index e61b678a93..f3ac1256c0 100644 --- a/examples/widgets/tools/undo/undo.pro +++ b/examples/widgets/tools/undo/undo.pro @@ -11,8 +11,6 @@ RESOURCES += undo.qrc # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/undo -sources.files = $$SOURCES $$HEADERS *.pro icons $$RESOURCES $$FORMS -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/undo -INSTALLS += target sources +INSTALLS += target QT += widgets diff --git a/examples/widgets/tools/undoframework/undoframework.pro b/examples/widgets/tools/undoframework/undoframework.pro index d50247442a..a9a1b05f39 100644 --- a/examples/widgets/tools/undoframework/undoframework.pro +++ b/examples/widgets/tools/undoframework/undoframework.pro @@ -11,9 +11,7 @@ RESOURCES = undoframework.qrc # install target.path = $$[QT_INSTALL_EXAMPLES]/tools/undoframework -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS undoframework.pro README images -sources.path = $$[QT_INSTALL_EXAMPLES]/tools/undoframework -INSTALLS += target sources +INSTALLS += target QT += widgets -- cgit v1.2.3