mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T472, style and minor fixes ("myself")
This commit is contained in:
committed by
Mat Sutcliffe
parent
9cee34f4cc
commit
72b7c61db7
@@ -40,7 +40,7 @@ namespace BlackCore
|
||||
namespace Db
|
||||
{
|
||||
//! Specialized version of threaded reader for DB data
|
||||
class BLACKCORE_EXPORT CDatabaseReader : public BlackCore::CThreadedReader
|
||||
class BLACKCORE_EXPORT CDatabaseReader : public CThreadedReader
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QScopedPointerDeleteLater>
|
||||
#include <QTimer>
|
||||
#include <QUrl>
|
||||
#include <QPointer>
|
||||
#include <QWriteLocker>
|
||||
#include <Qt>
|
||||
#include <QtGlobal>
|
||||
@@ -659,8 +660,11 @@ namespace BlackCore
|
||||
bool CIcaoDataReader::readFromJsonFilesInBackground(const QString &dir, CEntityFlags::Entity whatToRead, bool overrideNewerOnly)
|
||||
{
|
||||
if (dir.isEmpty() || whatToRead == CEntityFlags::NoEntity) { return false; }
|
||||
|
||||
QPointer<CIcaoDataReader> myself(this);
|
||||
QTimer::singleShot(0, this, [ = ]()
|
||||
{
|
||||
if (!myself) { return; }
|
||||
const CStatusMessageList msgs = this->readFromJsonFiles(dir, whatToRead, overrideNewerOnly);
|
||||
if (msgs.isFailure())
|
||||
{
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackcore/application.h"
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackcore/db/modeldatareader.h"
|
||||
#include "blackcore/db/databaseutils.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/json.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <QScopedPointerDeleteLater>
|
||||
#include <QTimer>
|
||||
#include <QTime>
|
||||
#include <QPointer>
|
||||
#include <QUrl>
|
||||
#include <QWriteLocker>
|
||||
#include <Qt>
|
||||
@@ -551,8 +552,11 @@ namespace BlackCore
|
||||
bool CModelDataReader::readFromJsonFilesInBackground(const QString &dir, CEntityFlags::Entity whatToRead, bool overrideNewerOnly)
|
||||
{
|
||||
if (dir.isEmpty() || whatToRead == CEntityFlags::NoEntity) { return false; }
|
||||
|
||||
QPointer<CModelDataReader> myself(this);
|
||||
QTimer::singleShot(0, this, [ = ]()
|
||||
{
|
||||
if (!myself) { return; }
|
||||
const CStatusMessageList msgs = this->readFromJsonFiles(dir, whatToRead, overrideNewerOnly);
|
||||
if (msgs.isFailure())
|
||||
{
|
||||
|
||||
@@ -12,18 +12,16 @@
|
||||
#ifndef BLACKCORE_MODELDATAREADER_H
|
||||
#define BLACKCORE_MODELDATAREADER_H
|
||||
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
#include "blackcore/data/dbcaches.h"
|
||||
#include "blackcore/db/databasereader.h"
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
#include "blackmisc/simulation/aircraftmodellist.h"
|
||||
#include "blackmisc/simulation/distributorlist.h"
|
||||
#include "blackmisc/aviation/aircraftcategorylist.h"
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
#include "blackmisc/aviation/livery.h"
|
||||
#include "blackmisc/aviation/liverylist.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
#include "blackmisc/network/url.h"
|
||||
#include "blackmisc/simulation/aircraftmodel.h"
|
||||
#include "blackmisc/simulation/aircraftmodellist.h"
|
||||
#include "blackmisc/simulation/distributor.h"
|
||||
#include "blackmisc/simulation/distributorlist.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QList>
|
||||
|
||||
Reference in New Issue
Block a user