Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt6: fixes for removal of Qt5 types #127

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions generator/setupgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ static QSet<QString> _builtinListTypes = QSet<QString>() << "QByteArray"
<< "QLineF"
<< "QPoint"
<< "QPointF"
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
<< "QRegExp"
#endif
<< "QRegularExpression"
<< "QFont"
<< "QPixmap"
<< "QBrush"
Expand All @@ -175,7 +178,11 @@ static QSet<QString> _builtinListTypes = QSet<QString>() << "QByteArray"
<< "QPen"
<< "QTextLength"
<< "QTextFormat"
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
<< "QMatrix"
#endif
<< "QTransform"
<< "QMatrix4x4"
<< "QVariant";

static void addListRegistration(AbstractMetaType* type, QSet<QString>& output) {
Expand Down
7 changes: 7 additions & 0 deletions generator/shellgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,11 @@ bool ShellGenerator::isBuiltIn(const QString& name) {
builtIn.insert("QKeySequence");
builtIn.insert("QTextLength");
builtIn.insert("QTextFormat");
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
builtIn.insert("QMatrix");
#endif
builtIn.insert("QTransform");
builtIn.insert("QMatrix4x4");
builtIn.insert("QDate");
builtIn.insert("QTime");
builtIn.insert("QDateTime");
Expand All @@ -449,7 +453,10 @@ bool ShellGenerator::isBuiltIn(const QString& name) {
builtIn.insert("QLineF");
builtIn.insert("QPoint");
builtIn.insert("QPointF");
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
builtIn.insert("QRegExp");
#endif
builtIn.insert("QRegularExpression");
}
return builtIn.contains(name);
}
Expand Down
6 changes: 4 additions & 2 deletions src/PythonQtMethodInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ int PythonQtMethodInfo::nameToType(const char* name)
_parameterTypeDict.insert("QLineF", QMetaType::QLineF);
_parameterTypeDict.insert("QPoint", QMetaType::QPoint);
_parameterTypeDict.insert("QPointF", QMetaType::QPointF);
#if QT_VERSION < 0x060000
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
_parameterTypeDict.insert("QRegExp", QMetaType::QRegExp);
#endif
_parameterTypeDict.insert("QRegularExpression", QMetaType::QRegularExpression);
Expand All @@ -390,9 +390,11 @@ int PythonQtMethodInfo::nameToType(const char* name)
_parameterTypeDict.insert("QKeySequence", QMetaType::QKeySequence);
_parameterTypeDict.insert("QPen", QMetaType::QPen);
_parameterTypeDict.insert("QTextLength", QMetaType::QTextLength);
#if QT_VERSION < 0x060000
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
_parameterTypeDict.insert("QMatrix", QMetaType::QMatrix);
#endif
_parameterTypeDict.insert("QMatrix4x4", QMetaType::QMatrix4x4);
_parameterTypeDict.insert("QTransform", QMetaType::QTransform);
_parameterTypeDict.insert("QTextFormat", QMetaType::QTextFormat);
_parameterTypeDict.insert("QVariant", PythonQtMethodInfo::Variant);
// own special types... (none so far, could be e.g. ObjectList
Expand Down
Loading