desktop/source/app/app.cxx    |    2 +-
 include/vcl/svapp.hxx         |    4 ++--
 vcl/headless/svpinst.cxx      |    4 ++--
 vcl/qt5/QtInstance.cxx        |    8 ++++----
 vcl/qt5/QtTimer.cxx           |    2 +-
 vcl/source/app/salvtables.cxx |    4 ++--
 vcl/source/app/svapp.cxx      |    8 ++++----
 7 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 8f9f04421b45d07b600078d968afa45384ee7060
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Dec 6 13:22:13 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Dec 9 11:24:44 2024 +0100

    rename IsOnSystemEventLoop -> IsUseSystemEventLoop
    
    to match the underlying field and avoid confusion.
    
    The "IsOn" prefix normally means "is the current thread running on",
    which is not what this method means
    
    Change-Id: I3399a707582c9b0c681cd4aa03bc9f94860fc7fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177960
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index cb4a4de7db9e..789dedf24673 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2088,7 +2088,7 @@ void Desktop::OpenClients()
         bool bExistsSessionData  = false;
         bool const bDisableRecovery
             = getenv("OOO_DISABLE_RECOVERY") != nullptr
-              || IsOnSystemEventLoop()
+              || IsUseSystemEventLoop()
               || !officecfg::Office::Recovery::RecoveryInfo::Enabled::get();
 
         impl_checkRecoveryState(bCrashed, bExistsRecoveryData, 
bExistsSessionData);
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 719ced7a0e21..979068233d36 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1296,11 +1296,11 @@ public:
     static css::uno::Reference< css::ui::dialogs::XFolderPicker2 >
         createFolderPicker( const css::uno::Reference< 
css::uno::XComponentContext >& rServiceManager );
 
-    /** Returns true, if the VCL plugin runs on the system event loop.
+    /** Returns true, if the VCL plugin should run on the system event loop.
      *
      *  AKA the VCL plugin can't handle nested event loops, like WASM or 
mobile.
      */
-    static bool IsOnSystemEventLoop();
+    static bool IsUseSystemEventLoop();
 
     ///@}
 
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 0b65626947aa..54ac078f83f0 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -288,7 +288,7 @@ static void loop(void * arg) {
 }
 
 bool SvpSalInstance::DoExecute(int &) {
-    assert(Application::IsOnSystemEventLoop());
+    assert(Application::IsUseSystemEventLoop());
     // emscripten_set_main_loop will unwind the stack by throwing a JavaScript 
exception, so we need
     // to manually undo the call of AcquireYieldMutex() done in InitVCL:
     ReleaseYieldMutex(false);
@@ -299,7 +299,7 @@ bool SvpSalInstance::DoExecute(int &) {
 }
 
 void SvpSalInstance::DoQuit() {
-    assert(Application::IsOnSystemEventLoop());
+    assert(Application::IsUseSystemEventLoop());
 }
 
 #endif
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 575e21514698..aa1c369fbe2d 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -778,8 +778,8 @@ std::unique_ptr<QApplication> 
QtInstance::CreateQApplication(int& nArgc, char**
 
 bool QtInstance::DoExecute(int& nExitCode)
 {
-    const bool bIsOnSystemEventLoop = Application::IsOnSystemEventLoop();
-    if (bIsOnSystemEventLoop)
+    const bool bIsUseSystemEventLoop = Application::IsUseSystemEventLoop();
+    if (bIsUseSystemEventLoop)
     {
 #if defined EMSCRIPTEN
         // For Emscripten, QApplication::exec() will unwind the stack by 
throwing a JavaScript
@@ -791,12 +791,12 @@ bool QtInstance::DoExecute(int& nExitCode)
         O3TL_UNREACHABLE;
 #endif
     }
-    return bIsOnSystemEventLoop;
+    return bIsUseSystemEventLoop;
 }
 
 void QtInstance::DoQuit()
 {
-    if (Application::IsOnSystemEventLoop())
+    if (Application::IsUseSystemEventLoop())
         QApplication::quit();
 }
 
diff --git a/vcl/qt5/QtTimer.cxx b/vcl/qt5/QtTimer.cxx
index dd6d21556e91..9506801609e9 100644
--- a/vcl/qt5/QtTimer.cxx
+++ b/vcl/qt5/QtTimer.cxx
@@ -42,7 +42,7 @@ QtTimer::QtTimer()
 void QtTimer::timeoutActivated()
 {
     SolarMutexGuard aGuard;
-    if (Application::IsOnSystemEventLoop())
+    if (Application::IsUseSystemEventLoop())
     {
         const ImplSVData* pSVData = ImplGetSVData();
         assert(pSVData && pSVData->mpDefInst);
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 493a5526b92c..14746134dae0 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -169,14 +169,14 @@ bool SalInstance::CallEventCallback(void const* pEvent, 
int nBytes)
 bool SalInstance::DoExecute(int&)
 {
     // can't run on system event loop without implementing DoExecute and DoQuit
-    if (Application::IsOnSystemEventLoop())
+    if (Application::IsUseSystemEventLoop())
         std::abort();
     return false;
 }
 
 void SalInstance::DoQuit()
 {
-    if (Application::IsOnSystemEventLoop())
+    if (Application::IsUseSystemEventLoop())
         std::abort();
 }
 
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index fdfed6c05e5d..06a21d733177 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -350,7 +350,7 @@ void Application::Execute()
     int nExitCode = 0;
     if (!pSVData->mpDefInst->DoExecute(nExitCode))
     {
-        if (Application::IsOnSystemEventLoop())
+        if (Application::IsUseSystemEventLoop())
         {
             SAL_WARN("vcl.schedule", "Can't omit DoExecute when running on 
system event loop!");
             std::abort();
@@ -395,7 +395,7 @@ static bool ImplYield(bool i_bWait, bool i_bAllEvents)
 
 bool Application::Reschedule( bool i_bAllEvents )
 {
-    static const bool bAbort = Application::IsOnSystemEventLoop();
+    static const bool bAbort = Application::IsUseSystemEventLoop();
     if (bAbort)
     {
         SAL_WARN("vcl.schedule", "Application::Reschedule(" << i_bAllEvents << 
")");
@@ -404,7 +404,7 @@ bool Application::Reschedule( bool i_bAllEvents )
     return ImplYield(false, i_bAllEvents);
 }
 
-bool Application::IsOnSystemEventLoop()
+bool Application::IsUseSystemEventLoop()
 {
     return ImplGetSVData()->maAppData.m_bUseSystemLoop;
 }
@@ -464,7 +464,7 @@ SAL_DLLPUBLIC_EXPORT void unit_lok_process_events_to_idle()
 
 void Application::Yield()
 {
-    static const bool bAbort = Application::IsOnSystemEventLoop();
+    static const bool bAbort = Application::IsUseSystemEventLoop();
     if (bAbort)
     {
         SAL_WARN("vcl.schedule", "Application::Yield()");

Reply via email to