[Ktutorial-commits] SF.net SVN: ktutorial:[99] trunk/ktutorial/ktutorial-library/src/tutorials
Status: Alpha
Brought to you by:
danxuliu
From: <dan...@us...> - 2010-02-23 17:44:49
|
Revision: 99 http://ktutorial.svn.sourceforge.net/ktutorial/?rev=99&view=rev Author: danxuliu Date: 2010-02-23 17:44:42 +0000 (Tue, 23 Feb 2010) Log Message: ----------- Delete the QTextEdit created by the tutorial when it is finished if the QTextEdit is still alive (this happens when the user closes the tutorial before closing the QTextEdit). Modified Paths: -------------- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.h Modified: trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp 2010-02-23 17:42:05 UTC (rev 98) +++ trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp 2010-02-23 17:44:42 UTC (rev 99) @@ -403,5 +403,15 @@ nextStep("end"); } +//protected: + +void UsingKTutorial::tearDown() { + QTextEdit* textEdit = KTutorial::self()->findObject<QTextEdit*>( + "usingKTutorialTextEdit"); + if (textEdit) { + textEdit->deleteLater(); + } +} + #include "moc_UsingKTutorial.cpp" #include "UsingKTutorial.moc" Modified: trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.h =================================================================== --- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.h 2010-02-23 17:42:05 UTC (rev 98) +++ trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.h 2010-02-23 17:44:42 UTC (rev 99) @@ -47,6 +47,10 @@ void moveWidgetReleaseDone(); +protected: + + void tearDown(); + }; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |