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

Source incompatible change in metatype system

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.5.0 Beta
    • 5.5.0
    • Core: Other
    • None

    Description

      Recent qtbase/dev seems to require class definitions in some cases where previously a declaration was sufficent.

      The following compile error occures/occured in Qt Creator sources

      .... linux-g++ -o .obj/debug-shared/texteditor.o texteditor.cpp
      In file included from /data/dev/qt-5/qtbase/include/QtCore/qmetatype.h:1:0,
                       from /data/dev/qt-5/qtbase/include/QtCore/QMetaType:1,
                       from ../../plugins/coreplugin/id.h:36,
                       from textdocument.h:36,
                       from texteditor.h:34,
                       from texteditor.cpp:31:
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h: In instantiation of 'struct Myns::QtPrivate::IsQEnumHelper<TextEditor::StorageSettings>':
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h:1554:40:   required from 'struct Myns::QMetaTypeId<TextEditor::StorageSettings>'
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h:1570:10:   required from 'struct Myns::QMetaTypeId2<TextEditor::StorageSettings>'
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h:1575:8:   required from 'struct Myns::QMetaTypeId2<const TextEditor::StorageSettings&>'
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qobject_impl.h:90:49:   required from 'struct Myns::QtPrivate::TypesAreDeclaredMetaType<Myns::QtPrivate::List<const TextEditor::StorageSettings&> >'
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qobject.h:233:87:   required from 'static Myns::QMetaObject::Connection Myns::QObject::connect(const typename Myns::QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename Myns::QtPrivate::FunctionPointer<Func2>::Object*, Func2, Myns::Qt::ConnectionType) [with Func1 = void (TextEditor::TextEditorSettings::*)(const TextEditor::StorageSettings&); Func2 = void (TextEditor::TextEditorWidget::*)(const TextEditor::StorageSettings&); typename Myns::QtPrivate::FunctionPointer<Func>::Object = TextEditor::TextEditorSettings; typename Myns::QtPrivate::FunctionPointer<Func2>::Object = TextEditor::TextEditorWidget]'
      texteditor.cpp:2890:53:   required from here
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h:1375:61: error: invalid use of incomplete type 'const class TextEditor::StorageSettings'
      In file included from texteditor.h:34:0,
                       from texteditor.cpp:31:
      textdocument.h:56:7: error: forward declaration of 'const class TextEditor::StorageSettings'
      In file included from /data/dev/qt-5/qtbase/include/QtCore/qmetatype.h:1:0,
                       from /data/dev/qt-5/qtbase/include/QtCore/QMetaType:1,
                       from ../../plugins/coreplugin/id.h:36,
                       from textdocument.h:36,
                       from texteditor.h:34,
                       from texteditor.cpp:31:
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h: In instantiation of 'struct 
      Myns::QtPrivate::IsQEnumHelper<TextEditor::ExtraEncodingSettings>':
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h:1554:40:   required from 'struct Myns::QMetaTypeId<TextEditor::ExtraEncodingSettings>'
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h:1570:10:   required from 'struct Myns::QMetaTypeId2<TextEditor::ExtraEncodingSettings>'
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h:1575:8:   required from 'struct Myns::QMetaTypeId2<const TextEditor::ExtraEncodingSettings&>'
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qobject_impl.h:90:49:   required from 'struct Myns::QtPrivate::TypesAreDeclaredMetaType<Myns::QtPrivate::List<const TextEditor::ExtraEncodingSettings&> >'
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qobject.h:233:87:   required from 'static Myns::QMetaObject::Connection Myns::QObject::connect(const typename Myns::QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename Myns::QtPrivate::FunctionPointer<Func2>::Object*, Func2, Myns::Qt::ConnectionType) [with Func1 = void (TextEditor::TextEditorSettings::*)(const TextEditor::ExtraEncodingSettings&); Func2 = void (TextEditor::TextEditorWidget::*)(const TextEditor::ExtraEncodingSettings&); typename Myns::QtPrivate::FunctionPointer<Func>::Object = TextEditor::TextEditorSettings; typename Myns::QtPrivate::FunctionPointer<Func2>::Object = TextEditor::TextEditorWidget]'
      texteditor.cpp:2900:59:   required from here
      /data/dev/qt-5/qtbase/include/QtCore/../../src/corelib/kernel/qmetatype.h:1375:61: error: invalid use of incomplete type 'const class TextEditor::ExtraEncodingSettings'
      In file included from texteditor.h:34:0,
                       from texteditor.cpp:31:
      textdocument.h:53:7: error: forward declaration of 'const class TextEditor::ExtraEncodingSettings'
      ICECC[13931] 12:23:29: Compiled on 10.9.78.24
      Makefile:15699: recipe for target '.obj/debug-shared/texteditor.o' failed
      

      Attachments

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

        Activity

          People

            ogoffart Olivier Goffart (Woboq GmbH)
            hjk hjk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes