remove risky qApp->processEvents() call (#6161)

This commit is contained in:
Mathieu Pellerin 2018-01-24 23:29:33 +07:00 committed by GitHub
parent 711eddcf8a
commit cf35affedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11091,23 +11091,6 @@ void QgisApp::showProgress( int progress, int totalSteps )
}
mProgressBar->setMaximum( totalSteps );
mProgressBar->setValue( progress );
if ( mProgressBar->maximum() == 0 )
{
// for busy indicator (when minimum equals to maximum) the oxygen Qt style (used in KDE)
// has some issues and does not start busy indicator animation. This is an ugly fix
// that forces creation of a temporary progress bar that somehow resumes the animations.
// Caution: looking at the code below may introduce mild pain in stomach.
if ( strcmp( QApplication::style()->metaObject()->className(), "Oxygen::Style" ) == 0 )
{
QProgressBar pb;
pb.setAttribute( Qt::WA_DontShowOnScreen ); // no visual annoyance
pb.setMaximum( 0 );
pb.show();
qApp->processEvents();
}
}
}
}