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

moc parse error leading to boost::boost

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.0.0 RC 1
    • 5.0.0
    • Build tools: moc
    • None

    Description

      I tried to build akonadi against qt5 (master)
      And I have this error:
      [ 5%] Building CXX object shared/CMakeFiles/akonadi_shared.dir/akapplication.cpp.o
      In file included from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:144:0:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:67:13: error: ‘boost::boost’ has not been declared
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp: In function ‘void qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:70:9: error: ‘staticMetaObject’ was not declared in this scope
      /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:97:6: error: ‘void AkApplication::pollSessionBus() const’ is private
      In file included from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:144:0:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:73:36: error: within this context
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp: At global scope:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:80:26: error: ‘boost::boost’ has not been declared
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:86:27: error: ‘boost::boost’ has not been declared
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:86:265: error: non-member function ‘const QMetaObject* metaObject()’ cannot have cv-qualifier
      In file included from /source/kde/kde4/qt5/include/QtCore/QObject:1:0,
      from /source/kde/kde4/frameworks/akonadi/shared/akapplication.h:23,
      from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:20:
      /source/kde/kde4/qt5/include/QtCore/qobject.h: In function ‘const QMetaObject* metaObject()’:
      /source/kde/kde4/qt5/include/QtCore/qobject.h:379:33: error: ‘QScopedPointer<QObjectData> QObject::d_ptr’ is protected
      In file included from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:144:0:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:88:21: error: within this context
      In file included from /source/kde/kde4/qt5/include/QtCore/QObject:1:0,
      from /source/kde/kde4/frameworks/akonadi/shared/akapplication.h:23,
      from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:20:
      /source/kde/kde4/qt5/include/QtCore/qobject.h:379:33: error: invalid use of non-static data member ‘QObject::d_ptr’
      In file included from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:144:0:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:88:21: error: from this location
      In file included from /source/kde/kde4/qt5/include/QtCore/QObject:1:0,
      from /source/kde/kde4/frameworks/akonadi/shared/akapplication.h:23,
      from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:20:
      /source/kde/kde4/qt5/include/QtCore/qobject.h:379:33: error: ‘QScopedPointer<QObjectData> QObject::d_ptr’ is protected
      In file included from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:144:0:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:88:50: error: within this context
      In file included from /source/kde/kde4/qt5/include/QtCore/QObject:1:0,
      from /source/kde/kde4/frameworks/akonadi/shared/akapplication.h:23,
      from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:20:
      /source/kde/kde4/qt5/include/QtCore/qobject.h:379:33: error: invalid use of non-static data member ‘QObject::d_ptr’
      In file included from /source/kde/kde4/frameworks/akonadi/shared/akapplication.cpp:144:0:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:88:50: error: from this location
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp: At global scope:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:91:14: error: ‘boost::boost’ has not been declared
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp: In function ‘void* qt_metacast(const char*)’:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:95:63: error: invalid use of ‘this’ in non-member function
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:96:40: error: cannot call member function ‘virtual void* QObject::qt_metacast(const char*)’ without object
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp: At global scope:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:99:12: error: ‘boost::boost’ has not been declared
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp: In function ‘int qt_metacall(QMetaObject::Call, int, void**)’:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:101:43: error: cannot call member function ‘virtual int QObject::qt_metacall(QMetaObject::Call, int, void**)’ without object
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:106:32: error: invalid use of ‘this’ in non-member function
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp: In function ‘void* qt_metacast(const char*)’:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:97:1: warning: control reaches end of non-void function [-Wreturn-type]
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp: In function ‘const QMetaObject* metaObject()’:
      /source/kde/kde4/frameworks/akonadi/build/shared/moc_akapplication.cpp:89:1: warning: control reaches end of non-void function [-Wreturn-type]
      make[2]: *** [shared/CMakeFiles/akonadi_shared.dir/akapplication.cpp.o] Erreur 1

      I attach moc file and .h file

      Attachments

        1. akapplication.cpp
          4 kB
          Montel Laurent
        2. akapplication.h
          3 kB
          Montel Laurent
        3. moc_akapplication.cpp
          6 kB
          Montel Laurent
        4. test-moc.tar.bz2
          3 kB
          Montel Laurent

        Issue Links

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

          Activity

            People

              laknoll Lars Knoll
              montel Montel Laurent
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes