ConcurrentOperationRunner Classclass QInstaller::ConcurrentOperationRunner
The ConcurrentOperationRunner class can be used to perform installer operations concurrently. More...
|ConcurrentOperationRunner(QInstaller::OperationList *operations, const Operation::OperationType type, QObject *parent = nullptr)|
|ConcurrentOperationRunner(QObject *parent = nullptr)|
|QHash<QInstaller::Operation *, bool>||run()|
|void||setType(const Operation::OperationType type)|
|void||progressChanged(const int completed, const int total)|
The class accepts an operation list of any registered operation type. It can be used to execute the
Undo steps of the operations. The operations are run in a separate thread pool of this class, which by default limits the maximum number of threads to the ideal number of logical processor cores in the system.
Member Function Documentation
ConcurrentOperationRunner::ConcurrentOperationRunner(QInstaller::OperationList *operations, const Operation::OperationType type, QObject *parent = nullptr)
Constructs an operation runner with operations of type type to be performed, and parent as the parent object.
ConcurrentOperationRunner::ConcurrentOperationRunner(QObject *parent = nullptr)
Constructs an operation runner with parent as the parent object.
Cancels operations pending for an asynchronous run.
Note: This does not stop already running operations, which should provide a separate mechanism for canceling.
Emitted when the execution of all pooled operations is finished.
[signal] void ConcurrentOperationRunner::operationStarted(QInstaller::Operation *operation)
Emitted when the execution of operation is started.
Emitted when the count of completed of the total operations changes.
Destroys the instance and releases resources.
QHash<QInstaller::Operation *, bool> ConcurrentOperationRunner::run()
Performs the current operations. Returns a hash of pointers to the performed operation objects and their results. The result is a boolean value.
Sets the maximum count of threads used by the thread pool of this class. A value of
0 sets the count automatically to ideal number of threads.
void ConcurrentOperationRunner::setOperations(QInstaller::OperationList *operations)
Sets the list of operations to be performed to operations.
Sets type of operations to be performed. This can be either
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.