Skip to content
Permalink
Browse files

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

  • Loading branch information
nirvn committed Jan 24, 2018
1 parent 711eddc commit cf35affedcb93f7ef560397b52fc932838cacb04
Showing with 0 additions and 17 deletions.
  1. +0 −17 src/app/qgisapp.cpp
@@ -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();
}
}

}
}

0 comments on commit cf35aff

Please sign in to comment.
You can’t perform that action at this time.