Page MenuHomePhabricator

pre-loading multiple libraries doesn't work
Closed, ResolvedPublic

Description

In ...\Modules\AppUtil\src\mitkBaseApplication.cpp ln 531 the QStringList of pre load libraries is joined with "," to a QString.

d->m_FWProps[ctkPluginConstants::FRAMEWORK_PRELOAD_LIBRARIES] = preloadLibs.join(QString(','));

But in ctkPluginFrameWorkContext ln 119 a QStringList is expected with pre load libraries as items but a due to the join a QString is received.

This leads in the end to an error message "Pre-loading library <preloadlib1>,<preloadlib2> failed: <...> Check your library search paths.". because the previously inserted QString <preloadlib1>,<preloadlib2> ends up as one item in the QStringList.

-> So multiple libraries currently can't be loaded.

Solution is to remove the join command and to insert the QStringList in mitkBaseApplication:
d->m_FWProps[ctkPluginConstants::FRAMEWORK_PRELOAD_LIBRARIES] = preloadLibs;

This way the QStringList is inserted to the QVariant and later on also reveived withing ctkPlugionFrameworkContext.

I will create a pull request on my mitk github fork for it once I have the bug number.
;) Ingmar

Event Timeline

I'm confused! I have created a branch on my github fork and created a üull request
https://github.com/MITK/MITK/pull/107
This was the second trial. I have deleted the first one as it wasn't based on the v2015.05.0 branch / tag.
Anyway, you can see the easy fix above as well...

;) Ingmar

User goch has pushed new remote branch:

bug-19140-pre-loaded-library-sring-list

[76ac2b]: Merge branch 'bug-19140-pre-loaded-library-sring-list'

Merged commits:

2015-06-19 17:28:59 iwegner [441a1d]
fix to pass pre load libraries as QStringList so they can be extracted later on as QStringList. No need to split them with a , any longer as a QString list is foreseen here in CTK.

Has been merged into the bugfix release branch