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

Error: base class has incomplete type class XXXXX : public QObject

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P0: Blocker
    • None
    • 6.4.0 FF
    • Multimedia, Remote Objects
    • None

    Description

       In file included from /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview.cpp:40:
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview_p.h:62:37: error: base class has incomplete type
      agent:2022/03/24 03:36:30 build.go:394: class AndroidSurfaceHolder : public QObject
      agent:2022/03/24 03:36:30 build.go:394:                              ~~~~~~~^~~~~~~
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/install/target/include/QtCore/qscopedpointer.h:101:7: note: forward declaration of 'QObject'
      agent:2022/03/24 03:36:30 build.go:394: class QObject;
      agent:2022/03/24 03:36:30 build.go:394:       ^
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview.cpp:40:
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview_p.h:88:35: error: base class has incomplete type
      agent:2022/03/24 03:36:30 build.go:394: class AndroidSurfaceView : public QObject
      agent:2022/03/24 03:36:30 build.go:394:                            ~~~~~~~^~~~~~~
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/install/target/include/QtCore/qscopedpointer.h:101:7: note: forward declaration of 'QObject'
      agent:2022/03/24 03:36:30 build.go:394: class QObject;
      agent:2022/03/24 03:36:30 build.go:394:       ^
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview.cpp:145:9: error: use of undeclared identifier 'connect'; did you mean 'QEventLoop::connect'?
      agent:2022/03/24 03:36:30 build.go:394:         connect(m_surfaceHolder, &AndroidSurfaceHolder::surfaceCreated,
      agent:2022/03/24 03:36:30 build.go:394:         ^~~~~~~
      agent:2022/03/24 03:36:30 build.go:394:         QEventLoop::connect
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/install/target/include/QtCore/qobject.h:241:43: note: 'QEventLoop::connect' declared here
      agent:2022/03/24 03:36:30 build.go:394:     static inline QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal,
      agent:2022/03/24 03:36:30 build.go:394:                                           ^
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview.cpp:161:5: warning: delete called on non-final 'AndroidSurfaceHolder' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
      agent:2022/03/24 03:36:30 build.go:394:     delete m_surfaceHolder;
      agent:2022/03/24 03:36:30 build.go:394:     ^
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview.cpp:42:
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/install/target/include/QtCore/qcoreapplication.h:47:
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/install/target/include/QtCore/qeventloop.h:43:
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/install/target/include/QtCore/qobject.h:263:28: error: cannot initialize a parameter of type 'const QObject *' with an lvalue of type 'const typename QtPrivate::FunctionPointer<void (AndroidSurfaceHolder::*)()>::Object *' (aka 'const AndroidSurfaceHolder *')
      agent:2022/03/24 03:36:30 build.go:394:         return connectImpl(sender, reinterpret_cast<void **>(&signal),
      agent:2022/03/24 03:36:30 build.go:394:                            ^~~~~~
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview.cpp:145:9: note: in instantiation of function template specialization 'QObject::connect<void (AndroidSurfaceHolder::*)(), void (AndroidSurfaceView::*)()>' requested here
      agent:2022/03/24 03:36:30 build.go:394:         connect(m_surfaceHolder, &AndroidSurfaceHolder::surfaceCreated,
      agent:2022/03/24 03:36:30 build.go:394:         ^
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/install/target/include/QtCore/qobject.h:462:63: note: passing argument to parameter 'sender' here
      agent:2022/03/24 03:36:30 build.go:394:     static QMetaObject::Connection connectImpl(const QObject *sender, void **signal,
      agent:2022/03/24 03:36:30 build.go:394:                                                               ^
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview.cpp:40:
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview_p.h:54:
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/install/target/include/QtCore/qjniobject.h:43:
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/install/target/include/QtCore/qsharedpointer.h:48:
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/install/target/include/QtCore/qsharedpointer_impl.h:66:
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/install/target/include/QtCore/qmetatype.h:53:
      agent:2022/03/24 03:36:30 build.go:394: In file included from /home/qt/work/install/target/include/QtCore/qobjectdefs.h:49:
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/install/target/include/QtCore/qobjectdefs_impl.h:419:94: error: static_cast from 'QObject *' to 'typename FuncType::Object *' (aka 'AndroidSurfaceView *'), which are not related by inheritance, is not allowed
      agent:2022/03/24 03:36:30 build.go:394:                 FuncType::template call<Args, R>(static_cast<QSlotObject*>(this_)->function, static_cast<typename FuncType::Object *>(r), a);
      agent:2022/03/24 03:36:30 build.go:394:                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/install/target/include/QtCore/qobjectdefs_impl.h:428:57: note: in instantiation of member function 'QtPrivate::QSlotObject<void (AndroidSurfaceView::*)(), QtPrivate::List<>, void>::impl' requested here
      agent:2022/03/24 03:36:30 build.go:394:         explicit QSlotObject(Func f) : QSlotObjectBase(&impl), function(f) {}
      agent:2022/03/24 03:36:30 build.go:394:                                                         ^
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/install/target/include/QtCore/qobject.h:265:32: note: in instantiation of member function 'QtPrivate::QSlotObject<void (AndroidSurfaceView::*)(), QtPrivate::List<>, void>::QSlotObject' requested here
      agent:2022/03/24 03:36:30 build.go:394:                            new QtPrivate::QSlotObject<Func2, typename QtPrivate::List_Left<typename SignalType::Arguments, SlotType::ArgumentCount>::Value,
      agent:2022/03/24 03:36:30 build.go:394:                                ^
      agent:2022/03/24 03:36:30 build.go:394: /home/qt/work/qt/qtmultimedia/src/plugins/multimedia/android/wrappers/jni/androidsurfaceview.cpp:145:9: note: in instantiation of function template specialization 'QObject::connect<void (AndroidSurfaceHolder::*)(), void (AndroidSurfaceView::*)()>' requested here
      agent:2022/03/24 03:36:30 build.go:394:         connect(m_surfaceHolder, &AndroidSurfaceHolder::surfaceCreated,
      agent:2022/03/24 03:36:30 build.go:394:         ^
      agent:2022/03/24 03:36:30 build.go:394: 1 warning and 5 errors generated.
      

      Build log: https://testresults.qt.io/logs/qt/qtmultimedia/52637656d01c0e331816f7a0bc272ae626f086bb/LinuxRHEL_8_4x86_64AndroidAndroid_ANYarm64GCCqtci-linux-RHEL-8.4-x86_64-50-54abecDisableTests_Sccache/20843b50d8fbf085b88f195a0706a85ca097f340/build_1648093591/log.txt.gz

      Details: https://testresults.qt.io/coin/integration/qt/qtmultimedia/tasks/1648093565

      Tested changes (refs/builds/qtci/dev/1648092855):

      https://codereview.qt-project.org/c/qt/qtmultimedia/+/402273/2 Update dependencies on 'dev' in qt/qtmultimedia

      Same issue also in

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            janihe Jani Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes