SVN commit 1097341 by mludwig: - Ensure that the parser progress bar is shown during the parsing of BibTeX files. - Show a busy cursor during parsing. M +12 -2 documentinfo.cpp M +2 -0 kile.cpp --- trunk/extragear/office/kile/src/documentinfo.cpp #1097340:1097341 @@ -1081,7 +1081,7 @@ for(int i = 0; i < m_doc->lines(); ++i) { emit(parsingUpdate(i)); if (teller > 100) { - teller=0; + teller = 0; kapp->processEvents(QEventLoop::ExcludeUserInputEvents); } else { @@ -1405,8 +1405,18 @@ QString s, key; int col = 0, startcol, startline = 0; + int teller = 0; + emit(parsingStarted(m_doc->lines())); for(int i = 0; i < m_doc->lines(); ++i) { + emit(parsingUpdate(i)); + if (teller > 200) { + teller = 0; + kapp->processEvents(QEventLoop::ExcludeUserInputEvents); + } + else { + ++teller; + } s = m_doc->line(i); if((s.indexOf(reItem) != -1) && !reSpecial.exactMatch(reItem.cap(2).toLower())) { KILE_DEBUG() << "found: " << reItem.cap(2); @@ -1459,7 +1469,7 @@ } } } - + emit(parsingCompleted()); emit(doneUpdating()); setDirty(false); } --- trunk/extragear/office/kile/src/kile.cpp #1097340:1097341 @@ -2856,6 +2856,7 @@ void Kile::parsingStarted(int maxValue) { + kapp->setOverrideCursor(QCursor(Qt::WaitCursor)); m_parserProgressBar->reset(); m_parserProgressBar->setRange(0, maxValue); m_parserProgressBar->setValue(0); @@ -2866,6 +2867,7 @@ { m_parserProgressBarShowTimer->stop(); m_parserProgressBar->hide(); + kapp->restoreOverrideCursor(); } #include "kile.moc"