Change progress and max progress to qint64 in taskmanager
This commit is contained in:
parent
f877639ed7
commit
7e6c16b287
@ -61,7 +61,7 @@ QList<TaskManager::Task> TaskManager::GetTasks() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskManager::SetTaskBlocksCollectionScans(int id) {
|
void TaskManager::SetTaskBlocksCollectionScans(const int id) {
|
||||||
|
|
||||||
{
|
{
|
||||||
QMutexLocker l(&mutex_);
|
QMutexLocker l(&mutex_);
|
||||||
@ -76,7 +76,7 @@ void TaskManager::SetTaskBlocksCollectionScans(int id) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskManager::SetTaskProgress(int id, int progress, int max) {
|
void TaskManager::SetTaskProgress(const int id, const qint64 progress, const qint64 max) {
|
||||||
|
|
||||||
{
|
{
|
||||||
QMutexLocker l(&mutex_);
|
QMutexLocker l(&mutex_);
|
||||||
@ -90,7 +90,7 @@ void TaskManager::SetTaskProgress(int id, int progress, int max) {
|
|||||||
emit TasksChanged();
|
emit TasksChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskManager::IncreaseTaskProgress(int id, int progress, int max) {
|
void TaskManager::IncreaseTaskProgress(const int id, const qint64 progress, const qint64 max) {
|
||||||
|
|
||||||
{
|
{
|
||||||
QMutexLocker l(&mutex_);
|
QMutexLocker l(&mutex_);
|
||||||
@ -105,7 +105,7 @@ void TaskManager::IncreaseTaskProgress(int id, int progress, int max) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskManager::SetTaskFinished(int id) {
|
void TaskManager::SetTaskFinished(const int id) {
|
||||||
|
|
||||||
bool resume_collection_watchers = false;
|
bool resume_collection_watchers = false;
|
||||||
|
|
||||||
|
@ -37,10 +37,11 @@ class TaskManager : public QObject {
|
|||||||
explicit TaskManager(QObject *parent = nullptr);
|
explicit TaskManager(QObject *parent = nullptr);
|
||||||
|
|
||||||
struct Task {
|
struct Task {
|
||||||
|
Task() : id(0), progress(0), progress_max(0), blocks_collection_scans(false) {}
|
||||||
int id;
|
int id;
|
||||||
QString name;
|
QString name;
|
||||||
int progress;
|
qint64 progress;
|
||||||
int progress_max;
|
qint64 progress_max;
|
||||||
bool blocks_collection_scans;
|
bool blocks_collection_scans;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -61,13 +62,13 @@ class TaskManager : public QObject {
|
|||||||
QList<Task> GetTasks();
|
QList<Task> GetTasks();
|
||||||
|
|
||||||
int StartTask(const QString &name);
|
int StartTask(const QString &name);
|
||||||
void SetTaskBlocksCollectionScans(int id);
|
void SetTaskBlocksCollectionScans(const int id);
|
||||||
void SetTaskProgress(int id, int progress, int max = 0);
|
void SetTaskProgress(const int id, const qint64 progress, const qint64 max = 0);
|
||||||
void IncreaseTaskProgress(int id, int progress, int max = 0);
|
void IncreaseTaskProgress(const int id, const qint64 progress, const qint64 max = 0);
|
||||||
void SetTaskFinished(int id);
|
void SetTaskFinished(const int id);
|
||||||
int GetTaskProgress(int id);
|
int GetTaskProgress(const int id);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void TasksChanged();
|
void TasksChanged();
|
||||||
|
|
||||||
void PauseCollectionWatchers();
|
void PauseCollectionWatchers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user