--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hscollectionstate.cpp Wed Jun 23 18:03:36 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hscollectionstate.cpp Tue Jul 06 14:06:53 2010 +0300
@@ -121,7 +121,7 @@
HsMenuModeWrapper &menuMode,
HsMainWindow &mainWindow,
QState *parent) :
- QState(parent),
+ HsBaseViewState(parent),
mSortAttribute(LatestOnTopHsSortAttribute),
mCollectionsSortAttribute(CustomHsSortAttribute),
mCollectionId(-1),
@@ -309,12 +309,16 @@
this, SLOT(updateLabel()));
delete mCollectionModel;
mCollectionModel = NULL;
+ mOptions->close();
delete mOptions;
mOptions = NULL;
if (mContextMenu)
mContextMenu->close();
+ this->mSortAttribute = NoHsSortAttribute;
+
+ HsBaseViewState::stateExited();
+
HSMENUTEST_FUNC_EXIT("HsCollectionState::stateExited");
- this->mSortAttribute = NoHsSortAttribute;
qDebug("CollectionState::stateExited()");
}
@@ -389,7 +393,10 @@
}
} else {
QVariant data = mCollectionModel->data(index, CaItemModel::IdRole);
- HsMenuService::executeAction(data.toInt());
+ int errCode = HsMenuService::executeAction(data.toInt());
+ if (errCode != 0) {
+ createApplicationLaunchFailMessage(errCode,index.data(CaItemModel::IdRole).toInt());
+ }
}
mMenuView.setSearchPanelVisible(false);
@@ -560,7 +567,8 @@
void HsCollectionState::addCollectionShortcutToHomeScreenAction()
{
machine()->postEvent(HsMenuEventFactory::createAddToHomeScreenEvent(
- mCollectionId, mMenuMode.getHsMenuMode()));
+ mCollectionId, mMenuMode.getHsMenuMode(),
+ mMenuMode.getHsToken()));
}
/*!
@@ -615,7 +623,7 @@
machine()->postEvent(
HsMenuEventFactory::createAddToHomeScreenEvent(
- entry->id(), mMenuMode.getHsMenuMode()));
+ entry->id(), mMenuMode.getHsMenuMode(), mMenuMode.getHsToken()));
}
/*!