[Qt-interest] QByteArray bug?
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Fri Jul 10 21:48:21 CEST 2009
Ok... I misunderstood when you said it it only happened in a method, I
wanted to test if it was a assignment operator bug, since the other "it
works for me" were doing everything in the same scope
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Scott Aron Bloom
Sent: Friday, July 10, 2009 12:41 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] QByteArray bug?
It only fails if its in a method - the way you tried it works fine.
I'll see if I can post sample code ...
Frank
---------
I tried the following and it worked fine
#include <QApplication>
#include <QByteArray>
#include <QDebug>
QByteArray getData (int len)
{
QByteArray arr;
arr.resize (len);
arr.data ();
return arr;
}
int main( int argc, char ** argv )
{
QByteArray arr = getData( 0 );
qDebug ("arr size: %i", arr.size ());
return 0;
}
Though it was not on 4.5, it was using 4.4.3
One thing.. is it possible, that you're my array class is going out of
scope?
Scott
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list