1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 06:36:55 +02:00

Don't create JobStatusItem in DatabaseCommand.

This commit is contained in:
Christian Muehlhaeuser
2014-10-19 10:19:39 +02:00
parent f55ff6f13b
commit 22a58b7e21
2 changed files with 2 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
* *
* Copyright 2010-2013, Christian Muehlhaeuser <muesli@tomahawk-player.org> * Copyright 2010-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2012 Leo Franchi <lfranchi@kde.org> * Copyright 2012 Leo Franchi <lfranchi@kde.org>
* *
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
@@ -26,9 +26,6 @@
#include "TomahawkSqlQuery.h" #include "TomahawkSqlQuery.h"
#include "fuzzyindex/DatabaseFuzzyIndex.h" #include "fuzzyindex/DatabaseFuzzyIndex.h"
#include "jobview/IndexingJobItem.h"
#include "jobview/JobStatusView.h"
#include "jobview/JobStatusModel.h"
#include "utils/Logger.h" #include "utils/Logger.h"
namespace Tomahawk namespace Tomahawk
@@ -36,22 +33,14 @@ namespace Tomahawk
DatabaseCommand_UpdateSearchIndex::DatabaseCommand_UpdateSearchIndex() DatabaseCommand_UpdateSearchIndex::DatabaseCommand_UpdateSearchIndex()
: DatabaseCommand() : DatabaseCommand()
, m_statusJob( new IndexingJobItem )
{ {
tLog() << Q_FUNC_INFO << "Updating index."; tDebug() << Q_FUNC_INFO << "Updating index.";
JobStatusView::addJob( m_statusJob );
} }
DatabaseCommand_UpdateSearchIndex::~DatabaseCommand_UpdateSearchIndex() DatabaseCommand_UpdateSearchIndex::~DatabaseCommand_UpdateSearchIndex()
{ {
tDebug() << Q_FUNC_INFO; tDebug() << Q_FUNC_INFO;
if ( ! m_statusJob.isNull() )
{
m_statusJob.data()->done();
}
} }

View File

@@ -23,8 +23,6 @@
#include "DllMacro.h" #include "DllMacro.h"
#include <QPointer> #include <QPointer>
class IndexingJobItem;
namespace Tomahawk namespace Tomahawk
{ {
@@ -47,9 +45,6 @@ public:
virtual QString commandname() const { return "updatesearchindex"; } virtual QString commandname() const { return "updatesearchindex"; }
virtual bool doesMutates() const { return true; } virtual bool doesMutates() const { return true; }
virtual void exec( DatabaseImpl* db ); virtual void exec( DatabaseImpl* db );
private:
QPointer<IndexingJobItem> m_statusJob;
}; };
} }