[Ktutorial-commits] SF.net SVN: ktutorial:[91] trunk/ktutorial/ktutorial-library
Status: Alpha
Brought to you by:
danxuliu
|
From: <dan...@us...> - 2010-02-23 06:28:20
|
Revision: 91
http://ktutorial.svn.sourceforge.net/ktutorial/?rev=91&view=rev
Author: danxuliu
Date: 2010-02-23 06:28:13 +0000 (Tue, 23 Feb 2010)
Log Message:
-----------
When a tutorial is finished the current step shouldn't be remembered. If remembered and the tutorial is started again, its tearDown method would be executed again when changing back to start step.
Modified Paths:
--------------
trunk/ktutorial/ktutorial-library/src/Tutorial.cpp
trunk/ktutorial/ktutorial-library/test/TutorialTest.cpp
Modified: trunk/ktutorial/ktutorial-library/src/Tutorial.cpp
===================================================================
--- trunk/ktutorial/ktutorial-library/src/Tutorial.cpp 2010-02-13 19:41:09 UTC (rev 90)
+++ trunk/ktutorial/ktutorial-library/src/Tutorial.cpp 2010-02-23 06:28:13 UTC (rev 91)
@@ -87,6 +87,7 @@
void Tutorial::finish() {
if (mCurrentStep != 0) {
mCurrentStep->setActive(false);
+ mCurrentStep = 0;
}
tearDown();
Modified: trunk/ktutorial/ktutorial-library/test/TutorialTest.cpp
===================================================================
--- trunk/ktutorial/ktutorial-library/test/TutorialTest.cpp 2010-02-13 19:41:09 UTC (rev 90)
+++ trunk/ktutorial/ktutorial-library/test/TutorialTest.cpp 2010-02-23 06:28:13 UTC (rev 91)
@@ -350,6 +350,7 @@
tutorial.start();
tutorial.finish();
+ QCOMPARE(tutorial.mCurrentStep, (Step*)0);
QVERIFY(!stepStart->isActive());
QCOMPARE(finishedSpy.count(), 1);
QCOMPARE(tutorial.mTearDownCount, 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|