From 6bf6b14f3c79ea15b86ab094cd85a689873a384c Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sat, 10 May 2014 10:04:47 +0200 Subject: [PATCH] Do not reset the search if it's a different search id Doesn't make any sense, why would we want a "running searches map" if we always reset the previous one? BUGS: 334568 FIXED-IN: 4.13.2 --- core/document.cpp | 5 ----- core/document_p.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/core/document.cpp b/core/document.cpp index f745f891c..49f5d7b04 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -3320,11 +3320,6 @@ void Document::searchText( int searchID, const QString & text, bool fromStart, Q search->continueOnPage = -1; searchIt = d->m_searches.insert( searchID, search ); } - if (d->m_lastSearchID != searchID) - { - resetSearch(d->m_lastSearchID); - } - d->m_lastSearchID = searchID; RunningSearch * s = *searchIt; // update search structure diff --git a/core/document_p.h b/core/document_p.h index 025f705d0..3010428dc 100644 --- a/core/document_p.h +++ b/core/document_p.h @@ -85,7 +85,6 @@ class DocumentPrivate public: DocumentPrivate( Document *parent ) : m_parent( parent ), - m_lastSearchID( -1 ), m_tempFile( 0 ), m_docSize( -1 ), m_allocatedPixmapsTotalMemory( 0 ), @@ -195,7 +194,6 @@ class DocumentPrivate // find descriptors, mapped by ID (we handle multiple searches) QMap< int, RunningSearch * > m_searches; - int m_lastSearchID; bool m_searchCancelled; // needed because for remote documents docFileName is a local file and