Merge lp:~mzanetti/unity-mir/fix-appid-parsing into lp:unity-mir
Status: | Merged |
---|---|
Approved by: | Gerry Boland |
Approved revision: | 115 |
Merged at revision: | 115 |
Proposed branch: | lp:~mzanetti/unity-mir/fix-appid-parsing |
Merge into: | lp:unity-mir |
Diff against target: |
76 lines (+25/-10) 3 files modified
src/modules/Unity/Application/application_manager.cpp (+9/-1) src/modules/Unity/Application/desktopfilereader.cpp (+13/-8) src/modules/Unity/Application/desktopfilereader.h (+3/-1) |
To merge this branch: | bzr merge lp:~mzanetti/unity-mir/fix-appid-parsing |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gerry Boland (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+190419@code.launchpad.net |
Commit message
fix loading of appId when an app is launched with --desktop_file_hint
Description of the change
The applicationmanager uses the appId to identify applications. Right now there is a bug that causes the appId to be set to the full .desktop file path instead of only the appId. This causes focusing issues for manually launched (via cmdline) apps and also breaks app_lifecycle AP tests on Mir.
The issue is that the DesktopFileReader can be called with both, an appid and a file path and correctly finds the according desktop file, but in case it's called with a full file path, it assigns that one to the appId instead of exctracting the appId from it.
This merge splits the DesktopFileReader's ctor into 2 in order to avoid such confusion. When using a QString, it expects an appId. In order to load a .desktop file specified by a filename, the second ctor with QFileInfo is to be used.
This merge obviously also makes use of the QFileInfo ctor in the case when we launch an app with --desktop_
PASSED: Continuous integration, rev:114 jenkins. qa.ubuntu. com/job/ unity-mir- ci/104/ jenkins. qa.ubuntu. com/job/ unity-mir- saucy-amd64- ci/46 jenkins. qa.ubuntu. com/job/ unity-mir- saucy-armhf- ci/104 jenkins. qa.ubuntu. com/job/ unity-mir- saucy-armhf- ci/104/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity-mir- saucy-i386- ci/104
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 10.97.0. 26:8080/ job/unity- mir-ci/ 104/rebuild
http://