25 #include <HbParameterLengthLimiter> |
25 #include <HbParameterLengthLimiter> |
26 |
26 |
27 #include <QScopedPointer> |
27 #include <QScopedPointer> |
28 #include <QStandardItemModel> |
28 #include <QStandardItemModel> |
29 #include <QStandardItem> |
29 #include <QStandardItem> |
|
30 #include <QStateMachine> |
30 #include <casoftwareregistry.h> |
31 #include <casoftwareregistry.h> |
31 #include <caquery.h> |
32 #include <caquery.h> |
32 #include <canotifier.h> |
33 #include <canotifier.h> |
33 |
34 |
34 #include "hsuninstallitemstate.h" |
35 #include "hsuninstallitemstate.h" |
35 #include "hsmenuevent.h" |
36 #include "hsmenuevent.h" |
36 #include "hsmenudialogfactory.h" |
37 #include "hsmenudialogfactory.h" |
37 #include "hsmenuentryremovedhandler.h" |
38 #include "hsmenuentryremovedhandler.h" |
|
39 #include "hsmenueventfactory.h" |
|
40 |
38 /*! |
41 /*! |
39 \class HsUninstallItemState |
42 \class HsUninstallItemState |
40 \ingroup group_hsworkerstateplugin |
43 \ingroup group_hsworkerstateplugin |
41 \brief Uninstall Item State. |
44 \brief Uninstall Item State. |
42 Deletes app from collection. |
45 Deletes app from collection. |
109 \retval void |
112 \retval void |
110 */ |
113 */ |
111 void HsUninstallItemState::uninstallMessageFinished(HbAction* finishedAction) |
114 void HsUninstallItemState::uninstallMessageFinished(HbAction* finishedAction) |
112 { |
115 { |
113 if (static_cast<QAction*>(finishedAction) == mConfirmAction) { |
116 if (static_cast<QAction*>(finishedAction) == mConfirmAction) { |
114 HsMenuService::executeAction(mItemId, Hs::removeActionIdentifier); |
117 |
|
118 HsMenuService::executeAction(mItemId, Hs::removeActionIdentifier, |
|
119 this, SLOT(uninstallFailed(int))); |
115 } |
120 } |
116 mConfirmAction = NULL; |
121 mConfirmAction = NULL; |
117 mUninstallMessage = NULL; |
122 mUninstallMessage = NULL; |
118 mUninstallJavaMessage = NULL; |
123 mUninstallJavaMessage = NULL; |
119 emit exit(); |
124 emit exit(); |
184 } |
189 } |
185 |
190 |
186 mConfirmAction = NULL; |
191 mConfirmAction = NULL; |
187 mItemId = 0; |
192 mItemId = 0; |
188 } |
193 } |
|
194 |
|
195 #ifdef COVERAGE_MEASUREMENT |
|
196 #pragma CTC SKIP |
|
197 #endif //COVERAGE_MEASUREMENT (only returns HbMainWindow) |
|
198 /*! |
|
199 Slot invoked when unninstallation failed. |
|
200 \param error Uninstallation error. |
|
201 \retval void |
|
202 */ |
|
203 void HsUninstallItemState::uninstallFailed(int error) |
|
204 { |
|
205 machine()->postEvent( |
|
206 HsMenuEventFactory::createUninstallFailedEvent(error)); |
|
207 } |
|
208 #ifdef COVERAGE_MEASUREMENT |
|
209 #pragma CTC ENDSKIP |
|
210 #endif //COVERAGE_MEASUREMENT |
189 |
211 |
190 /*! |
212 /*! |
191 Method create uninstall confirmation message. |
213 Method create uninstall confirmation message. |
192 \retval void |
214 \retval void |
193 */ |
215 */ |