applocal.ps1/qtdeploy.ps1 wont deploy plugins for libraries only referenced in QML
- Dominant language
- CMake
- Stars
- 27.5k
- Forks
- 7.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 321
Description
**Describe the bug**
QtLocation depends on the Qt geoservices plugins. If a Qt plugin such as QtLocation is only used within QML it will not be picked up by `dumpbin` which leads to `appdeploy.ps1` & `qtdeploy.ps1` not deploying necessary QML plugins such as `geoservices`. Even if the application being built links to QtLocation, unless it actually imports a function from QtLocation, `dumpbin` will not report it as a dependency.
This can be worked around by including something from QtLocation and using it in some way. This will make dumpbin report QtLocation as a dependency and then `geoservices` will be deployed.
I've only had this happen with QtLocation because that is what I use but I imagine it can happen in other cases where a library is only referenced via QML.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a Qt application linked to QtLocation with a QML file importing QtLocation and using it in some way. Make sure the application is not using QtLocation within c++ code.
2. Build the application
3. Look in the plugins folder next to the exe - there should be a `geoservices` folder but there is not.
**Expected behavior**
Linking to a library such as QtLocation should deploy the required plugins.
Contributor guide
Assessment
This issue has not been assessed yet.