diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-04-17 18:41:39 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-04-18 12:58:45 +0200 |
commit | 94c264859f621e8e7c793fad2beb6528659433bf (patch) | |
tree | ba0a6ae55f0fee9201054242014674824fa6b1b8 | |
parent | 58433a8b88537a1a0883d107972de5c5fad59d4a (diff) |
vcl: WNT: avoid calling SHAddToRecentDocs() from unit tests
On Windows 10, Explorer spends ridiculous amounts of CPU with updating
its recent documents view while tests are running.
Change-Id: I170306a392900fc4b911950e36f13f1af0e405ac
Reviewed-on: https://gerrit.libreoffice.org/53058
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | vcl/win/app/salinst.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 125d375096a9..340e0ed01b77 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -921,6 +921,10 @@ OUString WinSalInstance::GetConnectionIdentifier() */ void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& /*rMimeType*/, const OUString& rDocumentService) { + static bool const s_isTest(getenv("LO_TESTNAME") != nullptr); + if (s_isTest) + return; + OUString system_path; osl::FileBase::RC rc = osl::FileBase::getSystemPathFromFileURL(rFileUrl, system_path); |