Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40816

Using qmlRegisterType<QQuickWindow>(); triggers build failure

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.4.0
    • None

    Description

      Building KWin (git://anongit.kde.org/kwin.git) fails against latest 5.4 branch:

      [ 995s] ^
      [ 996s] In file included from /usr/include/qt5/QtQml/qqml.h:45:0,
      [ 996s] from /usr/include/qt5/QtQuick/qquickitem.h:46,
      [ 996s] from /usr/include/qt5/QtQuick/qquickpainteditem.h:45,
      [ 996s] from /usr/include/qt5/QtQuick/QQuickPaintedItem:1,
      [ 996s] from /home/abuild/rpmbuild/BUILD/kwin-5.0.41git/scripting/../thumbnailitem.h:26,
      [ 996s] from /home/abuild/rpmbuild/BUILD/kwin-5.0.41git/scripting/scripting.cpp:31:
      [ 996s] /usr/include/qt5/QtQml/qqmlprivate.h: In instantiation of 'static QObject* QQmlPrivate::AttachedPropertySelector<T, 1>::attachedProperties(QObject*) [with T = QQuickWindow]':
      [ 996s] /usr/include/qt5/QtQml/qqmlprivate.h:188:20: required from 'static QObject* (* QQmlPrivate::AttachedPropertySelector<T, 1>::func())(QObject*) [with T = QQuickWindow; QQmlAttachedPropertiesFunc = QObject* (*)(QObject*)]'
      [ 996s] /usr/include/qt5/QtQml/qqmlprivate.h:198:130: required from 'QObject* (* QQmlPrivate::attachedPropertiesFunc())(QObject*) [with T = QQuickWindow; QQmlAttachedPropertiesFunc = QObject* (*)(QObject*)]'
      [ 996s] /usr/include/qt5/QtQml/qqml.h:121:48: required from 'int qmlRegisterType() [with T = QQuickWindow]'
      [ 996s] /home/abuild/rpmbuild/BUILD/kwin-5.0.41git/scripting/scripting.cpp:623:35: required from here
      [ 996s] /usr/include/qt5/QtQml/qqmlprivate.h:180:48: error: cannot convert 'QQuickWindowAttached*' to 'QObject*' in return
      [ 996s] return T::qmlAttachedProperties(obj);
      [ 996s] ^
      [ 996s] /usr/include/qt5/QtQml/qqmlprivate.h: In instantiation of 'static const QMetaObject* QQmlPrivate::AttachedPropertySelector<T, 1>::attachedPropertiesMetaObject(ReturnType* (QObject*)) [with ReturnType = QQuickWindowAttached; T = QQuickWindow]':
      [ 996s] /usr/include/qt5/QtQml/qqmlprivate.h:191:74: required from 'static const QMetaObject* QQmlPrivate::AttachedPropertySelector<T, 1>::metaObject() [with T = QQuickWindow]'
      [ 996s] /usr/include/qt5/QtQml/qqmlprivate.h:204:136: required from 'const QMetaObject* QQmlPrivate::attachedPropertiesMetaObject() [with T = QQuickWindow]'
      [ 996s] /usr/include/qt5/QtQml/qqml.h:122:54: required from 'int qmlRegisterType() [with T = QQuickWindow]'
      [ 996s] /home/abuild/rpmbuild/BUILD/kwin-5.0.41git/scripting/scripting.cpp:623:35: required from here
      [ 996s] /usr/include/qt5/QtQml/qqmlprivate.h:184:20: error: incomplete type 'QQuickWindowAttached' used in nested name specifier
      [ 996s] return &ReturnType::staticMetaObject;
      [ 996s] ^

      Downstream report - https://bugs.kde.org/show_bug.cgi?id=338277

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              srutledg Shawn Rutledge
              šumski Hrvoje Senjan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes