On segunda-feira, 20 de agosto de 2012 10.14.07, Thiago Macieira wrote:
> On segunda-feira, 20 de agosto de 2012 12.01.59, Konstantin Tokarev wrote:
> > Hi all,
> >
> > Is there a safe way to get char * from QByteArray which is not destroyed
> > when original QByteArray is destroyed?
> >
> > I'm thinking about something like
> >
> > QByteArray ba = ...;
> > char *data = ba.data();
> > ba.data() = '\0';
>
> That is safe.

Oh, I misread what you said.

You want to keep a copy when the original *is* destroyed. I read "while it
isn't" somehow.

Like Lars said, make your own copy.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to