~unity-2d-team/unity-2d/unity-2d-formfactor-fixes

« back to all changes in this revision

Viewing changes to libunity-2d-private/src/unity2dapplication.cpp

Remove code to load testability since Qt does that for us. Fixes: . Appoved by Gerry Boland.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include <QtPlugin>
46
46
#include <QPluginLoader>
47
47
#include <QLibraryInfo>
48
 
#include "testabilityinterface.h"
49
48
 
50
49
// libc
51
50
#include <stdlib.h>
163
162
: QApplication(argc, argv)
164
163
, m_platformFontTracker(new PlatformFontTracker)
165
164
{
166
 
    /* Load Testability Plugin on startup if requested */
167
 
    if (arrayContains(argv, argv + argc, "-testability")) {
168
 
        loadTestabilityPlugin();
169
 
    }
170
 
 
171
165
    /* Configure translations */
172
166
    Unity2dTr::init("unity-2d", INSTALL_PREFIX "/share/locale");
173
167
 
219
213
    return QApplication::x11EventFilter(event);
220
214
}
221
215
 
222
 
/*
223
 
 * Load the Testability Plugin if available
224
 
 *
225
 
 * Testability is a tool required for UI testing. See tests/ directory.
226
 
 */
227
 
void Unity2dApplication::loadTestabilityPlugin()
228
 
{
229
 
     QString testabilityPlugin = "testability/libtestability";
230
 
     QString testabilityPluginPostfix = ".so";
231
 
 
232
 
     testabilityPlugin = QLibraryInfo::location(QLibraryInfo::PluginsPath)
233
 
                         + QObject::tr("/") + testabilityPlugin + testabilityPluginPostfix;
234
 
     QPluginLoader loader(testabilityPlugin.toLatin1().data());
235
 
 
236
 
     QObject *plugin = loader.instance();
237
 
     if (plugin) {
238
 
         qDebug("Testability plugin loaded successfully!");
239
 
         testabilityInterface = qobject_cast<TestabilityInterface *>(plugin);
240
 
 
241
 
         if (testabilityInterface) {
242
 
             qDebug("Testability interface obtained!");
243
 
             testabilityInterface->Initialize();
244
 
         } else {
245
 
             qDebug("Failed to get testability interface!");
246
 
         }
247
 
     } else {
248
 
         qDebug("Testability plugin %s load failed with error:%s",
249
 
                testabilityPlugin.toLatin1().data(), loader.errorString().toLatin1().data());
250
 
     }
251
 
}
252
 
 
253
216
#include <unity2dapplication.moc>