Do not duplicate the noDialogs storage in two structs

This commit is contained in:
Albert Astals Cid 2014-05-10 10:09:38 +02:00
parent 3c3d4373ab
commit c8697989a1
2 changed files with 1 additions and 3 deletions

View file

@ -1662,7 +1662,7 @@ void DocumentPrivate::doContinueDirectionMatchSearch(void *doContinueDirectionMa
if ( searchStruct->currentPage >= pageCount || searchStruct->currentPage < 0 )
{
const QString question = forward ? i18n("End of document reached.\nContinue from the beginning?") : i18n("Beginning of document reached.\nContinue from the bottom?");
if ( searchStruct->noDialogs || KMessageBox::questionYesNo(m_widget, question, QString(), KStandardGuiItem::cont(), KStandardGuiItem::cancel()) == KMessageBox::Yes )
if ( search->cachedNoDialogs || KMessageBox::questionYesNo(m_widget, question, QString(), KStandardGuiItem::cont(), KStandardGuiItem::cancel()) == KMessageBox::Yes )
searchStruct->currentPage = forward ? 0 : pageCount - 1;
else
doContinue = false;
@ -3360,7 +3360,6 @@ void Document::searchText( int searchID, const QString & text, bool fromStart, Q
searchStruct->match = match;
searchStruct->currentPage = currentPage;
searchStruct->searchID = searchID;
searchStruct->noDialogs = noDialogs;
searchStruct->pagesDone = pagesDone;
QMetaObject::invokeMethod(this, "doContinueDirectionMatchSearch", Qt::QueuedConnection, Q_ARG(void *, searchStruct));

View file

@ -71,7 +71,6 @@ struct DoContinueDirectionMatchSearchStruct
RegularAreaRect *match;
int currentPage;
int searchID;
bool noDialogs;
int pagesDone;
};