Skip to content

Commit

Permalink
remove risky qApp->processEvents() call (#6161)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 24, 2018
1 parent 711eddc commit cf35aff
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/app/qgisapp.cpp
Expand Up @@ -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();
}
}

}
}

Expand Down

0 comments on commit cf35aff

Please sign in to comment.