summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-07-16 12:10:19 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-12-19 19:22:10 +0000
commit98689cd2f9d3e9e4dac33ccf6679b90d4b39284f (patch)
tree2d057c80226508081afa560e4c31c10b326679a2 /src/corelib
parent73b8769730701736cd0d05f904b69f2e7e35de1d (diff)
configure: enable inline tests to refer to PWD
... and use that to inline the xlocalescanprint test. Change-Id: I0973133d7f9ecc9a38b70dc4b83df174a35b2b1f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/configure.json33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index eb213398ca..3b33e6158b 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -467,7 +467,38 @@
"xlocalescanprint": {
"label": "xlocale.h (or equivalents)",
"type": "compile",
- "test": "xlocalescanprint"
+ "test": {
+ "files": {
+ "qglobal.h": [
+ "#ifndef QGLOBAL_H",
+ "#define QGLOBAL_H",
+ "#endif"
+ ]
+ },
+ "tail": [
+ "#define QT_BEGIN_NAMESPACE",
+ "#define QT_END_NAMESPACE",
+ "",
+ "#ifdef _MSVC_VER",
+ "#define Q_CC_MSVC _MSVC_VER",
+ "#endif",
+ "",
+ "#define QT_NO_DOUBLECONVERSION",
+ "",
+ "#include QDSP_P_H"
+ ],
+ "main": [
+ "#ifdef _MSVC_VER",
+ "_locale_t invalidLocale = NULL;",
+ "#else",
+ "locale_t invalidLocale = NULL;",
+ "#endif",
+ "double a = 3.4;",
+ "qDoubleSnprintf(argv[0], 1, invalidLocale, \"invalid format\", a);",
+ "qDoubleSscanf(argv[0], invalidLocale, \"invalid format\", &a, &argc);"
+ ],
+ "qmake": "DEFINES += QDSP_P_H=$$shell_quote(\\\"@PWD@/tools/qdoublescanprint_p.h\\\")"
+ }
}
},