Hey Guys,
I got a QByteArray containing some data. I distinguish different kinds of data via key characters which I prepend with a '&' character. Currently the data QByteArray only contians something like this: data = "&t02.04.2014".
QList<QByteArray> cmdList = data.split('&');
if(cmdList.size() != data.count('&')) dispError("Command List size != number of '&'");
//At this point the cmdList contains 2 elments where the first one is empty (presuming the data array is like noted above.
//do fancy stuff with the data
}
void foo(QByteArray data){
QList<QByteArray> cmdList = data.split('&');
if(cmdList.size() != data.count('&')) dispError("Command List size != number of '&'");
//At this point the cmdList contains 2 elments where the first one is empty (presuming the data array is like noted above.
//do fancy stuff with the data
}
To copy to clipboard, switch view to plain text mode
I don't quite understand why there are two elments in the QList as I am only expecting one.
Bookmarks