qtmobility/examples/writemessage/messagesender.cpp
branchGCC_SURGE
changeset 17 6745d806c5ff
parent 11 06b8e2af4411
--- a/qtmobility/examples/writemessage/messagesender.cpp	Mon Jun 21 22:38:54 2010 +0100
+++ b/qtmobility/examples/writemessage/messagesender.cpp	Thu Jul 22 16:42:52 2010 +0100
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -329,10 +329,11 @@
 //! [add-attachments]
 
 //! [send-message]
+    sendButton->setEnabled(false);
     if (service.send(message)) {
-        sendButton->setEnabled(false);
         sendId = message.id();
     } else {
+        sendButton->setEnabled(true);
         QMessageBox::warning(0, tr("Failed"), tr("Unable to send message"));
     }
 //! [send-message]