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

Regression in qmlRegisterType

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.4.0
    • None

    Description

      It's not possible to use qmlRegisterType<QQuickWindow>() anymore. Now it fails with the following error:

      In file included from /home/kde-devel/kde5/include/QtQml/qqml.h:37:0,
      from /home/kde-devel/kde5/include/QtQuick/qquickwindow.h:42,
      from /home/kde-devel/kde5/include/QtQuick/qquickview.h:37,
      from /home/kde-devel/kde5/include/QtQuick/QQuickView:1,
      from /home/kde-devel/tmp/bgtest/main.cpp:3:
      /home/kde-devel/kde5/include/QtQml/qqmlprivate.h: In instantiation of ‘static QObject* QQmlPrivate::AttachedPropertySelector<T, 1>::attachedProperties(QObject*) [with T = QQuickWindow]’:
      /home/kde-devel/kde5/include/QtQml/qqmlprivate.h:180:20: required from ‘static QObject* (* QQmlPrivate::AttachedPropertySelector<T, 1>::func())(QObject*) [with T = QQuickWindow; QQmlAttachedPropertiesFunc = QObject* (*)(QObject*)]
      /home/kde-devel/kde5/include/QtQml/qqmlprivate.h:190:130: required from ‘QObject* (* QQmlPrivate::attachedPropertiesFunc())(QObject*) [with T = QQuickWindow; QQmlAttachedPropertiesFunc = QObject* (*)(QObject*)]
      /home/kde-devel/kde5/include/QtQml/qqml.h:113:48: required from ‘int qmlRegisterType() [with T = QQuickWindow]
      /home/kde-devel/tmp/bgtest/main.cpp:24:35: required from here
      /home/kde-devel/kde5/include/QtQml/qqmlprivate.h:172:48: error: cannot convert ‘QQuickWindowAttached*’ to ‘QObject*’ in return
      return T::qmlAttachedProperties(obj);
      ^
      /home/kde-devel/kde5/include/QtQml/qqmlprivate.h: In instantiation of ‘static const QMetaObject* QQmlPrivate::AttachedPropertySelector<T, 1>::attachedPropertiesMetaObject(ReturnType* (QObject*)) [with ReturnType = QQuickWindowAttached; T = QQuickWindow]’:
      /home/kde-devel/kde5/include/QtQml/qqmlprivate.h:183:74: required from ‘static const QMetaObject* QQmlPrivate::AttachedPropertySelector<T, 1>::metaObject() [with T = QQuickWindow]
      /home/kde-devel/kde5/include/QtQml/qqmlprivate.h:196:136: required from ‘const QMetaObject* QQmlPrivate::attachedPropertiesMetaObject() [with T = QQuickWindow]
      /home/kde-devel/kde5/include/QtQml/qqml.h:114:54: required from ‘int qmlRegisterType() [with T = QQuickWindow]
      /home/kde-devel/tmp/bgtest/main.cpp:24:35: required from here
      /home/kde-devel/kde5/include/QtQml/qqmlprivate.h:176:20: error: incomplete type ‘QQuickWindowAttached’ used in nested name specifier
      return &ReturnType::staticMetaObject;

      Attachments

        Issue Links

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

          Activity

            People

              aalpert Alan Alpert
              apol-old Aleix Pol (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes