Fix bugs 430, 426, 429, 394, 433.
These bugs are about QApplication instance being destroyed before
some QObject.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
This commit is contained in:
parent
800fb4613c
commit
77a1654ad5
11 changed files with 112 additions and 39 deletions
|
|
@ -13,6 +13,9 @@ PYSIDE_TEST(bug_367.py)
|
|||
PYSIDE_TEST(bug_389.py)
|
||||
PYSIDE_TEST(bug_400.py)
|
||||
PYSIDE_TEST(bug_416.py)
|
||||
PYSIDE_TEST(bug_429.py)
|
||||
PYSIDE_TEST(bug_430.py)
|
||||
PYSIDE_TEST(bug_433.py)
|
||||
PYSIDE_TEST(customproxywidget_test.py)
|
||||
PYSIDE_TEST(deepcopy_test.py)
|
||||
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
||||
|
|
|
|||
10
tests/QtGui/bug_429.py
Normal file
10
tests/QtGui/bug_429.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from PySide.QtCore import *
|
||||
from PySide.QtGui import *
|
||||
import sys
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
scene = QGraphicsScene()
|
||||
label = QLabel("hello world")
|
||||
label.show()
|
||||
QTimer.singleShot(0, label.close)
|
||||
exit(app.exec_())
|
||||
14
tests/QtGui/bug_430.py
Normal file
14
tests/QtGui/bug_430.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import sys
|
||||
from PySide.QtCore import *
|
||||
from PySide.QtGui import *
|
||||
|
||||
class ListModel(QAbstractListModel):
|
||||
def rowCount(self, parent = QModelIndex()):
|
||||
return len(self._items)
|
||||
|
||||
app = QApplication([])
|
||||
model = ListModel()
|
||||
v = QListView()
|
||||
v.setModel(model)
|
||||
QTimer.singleShot(0, v.close)
|
||||
app.exec_()
|
||||
14
tests/QtGui/bug_433.py
Normal file
14
tests/QtGui/bug_433.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from PySide import QtCore, QtGui
|
||||
import sys
|
||||
|
||||
class Test(QtGui.QGraphicsView):
|
||||
def __init__(self, parent=None):
|
||||
super(Test, self).__init__(parent)
|
||||
self.s = QtGui.QGraphicsScene()
|
||||
self.setScene(self.s)
|
||||
|
||||
a = QtGui.QApplication(sys.argv)
|
||||
t = Test()
|
||||
t.show()
|
||||
QtCore.QTimer.singleShot(0, t.close)
|
||||
sys.exit(a.exec_())
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
PYSIDE_TEST(bug_360.py)
|
||||
PYSIDE_TEST(bug_376.py)
|
||||
PYSIDE_TEST(bug_392.py)
|
||||
PYSIDE_TEST(bug_426.py)
|
||||
PYSIDE_TEST(uiloader_test.py)
|
||||
PYSIDE_TEST(ui_test.py)
|
||||
|
|
|
|||
18
tests/QtUiTools/bug_426.py
Normal file
18
tests/QtUiTools/bug_426.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import sys
|
||||
import os
|
||||
from PySide import QtCore, QtGui
|
||||
from PySide.QtUiTools import QUiLoader
|
||||
|
||||
class Window(object):
|
||||
def __init__(self):
|
||||
loader = QUiLoader()
|
||||
filePath = os.path.join(os.path.dirname(__file__), 'bug_426.ui')
|
||||
self.widget = loader.load(filePath)
|
||||
self.group = QtGui.QActionGroup(self.widget)
|
||||
self.widget.show()
|
||||
QtCore.QTimer.singleShot(0, self.widget.close)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QtGui.QApplication(sys.argv)
|
||||
win = Window()
|
||||
sys.exit(app.exec_())
|
||||
19
tests/QtUiTools/bug_426.ui
Normal file
19
tests/QtUiTools/bug_426.ui
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Loading…
Add table
Add a link
Reference in a new issue