summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2010-07-07 18:14:12 +0200
committerhjk <qtc-committer@nokia.com>2010-07-07 18:16:30 +0200
commit008d8cb114cbb874f920f4cc53e809cd9b3ff2f3 (patch)
treec3534c678941f5f5a912994dc6a363fbcc370a59
parentef5aaa036874ddb67e0d28d16c80efe014952efa (diff)
downloadqt-creator-008d8cb114cbb874f920f4cc53e809cd9b3ff2f3.tar.gz
debugger: extend python manual test a bit
-rw-r--r--src/plugins/debugger/pdb/pdbengine.cpp15
-rw-r--r--tests/manual/gdbdebugger/python/math.py65
2 files changed, 55 insertions, 25 deletions
diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp
index 8edb629345..ebf2b3b4e2 100644
--- a/src/plugins/debugger/pdb/pdbengine.cpp
+++ b/src/plugins/debugger/pdb/pdbengine.cpp
@@ -202,16 +202,18 @@ void PdbEngine::startDebugger()
setState(AdapterStarted);
setState(InferiorStarting);
- setState(InferiorRunningRequested);
- showStatusMessage(tr("Running requested..."), 5000);
-
emit startSuccessful();
+ showStatusMessage(tr("Running requested..."), 5000);
+ setState(InferiorRunningRequested);
+ setState(InferiorRunning);
}
void PdbEngine::runInferior()
{
SDEBUG("PdbEngine::runInferior()");
- // FIXME: setState(InferiorRunning);
+ QTC_ASSERT(false, /**/); // FIXME:
+ setState(InferiorRunningRequested);
+ setState(InferiorRunning);
}
void PdbEngine::interruptInferior()
@@ -678,14 +680,13 @@ void PdbEngine::handleResponse(const QByteArray &response0)
void PdbEngine::handleUpdateAll(const PdbResponse &response)
{
Q_UNUSED(response);
+ setState(InferiorStopping);
+ setState(InferiorStopped);
updateAll();
}
void PdbEngine::updateAll()
{
- setState(InferiorStopping);
- setState(InferiorStopped);
-
WatchHandler *handler = watchHandler();
QByteArray watchers;
diff --git a/tests/manual/gdbdebugger/python/math.py b/tests/manual/gdbdebugger/python/math.py
index 5a59ecba58..52f0cb58a7 100644
--- a/tests/manual/gdbdebugger/python/math.py
+++ b/tests/manual/gdbdebugger/python/math.py
@@ -1,25 +1,54 @@
-def square(a):
- x = a * a
- return a
-
-def cube(a):
- l = [1, 2, 4]
- t = (1, 2, 3)
- d = {1: 'one', 2: 'two', 'three': 3}
- s = u'unixcode'
- x = xrange(1, 10)
- b = buffer("xxx")
- x = square(a)
- x = x * a
- x = x + 1
- x = x - 1
- return x
+import sys
+from PyQt4 import QtGui
+
+
+
+def testApp():
+ app = QtGui.QApplication(sys.argv)
+
+ class MessageBox(QtGui.QWidget):
+ def __init__(self, parent=None):
+ QtGui.QWidget.__init__(self, parent)
+ self.setGeometry(200, 200, 300, 200)
+ self.setWindowTitle("A Test Box")
+
+ messageBox = MessageBox()
+ messageBox.show()
+
+ widget = QtGui.QWidget()
+ widget.resize(200, 200)
+ widget.show()
+
+ return app.exec_()
+
+
+def testMath():
+ def square(a):
+ x = a * a
+ return a
+
+ def cube(a):
+ l = [1, 2, 4]
+ t = (1, 2, 3)
+ d = {1: 'one', 2: 'two', 'three': 3}
+ s = u'unixcode'
+ x = xrange(1, 10)
+ b = buffer("xxx")
+ x = square(a)
+ x = x * a
+ x = x + 1
+ x = x - 1
+ return x
-def main():
print cube(3)
print cube(4)
print cube(5)
+def main():
+ #testMath()
+ testApp()
+ return 0
+
if __name__ == '__main__':
- main()
+ sys.exit(main())