[Libreoffice-commits] core.git: vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 6 13:33:56 UTC 2018


 vcl/inc/svdata.hxx        |    1 -
 vcl/source/app/svapp.cxx  |    2 +-
 vcl/source/app/svmain.cxx |    3 ---
 3 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit bc089afb13029bae65b993992b3815430657ac24
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Tue Nov 6 11:51:45 2018 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Nov 6 14:32:00 2018 +0100

    Use the backend SalInstance method IsMainThread for Application::IsMainThread
    
    Change-Id: I3258268b12cb0914a5e8d1c9b57d7891e83080c6
    Reviewed-on: https://gerrit.libreoffice.org/62951
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Jenkins

diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index b36ecf7e6a41..62f07929e031 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -363,7 +363,6 @@ struct ImplSVData
     std::unique_ptr<DockingManager> mpDockingManager;
     std::unique_ptr<BlendFrameCache> mpBlendFrameCache;
 
-    oslThreadIdentifier     mnMainThreadId = 0;
     rtl::Reference< vcl::DisplayConnectionDispatch > mxDisplayConnection;
 
     css::uno::Reference< css::lang::XComponent > mxAccessBridge;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 3221804607e3..0d9a2770aeb8 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -520,7 +520,7 @@ comphelper::SolarMutex& Application::GetSolarMutex()
 
 bool Application::IsMainThread()
 {
-    return ImplGetSVData()->mnMainThreadId == osl::Thread::getCurrentIdentifier();
+    return ImplGetSVData()->mpDefInst->IsMainThread();
 }
 
 sal_uInt32 Application::ReleaseSolarMutex()
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 673e800e4ac4..86db558da3e9 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -302,9 +302,6 @@ bool InitVCL()
 
     ImplSVData* pSVData = ImplGetSVData();
 
-    // remember Main-Thread-Id
-    pSVData->mnMainThreadId = ::osl::Thread::getCurrentIdentifier();
-
     // Initialize Sal
     pSVData->mpDefInst = CreateSalInstance();
     if ( !pSVData->mpDefInst )


More information about the Libreoffice-commits mailing list