Ref T472, style and minor fixes ("myself")

This commit is contained in:
Klaus Basan
2019-02-19 23:56:47 +01:00
committed by Mat Sutcliffe
parent 9cee34f4cc
commit 72b7c61db7
4 changed files with 15 additions and 9 deletions

View File

@@ -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())
{