include/vcl/idletask.hxx | 6 +++--- include/vcl/task.hxx | 5 +++-- vcl/source/helper/idletask.cxx | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit af9fc39a7531bf4267895f99368ac075b79c759e Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Jan 28 20:17:57 2024 +0000 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Mon Apr 15 06:58:37 2024 +0200 reserve a TaskPriority for testtool IdleTask Change-Id: I1fbd77cdeb643123afbb8bbdbd1ca38949e1b547 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162671 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit 0f9847270c8dc606f70e59ec4a4b512283014078) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162626 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/include/vcl/idletask.hxx b/include/vcl/idletask.hxx index fd5b17c61bec..1b8e33b7b181 100644 --- a/include/vcl/idletask.hxx +++ b/include/vcl/idletask.hxx @@ -20,9 +20,9 @@ public: bool GetFlag() const; IdleTask(); - // Launch an Idle at TaskPriority::LOWEST and wait until it completes. Can - // be used to wait until pending Idles at higher TaskPriority::DEFAULT_IDLE - // have completed. + // Launch an Idle at reserved lowest priority of TaskPriority::TOOLKIT_DEBUG + // and wait until it completes. Can be used to wait until pending Idles at + // higher TaskPriority have completed. static void waitUntilIdleDispatched(); private: diff --git a/include/vcl/task.hxx b/include/vcl/task.hxx index 5ed8cde7ff21..41c73bf39644 100644 --- a/include/vcl/task.hxx +++ b/include/vcl/task.hxx @@ -34,10 +34,11 @@ enum class TaskPriority REPAINT, ///< All repaint events should go in here POST_PAINT, ///< Everything running directly after painting DEFAULT_IDLE, ///< Default idle priority - LOWEST ///< Low, very idle cleanup tasks + LOWEST, ///< Low, very idle cleanup tasks + TOOLKIT_DEBUG ///< Do not use. Solely for IdleTask::waitUntilIdleDispatched }; -#define PRIO_COUNT (static_cast<int>(TaskPriority::LOWEST) + 1) +#define PRIO_COUNT (static_cast<int>(TaskPriority::TOOLKIT_DEBUG) + 1) class VCL_DLLPUBLIC Task { diff --git a/vcl/source/helper/idletask.cxx b/vcl/source/helper/idletask.cxx index 7df0514912db..2865d8d0367a 100644 --- a/vcl/source/helper/idletask.cxx +++ b/vcl/source/helper/idletask.cxx @@ -14,8 +14,8 @@ IdleTask::IdleTask() : flag(false) { - //setting the Priority of Idle task to LOW, LOWEST - maIdle.SetPriority(TaskPriority::LOWEST); + //setting the Priority of Idle task to TOOLKIT_DEBUG + maIdle.SetPriority(TaskPriority::TOOLKIT_DEBUG); //set idle for callback maIdle.SetInvokeHandler(LINK(this, IdleTask, FlipFlag)); //starting the idle