Fix GenCertDialog on Mac stay on.

Only call processEvent() if hasPendingEvents().
If no events are available, this function will wait until more are
available and return after processing newly available events.
This commit is contained in:
Phenom 2016-02-12 17:54:35 +01:00
parent 4033f35fa9
commit 3ebb8c6ce8

View File

@ -532,7 +532,9 @@ void GenCertDialog::genPerson()
setCursor(Qt::WaitCursor) ;
QCoreApplication::processEvents();
while(QAbstractEventDispatcher::instance()->processEvents(QEventLoop::AllEvents)) ;
QAbstractEventDispatcher* ed = QAbstractEventDispatcher::instance();
if (ed->hasPendingEvents())
while(ed->processEvents(QEventLoop::AllEvents));
std::string email_str = "" ;
RsAccounts::GeneratePGPCertificate(