Commit 1fb377fa authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

JobItem: use a standart signal on destruction

parent a0ad1e09
...@@ -66,11 +66,6 @@ JobItem::JobItem() ...@@ -66,11 +66,6 @@ JobItem::JobItem()
registerTag(T_FIT_SUITE, 1, 1, {FitSuiteItem::M_TYPE}); registerTag(T_FIT_SUITE, 1, 1, {FitSuiteItem::M_TYPE});
} }
JobItem::~JobItem()
{
emit jobDestroyed();
}
QString JobItem::getIdentifier() const QString JobItem::getIdentifier() const
{ {
return getItemValue(P_IDENTIFIER).toString(); return getItemValue(P_IDENTIFIER).toString();
......
...@@ -63,7 +63,6 @@ public: ...@@ -63,7 +63,6 @@ public:
static constexpr auto M_TYPE{"JobItem"}; static constexpr auto M_TYPE{"JobItem"};
JobItem(); JobItem();
~JobItem();
QString getIdentifier() const; QString getIdentifier() const;
void setIdentifier(const QString& identifier); void setIdentifier(const QString& identifier);
...@@ -148,7 +147,6 @@ public: ...@@ -148,7 +147,6 @@ public:
friend class JobModel; friend class JobModel;
signals: signals:
void jobDestroyed();
void jobNameChanged(const QString& name); void jobNameChanged(const QString& name);
void jobStatusChanged(const JobStatus status); void jobStatusChanged(const JobStatus status);
void jobBeginTimeChanged(const QDateTime& begin_time); void jobBeginTimeChanged(const QDateTime& begin_time);
......
...@@ -50,7 +50,7 @@ FitSessionController* FitSessionManager::sessionController(JobItem* jobItem) ...@@ -50,7 +50,7 @@ FitSessionController* FitSessionManager::sessionController(JobItem* jobItem)
FitSessionController* FitSessionManager::createController(JobItem* jobItem) FitSessionController* FitSessionManager::createController(JobItem* jobItem)
{ {
// job destruction // job destruction
connect(jobItem, &JobItem::jobDestroyed, this, [=]() { removeController(jobItem); }); connect(jobItem, &JobItem::destroyed, this, [=]() { removeController(jobItem); });
auto* result = new FitSessionController(this); auto* result = new FitSessionController(this);
result->setItem(jobItem); result->setItem(jobItem);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment