aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-06-16 20:11:46 +0300
committerGitHub <noreply@github.com>2021-06-16 20:11:46 +0300
commit6fb2f86379c224e99652748eea94a03321b9bd11 (patch)
treea96fb2b8f6468d793b64b172abc67b8224e0edc3 /docs/markdown/snippets
parent537adce5d803ff4ae373d87671190a4a2682ff54 (diff)
parent0f5e55a749f0fed6330b216a82de941de3ccf9d6 (diff)
downloadmeson-6fb2f86379c224e99652748eea94a03321b9bd11.zip
meson-6fb2f86379c224e99652748eea94a03321b9bd11.tar.gz
meson-6fb2f86379c224e99652748eea94a03321b9bd11.tar.bz2
Merge pull request #8822 from dcbaker/submit/annotate-and-check-qt-module
Rewrite the Qt module for type safety!
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/qt_preprocess_separate.md5
-rw-r--r--docs/markdown/snippets/qt_preprocessed_varargs_deprecated.md33
2 files changed, 38 insertions, 0 deletions
diff --git a/docs/markdown/snippets/qt_preprocess_separate.md b/docs/markdown/snippets/qt_preprocess_separate.md
new file mode 100644
index 0000000..1035f9a
--- /dev/null
+++ b/docs/markdown/snippets/qt_preprocess_separate.md
@@ -0,0 +1,5 @@
+## Separate functions for qt preprocess
+
+`qt.preprocess` is a large, complicated function that does a lot of things,
+a new set of `compile_*` functions have been provided as well. These are
+conceptually simpler, as they do a single thing.
diff --git a/docs/markdown/snippets/qt_preprocessed_varargs_deprecated.md b/docs/markdown/snippets/qt_preprocessed_varargs_deprecated.md
new file mode 100644
index 0000000..5418eb3
--- /dev/null
+++ b/docs/markdown/snippets/qt_preprocessed_varargs_deprecated.md
@@ -0,0 +1,33 @@
+## Qt.preprocess source arguments deprecated
+
+The `qt.preprocess` method currently has this signature:
+`qt.preprocess(name: str | None, *srcs: str)`, this is not a nice signature
+because it's confusing, and there's a `sources` keyword argument as well.
+Both of these pass sources through unmodified, this is a bit of a historical
+accident, and not the way that any other module works. These have been
+deprecated, so instead of:
+```meson
+sources = qt.preprocess(
+ name,
+ list, of, sources,
+ sources : [more, sources],
+ ... # things to process,
+)
+
+executable(
+ 'foo',
+ sources,
+)
+```
+use
+```meson
+processed = qt.preprocess(
+ name,
+ ... # thins to process
+)
+
+executable(
+ 'foo',
+ 'list', 'of', 'sources', 'more', 'sources', processed,
+)
+```