mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
remove risky qApp->processEvents() call (#6161)
This commit is contained in:
parent
711eddcf8a
commit
cf35affedc
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user