mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
Smaller header updates, switch connect style
This commit is contained in:
parent
95dbb3a7e3
commit
bc37b40179
@ -138,8 +138,8 @@ long QgsTaskManager::addTask( QgsTask* task, const QgsTaskList& dependencies )
|
||||
QMutexLocker ml( mTaskMutex );
|
||||
mTasks.insert( mNextTaskId, task );
|
||||
|
||||
connect( task, SIGNAL( progressChanged( double ) ), this, SLOT( taskProgressChanged( double ) ) );
|
||||
connect( task, SIGNAL( statusChanged( int ) ), this, SLOT( taskStatusChanged( int ) ) );
|
||||
connect( task, &QgsTask::progressChanged, this, &QgsTaskManager::taskProgressChanged );
|
||||
connect( task, &QgsTask::statusChanged, this, &QgsTaskManager::taskStatusChanged );
|
||||
|
||||
if ( !dependencies.isEmpty() )
|
||||
{
|
||||
@ -397,8 +397,8 @@ bool QgsTaskManager::cleanupAndDeleteTask( QgsTask *task )
|
||||
{
|
||||
task->cancel();
|
||||
// delete task when it's terminated
|
||||
connect( task, SIGNAL( taskCompleted() ), task, SLOT( deleteLater() ) );
|
||||
connect( task, SIGNAL( taskStopped() ), task, SLOT( deleteLater() ) );
|
||||
connect( task, &QgsTask::taskCompleted, task, &QgsTask::deleteLater );
|
||||
connect( task, &QgsTask::taskStopped, task, &QgsTask::deleteLater );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -23,11 +23,12 @@
|
||||
#include <QAbstractItemModel>
|
||||
#include <QFuture>
|
||||
|
||||
/** \ingroup core
|
||||
/**
|
||||
* \ingroup core
|
||||
* \class QgsTask
|
||||
* \brief Interface class for long running background tasks. Tasks can be controlled directly,
|
||||
* or added to a QgsTaskManager for automatic management.
|
||||
* \note Added in version 2.16
|
||||
* \note Added in version 3.0
|
||||
*/
|
||||
class CORE_EXPORT QgsTask : public QObject
|
||||
{
|
||||
@ -38,11 +39,11 @@ class CORE_EXPORT QgsTask : public QObject
|
||||
//! Status of tasks
|
||||
enum TaskStatus
|
||||
{
|
||||
Queued, /*!< Task is queued and has not begun */
|
||||
OnHold, /*!< Task is queued but on hold and will not be started */
|
||||
Running, /*!< Task is currently running */
|
||||
Complete, /*!< Task successfully completed */
|
||||
Terminated, /*!< Task was terminated or errored */
|
||||
Queued, //!< Task is queued and has not begun
|
||||
OnHold, //!< Task is queued but on hold and will not be started
|
||||
Running, //!< Task is currently running
|
||||
Complete, //!< Task successfully completed
|
||||
Terminated, //!< Task was terminated or errored
|
||||
};
|
||||
|
||||
//! Task flags
|
||||
@ -173,7 +174,7 @@ typedef QList< QgsTask* > QgsTaskList;
|
||||
* \class QgsTaskManager
|
||||
* \brief Task manager for managing a set of long-running QgsTask tasks. This class can be created directly,
|
||||
* or accessed via a global instance.
|
||||
* \note Added in version 2.16
|
||||
* \note Added in version 3.0
|
||||
*/
|
||||
class CORE_EXPORT QgsTaskManager : public QObject
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user