mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #507, changed setup reader and simplied global setup and setup reader
* a single base URL (shared), derived URLs by appended path * simplified dir structure shared with sub directories * renamed functions * automatically synchronize setup with DB when initialized * trigger download info loading when setup is completed * allow to automatically read after setup data have been synchronized * read DB data when setup has been loaded * allow to reload from threaded reader * improved handling (log messages, skip reading) when data are not available
This commit is contained in:
committed by
Mathew Sutcliffe
parent
4d4d6fcdc9
commit
d131cd2d33
@@ -152,12 +152,11 @@ namespace BlackCore
|
||||
void CVatsimDataFileReader::ps_read()
|
||||
{
|
||||
this->threadAssertCheck();
|
||||
if (m_setup.get().vatsimDataFile().size() < 1) { return; }
|
||||
|
||||
// round robin for load balancing
|
||||
// remark: Don't use QThread to run network operations in the background
|
||||
// see http://qt-project.org/doc/qt-4.7/qnetworkaccessmanager.html
|
||||
QUrl url(m_setup.get().vatsimDataFile().getNextUrl());
|
||||
QUrl url(m_setup.get().vatsimDataFileUrls().getNextUrl());
|
||||
if (url.isEmpty()) { return; }
|
||||
Q_ASSERT_X(this->m_networkManager, Q_FUNC_INFO, "Missing network manager");
|
||||
QNetworkRequest request(url);
|
||||
|
||||
Reference in New Issue
Block a user