mirror of
https://invent.kde.org/graphics/okular
synced 2024-07-17 02:37:04 +00:00
limit the scope of the text cursor, so it's deleted before the mutex unlock
svn path=/trunk/KDE/kdegraphics/okular/; revision=805246
This commit is contained in:
parent
5c09d64596
commit
6cf2d5786e
|
@ -68,6 +68,7 @@ Okular::TextPage* TextDocumentGeneratorPrivate::createTextPage( int pageNumber )
|
|||
#endif
|
||||
Utils::calculatePositions( mDocument, pageNumber, start, end );
|
||||
|
||||
{
|
||||
QTextCursor cursor( mDocument );
|
||||
for ( int i = start; i < end - 1; ++i ) {
|
||||
cursor.setPosition( i );
|
||||
|
@ -83,6 +84,7 @@ Okular::TextPage* TextDocumentGeneratorPrivate::createTextPage( int pageNumber )
|
|||
textPage->append( text, new Okular::NormalizedRect( rect.left(), rect.top(), rect.right(), rect.bottom() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef OKULAR_TEXTDOCUMENT_THREADED_RENDERING
|
||||
q->userMutex()->unlock();
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue