From 3d0c7be90ce4d8e8c8643867b4449ba98571a3f2 Mon Sep 17 00:00:00 2001 From: ruglory Date: Sat, 31 Jan 2009 04:26:13 +0000 Subject: [PATCH] Bug with empty document crash fixed git-svn-id: https://svn.code.sf.net/p/qlscribe/svn/trunk@35 cac9541e-1b8d-4bfa-827e-589bba606050 --- src/qdialogprogress.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qdialogprogress.cpp b/src/qdialogprogress.cpp index 51800ad..3ff6148 100644 --- a/src/qdialogprogress.cpp +++ b/src/qdialogprogress.cpp @@ -107,7 +107,7 @@ void QDialogProgress::onLabelProgress( long current, long final ) m_ui->progressPrinting->setMaximum( final ); m_ui->progressPrinting->setValue( current ); - if( current && double( current ) / final > 0.1 ) { + if( current && final / double( current ) < 10.0 ) { int elapsed = m_start->elapsed(); int estimate = double( elapsed ) / current * final; m_ui->timeEstimated->setTime( QTime().addMSecs( estimate ) );