From 15eb104d75e3cd6cc22b958c994773af53f78ec0 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 23 Jun 2013 18:42:56 +0200 Subject: [PATCH] Don't preload pages if the generator is not Threaded BUG: 318048 FIXED-IN: 4.10.5 --- core/document.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/document.cpp b/core/document.cpp index 39a481749..2f0a41de8 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -1056,8 +1056,14 @@ void DocumentPrivate::sendGeneratorPixmapRequest() QRect requestRect = r->isTile() ? r->normalizedRect().geometry( r->width(), r->height() ) : QRect( 0, 0, r->width(), r->height() ); TilesManager *tilesManager = ( r->id() == PAGEVIEW_ID ) ? r->page()->d->tilesManager() : 0; - // request only if page isn't already present or request has invalid id - if ( ( !r->d->mForce && r->page()->hasPixmap( r->id(), r->width(), r->height(), r->normalizedRect() ) ) || r->id() <= 0 || r->id() >= MAX_OBSERVER_ID ) + // If it's a preload but the generator is not threaded no point in trying to preload + if ( r->d->isPreload() && !m_generator->hasFeature( Generator::Threaded ) ) + { + m_pixmapRequestsStack.pop_back(); + delete r; + } + // request only if page isn't already present and request has valid id + else if ( ( !r->d->mForce && r->page()->hasPixmap( r->id(), r->width(), r->height(), r->normalizedRect() ) ) || r->id() <= 0 || r->id() >= MAX_OBSERVER_ID ) { m_pixmapRequestsStack.pop_back(); delete r;