Remove wrapper for classes: QString, QStringRef, QLatin1String, QStringMatcher, QChar and QLatin1Char.

This commit is contained in:
Hugo Parente Lima 2010-06-03 15:34:17 -03:00
commit e39bfefde9
32 changed files with 187 additions and 1189 deletions

View file

@ -15,7 +15,7 @@ class TestInputDialog(TimedQApplication):
self.assertEquals(QtGui.QInputDialog.getInteger(None, "title", "label"), (0, False))
def testGetItem(self):
(item, bool) = QtGui.QInputDialog.getItem(None, "title", "label", QtCore.QStringList(["1", "2", "3"]))
(item, bool) = QtGui.QInputDialog.getItem(None, "title", "label", ["1", "2", "3"])
self.assertEquals(str(item), "1")
def testGetText(self):

View file

@ -16,7 +16,7 @@ class QPixmapTest(UsesQApplication):
self.assert_(pixmap.size().height(), 20)
def testQStringConstructor(self):
pixmap = QPixmap(QString("Testing!"))
pixmap = QPixmap("Testing!")
def testQVariantConstructor2(self):
v = QVariant(QPixmap())

View file

@ -5,7 +5,7 @@
import unittest
from helper import UsesQApplication
from PySide.QtCore import QString
from PySide.QtCore import *
from PySide.QtGui import QKeySequence, QAction
class QStringQKeySequenceTest(UsesQApplication):
@ -14,21 +14,12 @@ class QStringQKeySequenceTest(UsesQApplication):
def testQStringFromQKeySequence(self):
'''Creates a QString from a QKeySequence.'''
keyseq = 'Ctrl+A'
a = QString(QKeySequence(keyseq))
a = QKeySequence(keyseq)
self.assertEqual(a, keyseq)
def testQStringAsQKeySequence(self):
'''Passes a QString to an argument expecting a QKeySequence.'''
keyseq = QString('Ctrl+A')
action = QAction(None)
action.setShortcut(keyseq)
shortcut = action.shortcut()
self.assert_(isinstance(shortcut, QKeySequence))
self.assertEqual(shortcut.toString(), keyseq)
def testPythonStringAsQKeySequence(self):
'''Passes a Python string to an argument expecting a QKeySequence.'''
keyseq = 'Ctrl+A'
keyseq = u'Ctrl+A'
action = QAction(None)
action.setShortcut(keyseq)
shortcut = action.shortcut()