diff options
-rw-r--r-- | PySide/QtCore/glue/qcoreapplication_init.cpp | 2 | ||||
-rw-r--r-- | tests/QtCore/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtCore/bug_656.py | 9 |
3 files changed, 11 insertions, 1 deletions
diff --git a/PySide/QtCore/glue/qcoreapplication_init.cpp b/PySide/QtCore/glue/qcoreapplication_init.cpp index 0c0e1f8fe..15e3e1118 100644 --- a/PySide/QtCore/glue/qcoreapplication_init.cpp +++ b/PySide/QtCore/glue/qcoreapplication_init.cpp @@ -4,7 +4,7 @@ static char** QCoreApplicationArgValues; int Sbk_QCoreApplication_Init(PyObject* self, PyObject* args, PyObject*) { - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication >())) + if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType<QCoreApplication >())) return -1; diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt index c53002b2b..c6f9ffd43 100644 --- a/tests/QtCore/CMakeLists.txt +++ b/tests/QtCore/CMakeLists.txt @@ -5,6 +5,7 @@ PYSIDE_TEST(bug_428.py) PYSIDE_TEST(bug_462.py) PYSIDE_TEST(bug_505.py) PYSIDE_TEST(bug_515.py) +PYSIDE_TEST(bug_656.py) PYSIDE_TEST(blocking_signals_test.py) PYSIDE_TEST(child_event_test.py) PYSIDE_TEST(deepcopy_test.py) diff --git a/tests/QtCore/bug_656.py b/tests/QtCore/bug_656.py new file mode 100644 index 000000000..ba5617447 --- /dev/null +++ b/tests/QtCore/bug_656.py @@ -0,0 +1,9 @@ +from PySide.QtCore import * + +class CoreApp(QCoreApplication): + def __init__(self,*args): + super(CoreApp,self).__init__(*args) + # It shouldn't crash after the __init__ call + +import sys +app = CoreApp(sys.argv) |