qtmobility/src/messaging/qmessageid_win.cpp
changeset 5 453da2cfceef
parent 1 2b40d63a9c3d
child 8 71781823f776
equal deleted inserted replaced
4:90517678cc4f 5:453da2cfceef
   178 }
   178 }
   179 
   179 
   180 QMessageId::QMessageId(const QString& id)
   180 QMessageId::QMessageId(const QString& id)
   181     : d_ptr(new QMessageIdPrivate(this))
   181     : d_ptr(new QMessageIdPrivate(this))
   182 {
   182 {
   183     QDataStream idStream(QByteArray::fromBase64(id.toLatin1()));
   183 	QDataStream idStream(QByteArray::fromBase64(WinHelpers::stripIdPrefix(id).toLatin1()));
   184 
   184 
   185 #ifdef _WIN32_WCE
   185 #ifdef _WIN32_WCE
   186     idStream >> d_ptr->_entryId;
   186     idStream >> d_ptr->_entryId;
   187 #else
   187 #else
   188     idStream >> d_ptr->_messageRecordKey;
   188     idStream >> d_ptr->_messageRecordKey;
   288     encodedIdStream << d_ptr->_messageRecordKey;
   288     encodedIdStream << d_ptr->_messageRecordKey;
   289 #endif
   289 #endif
   290     encodedIdStream << d_ptr->_folderRecordKey;
   290     encodedIdStream << d_ptr->_folderRecordKey;
   291     encodedIdStream << d_ptr->_storeRecordKey;
   291     encodedIdStream << d_ptr->_storeRecordKey;
   292 
   292 
   293     return encodedId.toBase64();
   293 	return WinHelpers::addIdPrefix(encodedId.toBase64());
   294 }
   294 }
   295 
   295 
   296 bool QMessageId::isValid() const
   296 bool QMessageId::isValid() const
   297 {
   297 {
   298     return (d_ptr && !d_ptr->_storeRecordKey.isEmpty() && !d_ptr->_entryId.isEmpty());
   298     return (d_ptr && !d_ptr->_storeRecordKey.isEmpty() && !d_ptr->_entryId.isEmpty());