refs #787, MS review items + discussion on slack

https://dev.vatsim-germany.org/issues/787#note-4
This commit is contained in:
Klaus Basan
2016-11-29 18:36:27 +01:00
parent df2073e5e6
commit fc3ac8b323
7 changed files with 9 additions and 14 deletions

View File

@@ -515,12 +515,9 @@ namespace BlackCore
void CApplication::processEventsFor(int milliseconds)
{
const QTime end = QTime::currentTime().addMSecs(milliseconds);
while (QTime::currentTime() <= end)
{
QCoreApplication::processEvents();
QThread::msleep(100);
}
QEventLoop eventLoop;
QTimer::singleShot(milliseconds, &eventLoop, &QEventLoop::quit);
eventLoop.exec();
}
bool CApplication::useContexts(const CCoreFacadeConfig &coreConfig)

View File

@@ -148,7 +148,7 @@ namespace BlackCore
// Using timer to first finish this function, then the resulting signal
if (validInCacheEntities != CEntityFlags::NoEntity)
{
QTimer::singleShot(10, this, [ = ]
QTimer::singleShot(0, this, [ = ]
{
emit this->dataRead(validInCacheEntities, CEntityFlags::ReadFinished, 0);
});

View File

@@ -291,11 +291,11 @@ namespace BlackCore
BlackMisc::CCountry getCountryForName(const QString &name) const;
//! Get airports
//! \\threadsafe
//! \threadsafe
BlackMisc::Aviation::CAirportList getAirports() const;
//! Get airports count
//! \\threadsafe
//! \threadsafe
int getAirportsCount() const;
//! Get METARs