kio_mhtml: QGArray::at: Absolute index XXXXX out of range

Leo Savernik l.savernik at aon.at
Mon Dec 13 15:03:41 GMT 2004


Am Montag, 13. Dezember 2004 15:13 schrieb Spiros Georgaras:
> QCString KmhtmlArchive::getFileContents(int id){
>         if(items==0 || id>items){
>                 kdDebug() << "[KmhtmlArchive::getFileContents] returning
> null" << endl; return QCString("");
>         }
>         kdDebug() << "[KmhtmlArchive::getFileContents]: item[id].itStart="
> << item[id].itStart << ", item[id].end=" <<  item[id].end << endl;
>         return f.mid(item[id].itStart,item[id].end-item[id].itStart);
> }

Are those ids consecutive in range? If they are arbitrary, you should use a 
QPtrDict.

mfg
 Leo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20041213/cc6f4d45/attachment.sig>


More information about the kfm-devel mailing list