diff options
author | Patrick Burke <patrick.burke@nokia.com> | 2011-04-14 14:26:35 +1000 |
---|---|---|
committer | Eckhart Koppen <eckhart.koppen@nokia.com> | 2011-04-20 09:37:36 +0300 |
commit | c61d909c7b815319e40ba27d7f84e92aa5f1f946 (patch) | |
tree | 940cb81c8e802fc98357a0dadad032b776034dfa | |
parent | b7095ed0b3eebf390243709ec9dfb7493982a8af (diff) |
Correctly error when attempt to send SMS messages on Meego.com (QTMOBILITY-1394)
-rw-r--r-- | src/messaging/qmessageservice.cpp | 2 | ||||
-rw-r--r-- | src/messaging/qmessageservice_qmf.cpp | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/messaging/qmessageservice.cpp b/src/messaging/qmessageservice.cpp index 7982ab6800..aeff84d985 100644 --- a/src/messaging/qmessageservice.cpp +++ b/src/messaging/qmessageservice.cpp @@ -210,6 +210,8 @@ QTM_BEGIN_NAMESPACE action object enters the FinishedState when the message is queued for sending rather than actually sent. + On the MeeGo.com platform this function is not yet supported for SMS type messages. + Returns true if the operation can be initiated; otherwise returns false. \sa QMessage, QMessageAccountId diff --git a/src/messaging/qmessageservice_qmf.cpp b/src/messaging/qmessageservice_qmf.cpp index e1907d7a21..ac8648adf0 100644 --- a/src/messaging/qmessageservice_qmf.cpp +++ b/src/messaging/qmessageservice_qmf.cpp @@ -449,6 +449,15 @@ bool QMessageService::send(QMessage &message) // Mark this message as outgoing msg->setStatus(QMailMessage::Outbox, true); +#ifdef Q_WS_MEEGO + QMessageAccount account(message.parentAccountId()); + if (account.messageTypes() & QMessage::Sms) { + d_ptr->_error = QMessageManager::FrameworkFault; + qWarning() << "Sending SMS is not supported on this platform."; + return false; + } +#endif + if (msg->id().isValid()) { // Update the message if (!mailStoreInstance()->updateMessage(msg)) { |