[Interest] [External] iOS QByteArray to NSMutableData ?

Edward Sutton edward.sutton at subsite.com
Wed Sep 2 18:55:55 CEST 2015


Never mind. Sorry.


qint64 AccessoryManager::writeData(const QByteArray &data)

{

    if(0 >= data.count())

    {

        return 0;

    }


    if (this->d_ptr->writeData == nil) {

        this->d_ptr->writeData = [[NSMutableData alloc] init];

    }


    // Append data to write to _writeData buffer

    [this->d_ptr->writeData appendData:data.toNSData()];


-Ed



On Sep 2, 2015, at 11:54 AM, Edward Sutton <edward.sutton at subsite.com<mailto:edward.sutton at subsite.com>> wrote:

*External Message - use caution*

How can I assign a QByteArray to NSMutableData ?


qint64 AccessoryManager::writeData(const QByteArray &data)

{

    if(0 >= data.count())

    {

        return 0;

    }


    if (this->d_ptr->writeData == nil) {

        this->d_ptr->writeData = [[NSMutableData alloc] init];

    }


    // Append data to write to _writeData buffer

    [this->d_ptr->writeData appendData:data.toCFData()];


-Ed


This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
_______________________________________________
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest

This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150902/98ebcdef/attachment.html>


More information about the Interest mailing list