From 52528f650c7c06290f2d4ba5fb543d7110f1b7a1 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 6 Mar 2015 18:55:02 +0100 Subject: [PATCH] JobQueue emits queueChanged. --- src/libcalamares/JobQueue.cpp | 4 +++- src/libcalamares/JobQueue.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/JobQueue.cpp b/src/libcalamares/JobQueue.cpp index d2fd3b98c..6b31ec78d 100644 --- a/src/libcalamares/JobQueue.cpp +++ b/src/libcalamares/JobQueue.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -158,6 +158,7 @@ JobQueue::enqueue( const Calamares::job_ptr& job ) { Q_ASSERT( !m_thread->isRunning() ); m_jobs.append( job ); + emit queueChanged( m_jobs ); } @@ -166,6 +167,7 @@ JobQueue::enqueue( const QList< job_ptr >& jobs ) { Q_ASSERT( !m_thread->isRunning() ); m_jobs.append( jobs ); + emit queueChanged( m_jobs ); } } // namespace Calamares diff --git a/src/libcalamares/JobQueue.h b/src/libcalamares/JobQueue.h index d39929ebb..6e04e9464 100644 --- a/src/libcalamares/JobQueue.h +++ b/src/libcalamares/JobQueue.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,6 +46,7 @@ public: void start(); signals: + void queueChanged( const QList< Calamares::job_ptr >& jobs ); void progress( qreal percent, const QString& prettyName ); void finished(); void failed( const QString& message, const QString& details );