Merge lp:~aacid/unity-2d/unity-2d_remove_testability_loading into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 859
Merged at revision: 860
Proposed branch: lp:~aacid/unity-2d/unity-2d_remove_testability_loading
Merge into: lp:unity-2d
Diff against target: 122 lines (+0/-77)
3 files modified
libunity-2d-private/src/testabilityinterface.h (+0/-37)
libunity-2d-private/src/unity2dapplication.cpp (+0/-37)
libunity-2d-private/src/unity2dapplication.h (+0/-3)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d_remove_testability_loading
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+89652@code.launchpad.net

Description of the change

Remove code to load testability since Qt does that for us

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Thanks for cleaning up my mess :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'libunity-2d-private/src/testabilityinterface.h'
2--- libunity-2d-private/src/testabilityinterface.h 2011-12-09 15:16:58 +0000
3+++ libunity-2d-private/src/testabilityinterface.h 1970-01-01 00:00:00 +0000
4@@ -1,37 +0,0 @@
5-/***************************************************************************
6-**
7-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
8-** All rights reserved.
9-** Contact: Nokia Corporation (testabilitydriver@nokia.com)
10-**
11-** This file is part of TDriver.
12-**
13-** If you have questions regarding the use of this file, please contact
14-** Nokia at testabilitydriver@nokia.com .
15-**
16-** This library is free software; you can redistribute it and/or
17-** modify it under the terms of the GNU Lesser General Public
18-** License version 2.1 as published by the Free Software Foundation
19-** and appearing in the file LICENSE.LGPL included in the packaging
20-** of this file.
21-**
22-****************************************************************************/
23-
24-#include <QObject>
25-#include <QString>
26-
27-class TestabilityInterface
28-{
29-public:
30- virtual ~TestabilityInterface() {}
31-
32- /*!
33- Initializes the plugin once loaded.
34- */
35- virtual void Initialize() = 0;
36-
37-};
38-
39- Q_DECLARE_INTERFACE(TestabilityInterface,
40- "com.nokia.testability.TestabilityInterface/1.0")
41-
42
43=== modified file 'libunity-2d-private/src/unity2dapplication.cpp'
44--- libunity-2d-private/src/unity2dapplication.cpp 2011-12-09 15:16:58 +0000
45+++ libunity-2d-private/src/unity2dapplication.cpp 2012-01-23 10:36:19 +0000
46@@ -45,7 +45,6 @@
47 #include <QtPlugin>
48 #include <QPluginLoader>
49 #include <QLibraryInfo>
50-#include "testabilityinterface.h"
51
52 // libc
53 #include <stdlib.h>
54@@ -163,11 +162,6 @@
55 : QApplication(argc, argv)
56 , m_platformFontTracker(new PlatformFontTracker)
57 {
58- /* Load Testability Plugin on startup if requested */
59- if (arrayContains(argv, argv + argc, "-testability")) {
60- loadTestabilityPlugin();
61- }
62-
63 /* Configure translations */
64 Unity2dTr::init("unity-2d", INSTALL_PREFIX "/share/locale");
65
66@@ -219,35 +213,4 @@
67 return QApplication::x11EventFilter(event);
68 }
69
70-/*
71- * Load the Testability Plugin if available
72- *
73- * Testability is a tool required for UI testing. See tests/ directory.
74- */
75-void Unity2dApplication::loadTestabilityPlugin()
76-{
77- QString testabilityPlugin = "testability/libtestability";
78- QString testabilityPluginPostfix = ".so";
79-
80- testabilityPlugin = QLibraryInfo::location(QLibraryInfo::PluginsPath)
81- + QObject::tr("/") + testabilityPlugin + testabilityPluginPostfix;
82- QPluginLoader loader(testabilityPlugin.toLatin1().data());
83-
84- QObject *plugin = loader.instance();
85- if (plugin) {
86- qDebug("Testability plugin loaded successfully!");
87- testabilityInterface = qobject_cast<TestabilityInterface *>(plugin);
88-
89- if (testabilityInterface) {
90- qDebug("Testability interface obtained!");
91- testabilityInterface->Initialize();
92- } else {
93- qDebug("Failed to get testability interface!");
94- }
95- } else {
96- qDebug("Testability plugin %s load failed with error:%s",
97- testabilityPlugin.toLatin1().data(), loader.errorString().toLatin1().data());
98- }
99-}
100-
101 #include <unity2dapplication.moc>
102
103=== modified file 'libunity-2d-private/src/unity2dapplication.h'
104--- libunity-2d-private/src/unity2dapplication.h 2011-12-09 15:16:58 +0000
105+++ libunity-2d-private/src/unity2dapplication.h 2012-01-23 10:36:19 +0000
106@@ -29,8 +29,6 @@
107
108 class PlatformFontTracker;
109
110-class TestabilityInterface;
111-
112 class AbstractX11EventFilter
113 {
114 public:
115@@ -71,7 +69,6 @@
116 void loadTestabilityPlugin();
117 QList<AbstractX11EventFilter*> m_x11EventFilters;
118 PlatformFontTracker* m_platformFontTracker;
119- TestabilityInterface* testabilityInterface;
120 };
121
122 #endif // UNITY2DAPPLICATION_H

Subscribers

People subscribed via source and target branches