Merge lp:~mzanetti/autopilot-qt/workaround-xpathselect into lp:autopilot-qt

Proposed by Michael Zanetti
Status: Merged
Approved by: Michael Zanetti
Approved revision: 42
Merged at revision: 44
Proposed branch: lp:~mzanetti/autopilot-qt/workaround-xpathselect
Merge into: lp:autopilot-qt
Diff against target: 11 lines (+1/-1)
1 file modified
driver/rootnode.cpp (+1/-1)
To merge this branch: bzr merge lp:~mzanetti/autopilot-qt/workaround-xpathselect
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre (community) Approve
PS Jenkins bot continuous-integration Approve
Thomi Richards Pending
Review via email: mp+153544@code.launchpad.net

Commit message

also remove . from appname as libxpathselect doesn't like it any more

Description of the change

This makes autopilot work again for apps that need to have an appname like com.canonical.foobar or com.ubuntu.foobar

There are most likely all other special characters affected too. However, in my opinion libxpathselect should be able to process dots and other special chars like it did before, so not spending the effort to find all non working combinations until I'm sure libxpathselect won't be changed to support such app names again.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Could you please add integration tests for this?

Thanks!

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Here's a branch that adds full testing to autopilot-qt.

https://code.launchpad.net/~mzanetti/autopilot-qt/add-tests/+merge/153695

However, writing the tests confirmed what I already said in the description: This is only a workaround that tests work again and should be removed again (both, the remove(' ') too).

autopilot-qt itself introspects an app just fine even if there are spaces, dots and whatnot in the app name. Its autopilot itself that has issues with it and for thus I really think such workarounds should be applied to autopilot itself instead of all of their toolkit adaption drivers if the problem is not fixed to allow those characters again.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Fair enough. As there are no packaging changes and this fixes tests, I'll mark it as Approved.

Can we please link this to a bug though?

review: Approve
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> Can we please link this to a bug though?

Done. Also updated the bug report with latest findings on this issue.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'driver/rootnode.cpp'
2--- driver/rootnode.cpp 2013-03-04 22:26:53 +0000
3+++ driver/rootnode.cpp 2013-03-15 12:52:23 +0000
4@@ -39,7 +39,7 @@
5
6 std::string RootNode::GetName() const
7 {
8- QString appName = application_->applicationName().remove(' ');
9+ QString appName = application_->applicationName().remove(' ').remove('.');
10 return appName.isEmpty() ? "Root" : appName.toStdString();
11 }
12

Subscribers

People subscribed via source and target branches