Merge lp:~thomas-moenicke/phablet-extras/maliit-framework-testability into lp:~sergiusens/phablet-extras/maliit-framework-packaging

Proposed by Thomas Moenicke
Status: Merged
Merged at revision: 20
Proposed branch: lp:~thomas-moenicke/phablet-extras/maliit-framework-testability
Merge into: lp:~sergiusens/phablet-extras/maliit-framework-packaging
Diff against target: 45 lines (+33/-0)
2 files modified
debian/patches/0005-testability.patch (+32/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~thomas-moenicke/phablet-extras/maliit-framework-testability
Reviewer Review Type Date Requested Status
Sergio Schvezov Pending
Review via email: mp+175279@code.launchpad.net

Commit message

adding patch that loads testability driver for autopilot

Description of the change

adding patch that loads testability driver for autopilot

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/patches/0005-testability.patch'
2--- debian/patches/0005-testability.patch 1970-01-01 00:00:00 +0000
3+++ debian/patches/0005-testability.patch 2013-07-17 13:17:25 +0000
4@@ -0,0 +1,32 @@
5+From: Thomas Moenicke <thomas.moenicke@canonical.com>
6+Subject: loading testability driver. code copied from CameraApp
7+
8+Forwarded: no
9+Index: maliit-framework-0.99+git20130702+97e8335/passthroughserver/main.cpp
10+===================================================================
11+--- maliit-framework-0.99+git20130702+97e8335.orig/passthroughserver/main.cpp 2013-07-17 14:16:06.235252966 +0200
12++++ maliit-framework-0.99+git20130702+97e8335/passthroughserver/main.cpp 2013-07-17 12:02:29.000000000 +0200
13+@@ -138,6 +138,23 @@
14+
15+ QGuiApplication app(argc, argv);
16+
17++ // The testability driver is only loaded by QApplication but not by QGuiApplication.
18++ // However, QApplication depends on QWidget which would add some unneeded overhead => Let's load the testability driver on our own.
19++ if (app.arguments().contains(QLatin1String("-testability"))) {
20++ QLibrary testLib(QLatin1String("qttestability"));
21++ if (testLib.load()) {
22++ typedef void (*TasInitialize)(void);
23++ TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
24++ if (initFunction) {
25++ initFunction();
26++ } else {
27++ qCritical("Library qttestability resolve failed!");
28++ }
29++ } else {
30++ qCritical("Library qttestability load failed!");
31++ }
32++ }
33++
34+ // Input Context Connection
35+ QSharedPointer<MInputContextConnection> icConnection(createConnection(connectionOptions));
36+
37
38=== modified file 'debian/patches/series'
39--- debian/patches/series 2013-07-15 08:11:35 +0000
40+++ debian/patches/series 2013-07-17 13:17:25 +0000
41@@ -2,3 +2,4 @@
42 0002-ubuntu_session_type.patch
43 0003-prediction.patch
44 0004-fix_activationlostevent.patch
45+0005-testability.patch

Subscribers

People subscribed via source and target branches