Hi.

I found that next code:

//! Load images future watcher.
QFutureWatcher< QImage > * futureWatcher;
//! Current index for loading image.
int currentLoadImageIndex;
//! Future.
QFuture< QImage > future;

QImage loadImage( const QString & fileName, const QSize & maxSize )
{
        QImage image( fileName );

        if( !image.isNull() )
        {
                image = image.scaled( maxSize, Qt::KeepAspectRatio,
                        Qt::SmoothTransformation );
        }

        return image;
}

void
WindowPrivate::loadImages()
{
        currentLoadImageIndex = 0;

        if( !imageFiles.isEmpty() )
        {
                future = QtConcurrent::run( loadImage,
                        imageFiles.at( currentLoadImageIndex ),
                        imageList->maxImageSize() );
                futureWatcher->setFuture( future );
        }
}

void
Window::_q_imageLoaded()
{
        QImage image = d->future.result();

        d->imageList->model()->setData( d->currentLoadImageIndex, image );

        ++d->currentLoadImageIndex;

        if( d->currentLoadImageIndex < d->imageList->model()->rowCount() )
        {
                d->future = QtConcurrent::run( loadImage,
                        d->imageFiles.at( d->currentLoadImageIndex ),
                        d->imageList->maxImageSize() );

                d->futureWatcher->setFuture( d->future );
        }
}

Produces QBuffer::seek warning like this:

QBuffer::seek: Invalid pos: -583168116
QBuffer::seek: Invalid pos: -1123415015

etc...

What is it? Should I care about it?

Thank you.

P.S. I don't use QBuffer anywhere in the application. This warnings is Qt  
internal warnings...

-- 
Best Regards,
Igor Mironchik.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to