~mterry/+junk/u8.2

« back to all changes in this revision

Viewing changes to tests/uqmlscene/main.cpp

  • Committer: Michael Terry
  • Date: 2014-11-17 14:56:04 UTC
  • mfrom: (1317.1.118 unity8)
  • Revision ID: michael.terry@canonical.com-20141117145604-96dn9p5nwkifq2f4
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
428
428
 
429
429
    MouseTouchAdaptor mouseTouchAdaptor;
430
430
    app.installNativeEventFilter(&mouseTouchAdaptor);
 
431
    // Create it before loading the module, so that TestUtil
 
432
    // doesn't create one with a fake timer factory.
 
433
    // When interacting manually with a test we want the real deal.
 
434
    new TouchRegistry;
431
435
 
432
436
#ifndef QT_NO_TRANSLATION
433
437
    QTranslator translator;
499
503
                QQuickItem *contentItem = qobject_cast<QQuickItem *>(topLevel);
500
504
                if (contentItem) {
501
505
                    qxView = new QQuickView(&engine, nullptr);
502
 
                    if (TouchRegistry::instance() == nullptr) {
503
 
                        new TouchRegistry(qxView);
504
 
                    } else {
505
 
                        TouchRegistry::instance()->setParent(qxView);
506
 
                    }
 
506
                    TouchRegistry::instance()->setParent(qxView);
507
507
                    qxView->installEventFilter(TouchRegistry::instance());
508
508
                    window = qxView;
509
509
                    // Set window default properties; the qml can still override them