~ci-train-bot/qtubuntu/qtubuntu-ubuntu-artful-2819

« back to all changes in this revision

Viewing changes to src/ubuntumirclient/qmirclientwindow.cpp

  • Committer: Albert Astals Cid
  • Date: 2017-02-17 14:32:49 UTC
  • mto: This revision was merged to the branch mainline in revision 374.
  • Revision ID: albert.astals@canonical.com-20170217143249-06jva0xeu4ug0izh
Register metatype used in queued invokeMethod

Otherwise we get
QMetaMethod::invoke: Unable to handle unregistered datatype 'QPlatformWindow*'

Show diffs side-by-side

added added

removed removed

Lines of Context:
719
719
    return mPersistentIdStr;
720
720
}
721
721
 
 
722
Q_DECLARE_METATYPE(QPlatformWindow*)
 
723
 
722
724
QMirClientWindow::QMirClientWindow(QWindow *w, QMirClientInput *input, QMirClientNativeInterface *native,
723
725
                                   QMirClientAppStateController *appState, EGLDisplay eglDisplay,
724
726
                                   MirConnection *mirConnection, QMirClientDebugExtension *debugExt)
735
737
    , mScale(1.0)
736
738
    , mFormFactor(mir_form_factor_unknown)
737
739
{
 
740
    static bool metaTypeRegistered = false;
 
741
    if (Q_UNLIKELY(!metaTypeRegistered)) {
 
742
        qRegisterMetaType<QPlatformWindow*>();
 
743
        metaTypeRegistered = true;
 
744
    }
 
745
 
738
746
    mWindowExposed = mSurface->mNeedsExposeCatchup == false;
739
747
 
740
748
    qCDebug(mirclient, "QMirClientWindow(window=%p, screen=%p, input=%p, surf=%p) with title '%s', role: '%d'",