Really exclude user input while doing the sync loading of the HTML documents.

(And disable/enable a connection correctly.)
BUG: 178539

svn path=/trunk/KDE/kdegraphics/okular/; revision=920831
remotes/origin/old/work/record-presentation
Pino Toscano 17 years ago
parent 7cf332a943
commit 43276feebc
  1. 8
      generators/chm/generator_chm.cpp

@ -125,8 +125,8 @@ bool CHMGenerator::loadDocument( const QString & fileName, QVector< Okular::Page
if (!m_syncGen)
{
m_syncGen = new KHTMLPart();
connect (m_syncGen,SIGNAL(completed()),this,SLOT(slotCompleted()));
}
disconnect( m_syncGen, 0, this, 0 );
for (int i = 0; i < m_pageUrl.count(); ++i)
{
@ -135,6 +135,8 @@ bool CHMGenerator::loadDocument( const QString & fileName, QVector< Okular::Page
m_syncGen->view()->contentsHeight(), Okular::Rotation0 );
}
connect( m_syncGen, SIGNAL( completed() ), this, SLOT( slotCompleted() ) );
return true;
}
@ -167,7 +169,9 @@ void CHMGenerator::preparePageForSyncOperation( int zoom , const QString & url)
QEventLoop loop;
connect( m_syncGen, SIGNAL( completed() ), &loop, SLOT( quit() ) );
loop.exec();
// discard any user input, otherwise it breaks the "synchronicity" of this
// function
loop.exec( QEventLoop::ExcludeUserInputEvents );
}
void CHMGenerator::slotCompleted()

Loading…
Cancel
Save