aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-22 11:33:23 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-22 12:36:18 +0200
commite8d13d590e75f78ddddb8cebfbb10bc42ce71b1e (patch)
tree611523239db4f5627a1f4e65b8a10629d49bb6e5 /sources
parent0c76a7c230fcaa346ba92b197fc45abb768f47fd (diff)
Further build fixes for Qt 6
Change-Id: I2463997f1eb2012cbbd0192a019ca57beaf55d5b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside2/libpyside/pysideproperty.cpp5
-rw-r--r--sources/pyside2/libpyside/signalmanager.cpp2
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp1
-rw-r--r--sources/shiboken2/ApiExtractor/fileout.cpp6
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp4
5 files changed, 16 insertions, 2 deletions
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
index e9548dc22..85db745ae 100644
--- a/sources/pyside2/libpyside/pysideproperty.cpp
+++ b/sources/pyside2/libpyside/pysideproperty.cpp
@@ -139,12 +139,17 @@ static void qpropertyMetaCall(PySideProperty *pp, PyObject *self, QMetaObject::C
break;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ case QMetaObject::RegisterQPropertyObserver:
+ case QMetaObject::SetQPropertyBinding:
+#else
case QMetaObject::QueryPropertyDesignable:
case QMetaObject::QueryPropertyScriptable:
case QMetaObject::QueryPropertyStored:
case QMetaObject::QueryPropertyEditable:
case QMetaObject::QueryPropertyUser:
// just to avoid gcc warnings
+#endif
case QMetaObject::InvokeMetaMethod:
case QMetaObject::CreateInstance:
case QMetaObject::IndexOfMethod:
diff --git a/sources/pyside2/libpyside/signalmanager.cpp b/sources/pyside2/libpyside/signalmanager.cpp
index 8e8cc9f02..93847e066 100644
--- a/sources/pyside2/libpyside/signalmanager.cpp
+++ b/sources/pyside2/libpyside/signalmanager.cpp
@@ -411,11 +411,13 @@ int SignalManager::qt_metacall(QObject *object, QMetaObject::Call call, int id,
case QMetaObject::ReadProperty:
case QMetaObject::WriteProperty:
case QMetaObject::ResetProperty:
+# if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
case QMetaObject::QueryPropertyDesignable:
case QMetaObject::QueryPropertyScriptable:
case QMetaObject::QueryPropertyStored:
case QMetaObject::QueryPropertyEditable:
case QMetaObject::QueryPropertyUser:
+# endif // < Qt 6
pp->d->metaCallHandler(pp, pySelf, call, args);
break;
#endif
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
index dedf0db50..d4268941f 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
@@ -42,7 +42,6 @@
#include <QFile>
#include <QFileInfo>
#include <QRegularExpression>
-#include <QTextCodec>
#include <QTextStream>
#include <QVariant>
#include <QTime>
diff --git a/sources/shiboken2/ApiExtractor/fileout.cpp b/sources/shiboken2/ApiExtractor/fileout.cpp
index 10a8f6be8..ba5bf19de 100644
--- a/sources/shiboken2/ApiExtractor/fileout.cpp
+++ b/sources/shiboken2/ApiExtractor/fileout.cpp
@@ -30,7 +30,9 @@
#include "messages.h"
#include "reporthandler.h"
-#include <QtCore/QTextCodec>
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+# include <QtCore/QTextCodec>
+#endif
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtCore/QDebug>
@@ -219,8 +221,10 @@ FileOut::State FileOut::done(QString *errorMessage)
*errorMessage = msgCannotOpenForWriting(fileWrite);
return Failure;
}
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
stream.setCodec(codec);
+#endif
stream.setDevice(&fileWrite);
stream << tmp;
}
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;