--- a/messagingapp/shareui/src/shareuiprivate.cpp Thu Jun 17 09:57:06 2010 +0100
+++ b/messagingapp/shareui/src/shareuiprivate.cpp Thu Jul 22 16:32:06 2010 +0100
@@ -69,7 +69,6 @@
*/
ShareUiPrivate::~ShareUiPrivate()
{
- reset();
}
/**
@@ -80,13 +79,12 @@
mFileList.clear();
mIndexActionMap.clear();
+ foreach(XQAiwRequest* request,mAiwRequestList)
+ {
+ delete request;
+ }
mAiwRequestList.clear();
- if ( mSharePopup )
- {
- delete mSharePopup;
- mSharePopup = 0;
- }
}
/**
@@ -99,7 +97,7 @@
bool ShareUiPrivate::init(QStringList& fileList, bool embedded)
{
reset();
-
+ mIsEmbedded = embedded;
// No input files
if ( fileList.count() == 0 )
{
@@ -130,6 +128,7 @@
if ( fileList.count() != filteredFileList.count() )
{
showNote(LOC_PROTECTED_CONTENT);
+ return true;
}
// Only protected content
@@ -210,9 +209,10 @@
mSharePopup->setAttribute( Qt::WA_DeleteOnClose, true );
HbTextItem* heading = new HbTextItem(LOC_SEND_SELECTED_ITEM, mSharePopup);
heading->setAlignment(Qt::AlignCenter);
- mSharePopup->setDismissPolicy(HbDialog::NoDismiss);
+ mSharePopup->setDismissPolicy(HbDialog::TapAnywhere);
mSharePopup->setHeadingWidget(heading);
mSharePopup->setFrameType(HbDialog::Strong);
+ connect(mSharePopup, SIGNAL(aboutToClose()), this, SLOT(reset()));
// Content widget
mContentListView = new HbListView(mSharePopup);
@@ -273,6 +273,7 @@
*/
void ShareUiPrivate::onTriggered(void)
{
+
XQAiwRequest* request = 0;
request = qobject_cast<XQAiwRequest*>(sender());
if(request)
@@ -280,6 +281,7 @@
QList<QVariant> args;
QVariant fileList(mFileList);
args << fileList;
+ request->setEmbedded(mIsEmbedded);
request->setArguments(args);
}
}
@@ -288,9 +290,19 @@
* Slot for handling valid returns from the framework.
*/
void ShareUiPrivate::handleOk(const QVariant& result)
- {
+{
Q_UNUSED(result)
+
+ XQAiwRequest* request = 0;
+ request = qobject_cast<XQAiwRequest*>(sender());
+ if(request)
+ {
+ disconnect(request,
+ SIGNAL(requestError(int,const QString&)),
+ this,
+ SLOT(handleError(int,const QString&)));
}
+}
/**
* Slot for handling errors from the framework.
@@ -319,7 +331,8 @@
{
action->setEnabled(true);
action->activate(HbAction::Trigger);
- }
+ }
+
mSharePopup->close();
}