From 5ed2cde7d985b2da9a75440249cea3b033cd4989 Mon Sep 17 00:00:00 2001 From: John Lindal Date: Thu, 9 May 2024 21:08:31 -0700 Subject: [PATCH] update apps to latest API --- tools/jx_layout_editor/code/App.cpp | 3 ++- tools/jx_layout_editor/code/LayoutWidget.cpp | 6 ++++-- tools/jx_layout_editor/code/main.cpp | 3 ++- tools/jx_memory_debugger/code/App.cpp | 3 ++- tools/jx_memory_debugger/code/StatsDirector.cpp | 4 +++- tools/jx_menu_editor/code/App.cpp | 3 ++- tools/jx_menu_editor/code/MenuDocument.cpp | 5 +++-- tools/jx_menu_editor/code/main.cpp | 3 ++- 8 files changed, 20 insertions(+), 10 deletions(-) diff --git a/tools/jx_layout_editor/code/App.cpp b/tools/jx_layout_editor/code/App.cpp index 2797c29f0..2996dc2f8 100644 --- a/tools/jx_layout_editor/code/App.cpp +++ b/tools/jx_layout_editor/code/App.cpp @@ -89,7 +89,8 @@ App::DisplayAbout ForgetPrefsManager(); JXGetApplication()->Quit(); } - }); + }, + "App::DisplayAbout"); } /****************************************************************************** diff --git a/tools/jx_layout_editor/code/LayoutWidget.cpp b/tools/jx_layout_editor/code/LayoutWidget.cpp index db95b3679..be8e31227 100644 --- a/tools/jx_layout_editor/code/LayoutWidget.cpp +++ b/tools/jx_layout_editor/code/LayoutWidget.cpp @@ -506,7 +506,8 @@ LayoutWidget::SetSelected const bool ok = itsParent->Focus(); assert( ok ); GetWindow()->Refresh(); - }); + }, + "LayoutWidget::Focus"); task->Go(); } } @@ -971,7 +972,8 @@ LayoutWidget::HandleMouseUp auto* task = jnew JXUrgentFunctionTask(this, [this]() { EditConfiguration(); - }); + }, + "LayoutWidget::EditConfiguration"); task->Go(); } else if (itsClearIfNotDNDFlag) diff --git a/tools/jx_layout_editor/code/main.cpp b/tools/jx_layout_editor/code/main.cpp index fce447e9d..52460faa7 100644 --- a/tools/jx_layout_editor/code/main.cpp +++ b/tools/jx_layout_editor/code/main.cpp @@ -44,7 +44,8 @@ main JXApplication::StartFiber([argc, argv]() { GetMDIServer()->HandleCmdLineOptions(argc, argv); - }); + }, + "main->mdi"); if (displayAbout) { diff --git a/tools/jx_memory_debugger/code/App.cpp b/tools/jx_memory_debugger/code/App.cpp index ec1c03a0b..e7f5faacc 100644 --- a/tools/jx_memory_debugger/code/App.cpp +++ b/tools/jx_memory_debugger/code/App.cpp @@ -93,7 +93,8 @@ App::DisplayAbout ForgetPrefsManager(); JXGetApplication()->Quit(); } - }); + }, + "App::DisplayAbout"); } /****************************************************************************** diff --git a/tools/jx_memory_debugger/code/StatsDirector.cpp b/tools/jx_memory_debugger/code/StatsDirector.cpp index bebccf197..35cd36e43 100644 --- a/tools/jx_memory_debugger/code/StatsDirector.cpp +++ b/tools/jx_memory_debugger/code/StatsDirector.cpp @@ -151,7 +151,9 @@ StatsDirector::SetLink ListenTo(itsLink); DeleteDebugAcceptor(); - itsPingTask = jnew JXFunctionTask(kRefreshInterval, std::bind(&StatsDirector::RequestRunningStats, this)); + itsPingTask = jnew JXFunctionTask(kRefreshInterval, + std::bind(&StatsDirector::RequestRunningStats, this), + "StatsDirector::Ping"); itsPingTask->Start(); } diff --git a/tools/jx_menu_editor/code/App.cpp b/tools/jx_menu_editor/code/App.cpp index 69426986d..036b224f5 100644 --- a/tools/jx_menu_editor/code/App.cpp +++ b/tools/jx_menu_editor/code/App.cpp @@ -90,7 +90,8 @@ App::DisplayAbout ForgetPrefsManager(); JXGetApplication()->Quit(); } - }); + }, + "App::DisplayAbout"); } /****************************************************************************** diff --git a/tools/jx_menu_editor/code/MenuDocument.cpp b/tools/jx_menu_editor/code/MenuDocument.cpp index 108bc19f1..3c7167c3c 100644 --- a/tools/jx_menu_editor/code/MenuDocument.cpp +++ b/tools/jx_menu_editor/code/MenuDocument.cpp @@ -92,10 +92,11 @@ MenuDocument::Create (**doc).Activate(); MenuDocument* d = *doc; - auto* task = jnew JXUrgentFunctionTask(d, std::function([d]() + auto* task = jnew JXUrgentFunctionTask(d, [d]() { d->DataReverted(); - })); + }, + "MenuDocument::DataReverted"); task->Go(); return true; diff --git a/tools/jx_menu_editor/code/main.cpp b/tools/jx_menu_editor/code/main.cpp index fce447e9d..52460faa7 100644 --- a/tools/jx_menu_editor/code/main.cpp +++ b/tools/jx_menu_editor/code/main.cpp @@ -44,7 +44,8 @@ main JXApplication::StartFiber([argc, argv]() { GetMDIServer()->HandleCmdLineOptions(argc, argv); - }); + }, + "main->mdi"); if (displayAbout) {