Revision: 264
http://ktutorial.svn.sourceforge.net/ktutorial/?rev=264&view=rev
Author: danxuliu
Date: 2010-09-28 20:55:26 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
Fix the StepWidget not being deleted when the tutorial fails to start.
Modified Paths:
--------------
trunk/ktutorial/ktutorial-library/src/KTutorial.cpp
Modified: trunk/ktutorial/ktutorial-library/src/KTutorial.cpp
===================================================================
--- trunk/ktutorial/ktutorial-library/src/KTutorial.cpp 2010-09-27 16:17:07 UTC (rev 263)
+++ trunk/ktutorial/ktutorial-library/src/KTutorial.cpp 2010-09-28 20:55:26 UTC (rev 264)
@@ -114,6 +114,12 @@
connect(tutorial, SIGNAL(stepActivated(Step*)),
stepWidget, SLOT(setStep(Step*)));
connect(stepWidget, SIGNAL(finished()), tutorial, SLOT(finish()));
+ //Invalid tutorials finish just after being started. Deleting the StepWidget
+ //when the tutorial finishes ensures that it is deleted in those cases and,
+ //as deleteLater() is used, it does not interfere with the deletion when the
+ //StepWidget is closed by the user.
+ connect(tutorial, SIGNAL(finished(Tutorial*)),
+ stepWidget, SLOT(deleteLater()));
}
void KTutorial::disableTutorialsAction() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|