Fix bug 656 - "cannot inherit from QCoreApplication"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
f2c537eeaa
commit
43a8f4089e
3 changed files with 11 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ static char** QCoreApplicationArgValues;
|
||||||
|
|
||||||
int Sbk_QCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
|
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;
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ PYSIDE_TEST(bug_428.py)
|
||||||
PYSIDE_TEST(bug_462.py)
|
PYSIDE_TEST(bug_462.py)
|
||||||
PYSIDE_TEST(bug_505.py)
|
PYSIDE_TEST(bug_505.py)
|
||||||
PYSIDE_TEST(bug_515.py)
|
PYSIDE_TEST(bug_515.py)
|
||||||
|
PYSIDE_TEST(bug_656.py)
|
||||||
PYSIDE_TEST(blocking_signals_test.py)
|
PYSIDE_TEST(blocking_signals_test.py)
|
||||||
PYSIDE_TEST(child_event_test.py)
|
PYSIDE_TEST(child_event_test.py)
|
||||||
PYSIDE_TEST(deepcopy_test.py)
|
PYSIDE_TEST(deepcopy_test.py)
|
||||||
|
|
|
||||||
9
tests/QtCore/bug_656.py
Normal file
9
tests/QtCore/bug_656.py
Normal file
|
|
@ -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)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue