summaryrefslogtreecommitdiff
path: root/ui/progresstask.h
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2025-04-24 14:46:37 -0400
committerGlenn Smith <glenn@vector35.com>2025-04-25 13:43:01 -0400
commit9262278979709181414664053523657355762707 (patch)
treec472e0620b1fdfe3b3c9fd26c7cbf41425b27740 /ui/progresstask.h
parent4aac12b0e429fedb02a645e5eb82ca2d88902e25 (diff)
std::function<bool(size_t,size_t)> ==> ProgressFunction
Diffstat (limited to 'ui/progresstask.h')
-rw-r--r--ui/progresstask.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/progresstask.h b/ui/progresstask.h
index a1a375cb..6765ec2d 100644
--- a/ui/progresstask.h
+++ b/ui/progresstask.h
@@ -88,7 +88,7 @@ class BINARYNINJAUIAPI ProgressDialog : public QDialog
\code{.cpp}
// Starts task
ProgressTask* task = new ProgressTask("Long Operation", "Long Operation", "Cancel",
- [](std::function<bool(size_t, size_t)> progress) {
+ [](ProgressFunction progress) {
doLongOperationWithProgress(progress);
// Report progress by calling the progress function
@@ -107,7 +107,7 @@ class BINARYNINJAUIAPI ProgressTask : public QObject
Q_OBJECT
ProgressDialog* m_dialog;
- std::function<void(std::function<bool(size_t, size_t)>)> m_func;
+ std::function<void(BinaryNinja::ProgressFunction)> m_func;
std::thread m_thread;
std::mutex m_mutex;
std::condition_variable m_cv;
@@ -133,7 +133,7 @@ class BINARYNINJAUIAPI ProgressTask : public QObject
cancellation.
*/
ProgressTask(QWidget* parent, const QString& name, const QString& text, const QString& cancel,
- std::function<void(std::function<bool(size_t, size_t)>)> func);
+ std::function<void(BinaryNinja::ProgressFunction)> func);
virtual ~ProgressTask();
/*!
@@ -279,7 +279,7 @@ class BINARYNINJAUIAPI BackgroundThread : public QObject
Q_OBJECT
public:
- typedef std::function<bool(size_t, size_t)> ProgressFunction;
+ typedef BinaryNinja::ProgressFunction ProgressFunction;
typedef std::function<QVariant(QVariant value)> ThenFunction;
typedef std::function<void(std::exception_ptr exc)> CatchFunction;