homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp Thu May 27 12:46:08 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp Fri Jun 11 13:30:16 2010 +0300
@@ -66,9 +66,6 @@
Sets entry event.
\param event entry event.
*/
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
void HsDeleteCollectionItemState::onEntry(QEvent *event)
{
HSMENUTEST_FUNC_ENTRY("HsDeleteCollectionItemState::onEntry");
@@ -102,26 +99,18 @@
HSMENUTEST_FUNC_EXIT("HsDeleteCollectionItemState::onEntry");
}
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-//
+/*!
+ Action after closed confirmation dialog.
+ \param finishedAction chosen action.
+ \retval void
+ */
void HsDeleteCollectionItemState::deleteMessageFinished(HbAction* finishedAction)
{
- if (mItemId !=0 ) { // (work-around for crash if more then one action is selected in HbDialog)
-
- if (finishedAction == mConfirmAction) {
- HsMenuService::removeApplicationFromCollection(mItemId, mCollectionId);
- }
- mItemId = 0;
- emit exit();
- } else {
- // (work-around for crash if more then one action is selected in HbDialog)
- qWarning("Another signal finished was emited.");
+ if (finishedAction == mConfirmAction) {
+ HsMenuService::removeApplicationFromCollection(mItemId, mCollectionId);
}
+ emit exit();
}
/*!
@@ -132,11 +121,12 @@
{
// Close messagebox if App key was pressed
if (mDeleteMessage) {
+ disconnect(mDeleteMessage, SIGNAL(finished(HbAction*)), this, SLOT(deleteMessageFinished(HbAction*)));
mDeleteMessage->close();
+ mDeleteMessage = NULL;
}
-
- mDeleteMessage = NULL;
- mConfirmAction= NULL;
+
+ mConfirmAction = NULL;
mItemId = 0;
mCollectionId = 0;
}