~mzanetti/unity8/panel-button-fixes

« back to all changes in this revision

Viewing changes to tests/mocks/Unity/Application/MirSurfaceItem.cpp

  • Committer: CI Train Bot
  • Author(s): Albert Astals Cid, Michał Sawicz
  • Date: 2015-09-22 12:57:02 UTC
  • mfrom: (1752.8.47 origin/autopkgtests)
  • Revision ID: ci-train-bot@canonical.com-20150922125702-wboqbqanpto9l9s2
Add DEP-8 test for all our UI and unit tests

Some refactoring was needed:
- added a basic Ubuntu.Web mock
- made plugin path an environment, not a compiled-in bit
- moved Unity.Application resources into .qrc

Show diffs side-by-side

added added

removed removed

Lines of Context:
215
215
        QQuickView *quickView =
216
216
            qobject_cast<QQuickView*>(QGuiApplication::topLevelWindows()[0]);
217
217
 
218
 
        QString qmlComponentFilePath;
 
218
        QUrl qmlComponentFilePath;
219
219
        if (!m_qmlSurface->qmlFilePath().isEmpty()) {
220
 
            qmlComponentFilePath.append(m_qmlSurface->qmlFilePath());
 
220
            qmlComponentFilePath = m_qmlSurface->qmlFilePath();
221
221
        } else {
222
 
            qmlComponentFilePath = QString("%1/Unity/Application/MirSurfaceItem.qml")
223
 
                .arg(mockPluginsDir());
 
222
            qmlComponentFilePath = QUrl("qrc:///Unity/Application/MirSurfaceItem.qml");
224
223
        }
225
224
 
226
225
        m_qmlContentComponent = new QQmlComponent(quickView->engine(), qmlComponentFilePath);