diff --git a/cfg/qt.cfg b/cfg/qt.cfg index 43feea299..2ff28550b 100644 --- a/cfg/qt.cfg +++ b/cfg/qt.cfg @@ -5179,15 +5179,15 @@ - + - + - - + + @@ -5215,6 +5215,7 @@ + diff --git a/test/cfg/qt.cpp b/test/cfg/qt.cpp index 3493dfe49..716fab94c 100644 --- a/test/cfg/qt.cpp +++ b/test/cfg/qt.cpp @@ -19,6 +19,7 @@ #include #include #include +#include void QString1(QString s) @@ -412,6 +413,13 @@ void MacroTest2_test() #endif } +void MacroTest3() +{ + QByteArray message = QByteArrayLiteral("Test1"); + message += QByteArrayLiteral("Test2"); + QVERIFY2(2 >= 0, message.constData()); +} + void validCode(int * pIntPtr, QString & qstrArg) { if (QFile::exists("test")) {} diff --git a/test/cfg/runtests.sh b/test/cfg/runtests.sh index 8da6f5d58..3552cca99 100755 --- a/test/cfg/runtests.sh +++ b/test/cfg/runtests.sh @@ -33,7 +33,7 @@ CC_OPT='-Wno-format -Wno-stringop-overread -Wno-nonnull -Wno-implicit-function-d function get_pkg_config_cflags { set +e - PKGCONFIG=$(pkg-config --cflags $1) + PKGCONFIG=$(pkg-config --cflags "$@") PKGCONFIG_RETURNCODE=$? set -e if [ $PKGCONFIG_RETURNCODE -ne 0 ]; then @@ -60,9 +60,9 @@ function gnu_fn { # qt.cpp function qt_fn { if [ $HAS_PKG_CONFIG -eq 1 ]; then - QTCONFIG=$(get_pkg_config_cflags Qt5Core) + QTCONFIG=$(get_pkg_config_cflags Qt5Core Qt5Test) if [ -n "$QTCONFIG" ]; then - QTBUILDCONFIG=$(pkg-config --variable=qt_config Qt5Core) + QTBUILDCONFIG=$(pkg-config --variable=qt_config Qt5Core Qt5Test) [[ $QTBUILDCONFIG =~ (^|[[:space:]])reduce_relocations($|[[:space:]]) ]] && QTCONFIG="${QTCONFIG} -fPIC" set +e echo -e "#include " | ${CXX} ${CXX_OPT} ${QTCONFIG} -x c++ -