T66 A new smart pointer for managing a CContinuousWorker subclass instance.

Owns the worker before it starts, when ownership is transferred to the thread.
This commit is contained in:
Mathew Sutcliffe
2017-05-06 23:46:53 +01:00
parent ca81c65eae
commit 41ff563e19
4 changed files with 70 additions and 8 deletions

View File

@@ -15,6 +15,7 @@
#include "blackgui/settings/guisettings.h"
#include "blackgui/mainwindowaccess.h"
#include "blackgui/managedstatusbar.h"
#include "blackcore/db/backgrounddataupdater.h"
#include "blackmisc/identifiable.h"
#include "blackmisc/statusmessage.h"
@@ -28,10 +29,6 @@ namespace Ui { class CSwiftData; }
namespace BlackCore
{
class CWebDataServices;
namespace Db
{
class CBackgroundDataUpdater;
}
}
/*!
@@ -83,7 +80,7 @@ private:
BlackGui::CManagedStatusBar m_statusBar;
QScopedPointer<Ui::CSwiftData> ui;
QScopedPointer<BlackCore::Db::CBackgroundDataUpdater, QScopedPointerDeleteLater> m_updater;
BlackMisc::CWorkerPointer<BlackCore::Db::CBackgroundDataUpdater> m_updater;
BlackMisc::CSettingReadOnly<BlackGui::Settings::TBackgroundConsolidation> m_consolidationSettings { this, &CSwiftData::consolidationSettingChanged }; //!< consolidation time
};