diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-22 11:33:23 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-22 12:36:18 +0200 |
commit | e8d13d590e75f78ddddb8cebfbb10bc42ce71b1e (patch) | |
tree | 611523239db4f5627a1f4e65b8a10629d49bb6e5 /sources/shiboken2/generator | |
parent | 0c76a7c230fcaa346ba92b197fc45abb768f47fd (diff) |
Further build fixes for Qt 6
Change-Id: I2463997f1eb2012cbbd0192a019ca57beaf55d5b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index 0ad4fff3b..edd24aa23 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -857,7 +857,11 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const QRegularExpressionMatch match = regex.match(expr, offset); if (!match.hasMatch()) break; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + const int argId = match.capturedView(1).toInt() - 1; +#else const int argId = match.capturedRef(1).toInt() - 1; +#endif if (argId < 0 || argId > func->arguments().count()) { qCWarning(lcShiboken) << "The expression used in return value contains an invalid index."; break; |