Merge lp:~artmello/gallery-app/gallery-app-testability into lp:gallery-app

Proposed by Arthur Mello
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 986
Merged at revision: 993
Proposed branch: lp:~artmello/gallery-app/gallery-app-testability
Merge into: lp:gallery-app
Diff against target: 25 lines (+15/-0)
1 file modified
src/gallery-application.cpp (+15/-0)
To merge this branch: bzr merge lp:~artmello/gallery-app/gallery-app-testability
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+221150@code.launchpad.net

Commit message

Add support to load qttestability using env var QT_LOAD_TESTABILITY

Description of the change

Add support to load qttestability using env var QT_LOAD_TESTABILITY

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
Arthur Mello (artmello) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list:
No
Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes):
Yes
Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?:
Yes
Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/gallery-app) on device or emulator?
Yes
If you changed the UI, was the change specified/approved by design?
No UI changes.
If you changed the packaging (debian), did you subscribe a core-dev to this MP?
No packaging changes.

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes

Did CI run pass? If not, please explain why.
Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

Code looks good and works as expected!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/gallery-application.cpp'
2--- src/gallery-application.cpp 2014-03-27 22:38:39 +0000
3+++ src/gallery-application.cpp 2014-05-27 23:43:08 +0000
4@@ -82,6 +82,21 @@
5 if (!ok)
6 QApplication::quit();
7
8+ if (qgetenv("QT_LOAD_TESTABILITY") == "1") {
9+ QLibrary testLib(QLatin1String("qttestability"));
10+ if (testLib.load()) {
11+ typedef void (*TasInitialize)(void);
12+ TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
13+ if (initFunction) {
14+ initFunction();
15+ } else {
16+ qCritical("Library qttestability resolve failed!");
17+ }
18+ } else {
19+ qCritical("Library qttestability load failed!");
20+ }
21+ }
22+
23 registerQML();
24
25 m_galleryManager = new GalleryManager(isDesktopMode(), m_cmdLineParser->picturesDir(), m_view);

Subscribers

People subscribed via source and target branches