diff options
author | Jerome Pasion <jerome.pasion@digia.com> | 2013-08-09 13:58:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-13 01:38:54 +0200 |
commit | 4bea83fe71fdbd9e9054929a982c999976548ca9 (patch) | |
tree | 4c222f10e300885ae0a146bd07efd9e068692e54 /qmake/doc/snippets/qmake/replacefunction.pro | |
parent | 4b0dfef236c48dd6f2d629a57cf4d746c9942aeb (diff) |
Doc: Fixed qmake manual's images and snippets directories.
-corrected qmake.qdocconf file to not read the manual twice
-moved the snippets and images directories to make sure they are not
in the src directory
Task-number: QTBUG-32580
Change-Id: I7b702ce3b1c8709bbb1f473f70625083242f1a40
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Diffstat (limited to 'qmake/doc/snippets/qmake/replacefunction.pro')
-rw-r--r-- | qmake/doc/snippets/qmake/replacefunction.pro | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/qmake/doc/snippets/qmake/replacefunction.pro b/qmake/doc/snippets/qmake/replacefunction.pro new file mode 100644 index 0000000000..98013ba42d --- /dev/null +++ b/qmake/doc/snippets/qmake/replacefunction.pro @@ -0,0 +1,46 @@ +#! [0] +defineReplace(headersAndSources) { + variable = $$1 + names = $$eval($$variable) + headers = + sources = + + for(name, names) { + header = $${name}.h + exists($$header) { + headers += $$header + } + source = $${name}.cpp + exists($$source) { + sources += $$source + } + } + return($$headers $$sources) +} +#! [0] + +defineReplace(matchingFiles) { + names = $$ARGS + files = + + for(name, names) { + header = $${name}.h + source = $${name}.cpp + exists($$header):exists($$source) { + files += $$header + files += $$source + } + } + return($$files) +} + +names = delegate model view main +message(Finding all headers and sources from the following list of names:) +message($$names) +allFiles = $$headersAndSources(names) +message(Found: $$allFiles) + +message(Finding only matching headers and sources from the following list of names:) +message($$names) +matching = $$matchingFiles($$names) +message(Found: $$matching) |