diff options
Diffstat (limited to 'doc/src/snippets/qmake/testfunction.pro')
-rw-r--r-- | doc/src/snippets/qmake/testfunction.pro | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/src/snippets/qmake/testfunction.pro b/doc/src/snippets/qmake/testfunction.pro new file mode 100644 index 0000000..785ffed --- /dev/null +++ b/doc/src/snippets/qmake/testfunction.pro @@ -0,0 +1,20 @@ +#! [0] +defineTest(allFiles) { + files = $$ARGS + + for(file, files) { + !exists($$file) { + return(false) + } + } + return(true) +} +#! [0] + +files = delegate.h model.h view.h + +allFiles($$files) { + message(All files are present: $$files) +} else { + message(Not all files are present: $$files) +} |