Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 8

Qt-interest Archive, March 2002
Qt 3.0.3 bug


Message 1 in thread

Hi All!

It seems i found a bug in Qt 3.0.3. Please, see the code below, which
produces crash:

	int numberOfElements = 1;
	QProgressDialog progress( "Copying files...", "Abort Copy",
numberOfElements,
		this, "progress", TRUE );
	progress.setMinimumDuration(0);
	for ( int i = 0; i < numberOfElements; i++ ) {
		progress.setProgress( i );
		qApp->processEvents();

		if ( progress.wasCancelled() )
			break;
	}
As far as i understood the bug is in qcommonstyle.cpp, line 734:

tnu = nu = p_v * u / (t_s - 1);

It's rare bug because Progress dialog is used mainly for long sequences, but
sometimes sequences we process contain just one element and then this bug
appears.

Best regards,
Dmytro Ivanets