More Qt5 compatibility changes · MeVisLab/pythonqt@5bb5ae4 · GitHub
Skip to content

Commit 5bb5ae4

Browse files
committed
More Qt5 compatibility changes
1 parent cf2e2c8 commit 5bb5ae4

12 files changed

Lines changed: 20 additions & 28 deletions

File tree

examples/CPPPyWrapperExample/CPPPyWrapperExample.pro

Lines changed: 1 addition & 3 deletions

examples/PyCPPWrapperExample/PyCPPWrapperExample.pro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ DESTDIR = ../../lib
1212
include ( ../../build/common.prf )
1313
include ( ../../build/PythonQt.prf )
1414

15-
contains(QT_MAJOR_VERSION, 5) {
16-
QT += widgets
17-
}
15+
QT += widgets
1816

1917
HEADERS += \
2018
CustomObjects.h

examples/PyCustomMetaTypeExample/PyCustomMetaTypeExample.pro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ DESTDIR = ../../lib
1212
include ( ../../build/common.prf )
1313
include ( ../../build/PythonQt.prf )
1414

15-
contains(QT_MAJOR_VERSION, 5) {
16-
QT += widgets
17-
}
15+
QT += widgets
1816

1917
HEADERS += \
2018
CustomObject.h

examples/PyDecoratorsExample/PyDecoratorsExample.pro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ DESTDIR = ../../lib
1212
include ( ../../build/common.prf )
1313
include ( ../../build/PythonQt.prf )
1414

15-
contains(QT_MAJOR_VERSION, 5) {
16-
QT += widgets
17-
}
15+
QT += widgets
1816

1917
HEADERS += \
2018
PyExampleDecorators.h

examples/PyGettingStarted/PyGettingStarted.pro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ CONFIG += console
1414
include ( ../../build/common.prf )
1515
include ( ../../build/PythonQt.prf )
1616

17-
contains(QT_MAJOR_VERSION, 5) {
18-
QT += widgets
19-
}
17+
QT += widgets
2018

2119
SOURCES += \
2220
main.cpp

examples/PyGuiExample/PyGuiExample.pro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ mac:CONFIG -= app_bundle
1111

1212
DESTDIR = ../../lib
1313

14-
contains(QT_MAJOR_VERSION, 5) {
15-
QT += widgets
16-
}
14+
QT += widgets
1715

1816
include ( ../../build/common.prf )
1917
include ( ../../build/PythonQt.prf )

examples/PyLauncher/PyLauncher.pro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ mac:CONFIG -= app_bundle
1111

1212
DESTDIR = ../../lib
1313

14-
contains(QT_MAJOR_VERSION, 5) {
15-
QT += widgets
16-
}
14+
QT += widgets
1715

1816
include ( ../../build/common.prf )
1917
include ( ../../build/PythonQt.prf )

examples/PyScriptingConsole/PyScriptingConsole.pro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ include ( ../../build/common.prf )
1515
include ( ../../build/PythonQt.prf )
1616
include ( ../../build/PythonQt_QtAll.prf )
1717

18-
contains(QT_MAJOR_VERSION, 5) {
19-
QT += widgets
20-
}
18+
QT += widgets
2119

2220
HEADERS += \
2321
PyExampleObject.h

src/PythonQtClassInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,12 @@ QStringList PythonQtClassInfo::memberList()
554554
}
555555
}
556556

557+
#if QT_VERSION >= 0x060000
557558
QSet<QString> set(l.begin(), l.end());
558559
return set.values();
560+
#else
561+
return QSet<QString>::fromList(l).toList();
562+
#endif
559563
}
560564

561565
const QByteArray& PythonQtClassInfo::className() const

src/PythonQtClassWrapper.cpp

Lines changed: 5 additions & 1 deletion

0 commit comments

Comments
 (0)