diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-11-20 16:38:14 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-05-08 21:53:26 +0100 |
commit | 4e7f3bde598fc122ef5bb428bf5f7e4d4f22fd82 (patch) | |
tree | 30bd873e6a57da85b052ad8d428b178b8ac229dd /cppuhelper/source | |
parent | 971660d6f472fad16d9ab975f432b93032f9dbc6 (diff) |
preload: cleanup failed module load warnings and rename them.
Change-Id: Iafa89df6f724fa6b64712d970502091e38300dad
Reviewed-on: https://gerrit.libreoffice.org/83341
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'cppuhelper/source')
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 8f49b4ecb908..b4c2503db1a1 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -1788,6 +1788,7 @@ void cppuhelper::ServiceManager::preloadImplementations() { std::vector<OUString> aReported; std::vector<OUString> aDisabled; OUStringBuffer aDisabledMsg; + OUStringBuffer aMissingMsg; /// Allow external callers & testers to disable certain components const char *pDisable = getenv("UNODISABLELIBRARY"); @@ -1810,6 +1811,7 @@ void cppuhelper::ServiceManager::preloadImplementations() { rEntry.second->status == Data::Implementation::STATUS_LOADED) continue; + OUString simplified; try { const OUString &aLibrary = rEntry.second->info->uri; @@ -1817,7 +1819,8 @@ void cppuhelper::ServiceManager::preloadImplementations() { if (aLibrary.isEmpty()) continue; - OUString simplified = simplifyModule(aLibrary); + simplified = simplifyModule(aLibrary); + bool bDisabled = std::find(aDisabled.begin(), aDisabled.end(), simplified) != aDisabled.end(); @@ -1854,8 +1857,8 @@ void cppuhelper::ServiceManager::preloadImplementations() { if (!aModule.is()) { - std::cerr << ":failed" << std::endl; - std::cerr.flush(); + aMissingMsg.append(simplified); + aMissingMsg.append(" "); } if (aModule.is() && @@ -1948,6 +1951,11 @@ void cppuhelper::ServiceManager::preloadImplementations() { } std::cerr << std::endl; + if (aMissingMsg.getLength() > 0) + { + OUString aMsg = aMissingMsg.makeStringAndClear(); + std::cerr << "Absent (often optional): " << aMsg << "\n"; + } if (aDisabledMsg.getLength() > 0) { OUString aMsg = aDisabledMsg.makeStringAndClear(); |