Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-292

QContact should be self-contained

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • 1.0.2
    • 1.0.x
    • Contacts
    • None
    • Linux laptop running Debian. Expected to fail the same way in MeeGo.

    Description

      I get compiler errors in qtcontacts-tracker (harmattan/4.6.6) in combination with Qt 4.6.2 and qtmobility (harmattan/4.5.3.git20100520-0maemo1).

      I'm working on MeeGo (PIM sync). Right now, the Tracker storage for QtContacts is broken in MeeGo. Because this affects me, I'm trying to find compatible components.

      Mathias Hasselmann analyzed the problem and concluded that the QContact header file should be self-contained.

      As a workaround, the following patch in qtcontacts-tracker avoids the issue for the plugin itself:

      diff --git a/src/engine/engine.h b/src/engine/engine.h
      index adde585..d3790e8 100644
      — a/src/engine/engine.h
      +++ b/src/engine/engine.h
      @@ -53,8 +53,8 @@
      // We mean it.
      //

      -#include <dao/contactdetailschema.h>
      #include <QtTracker/Tracker>
      +#include <dao/contactdetailschema.h>

      QTM_USE_NAMESPACE;

      diff --git a/src/plugin/factory.cpp b/src/plugin/factory.cpp
      index dffc9f8..b5866bb 100644
      — a/src/plugin/factory.cpp
      +++ b/src/plugin/factory.cpp
      @@ -39,8 +39,8 @@
      **
      ****************************************************************************/

      -#include "factory.h"
      #include <engine/engine.h>
      +#include "factory.h"

      QContactManagerEngine* ContactTrackerFactory::engine(const QMap<QString, QString>& parameters,
      QContactManager::Error* error)

      g++ -c -m64 -pipe -O2 -DQT_SHARED -I/usr/local/Trolltech/Qt-4.6.2/include -I/usr/include/qt4 -I/usr/include/qt4/QtCore -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_TESTLIB_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/home/local/Trolltech/Qt-4.6.2/mkspecs/linux-g++-64 -I. -I/home/local/Trolltech/Qt-4.6.2/include/QtCore -I/home/local/Trolltech/Qt-4.6.2/include/QtGui -I/home/local/Trolltech/Qt-4.6.2/include/QtTest -I/home/local/Trolltech/Qt-4.6.2/include/QtDBus -I/home/local/Trolltech/Qt-4.6.2/include -I/usr/local/Trolltech/Qt-4.6.2/include/QtContacts -I../../tests/ut_qtcontacts_common -I../../src -I../../src -I../../src -I/home/local/Trolltech/qt-contacts-harmattan-4.5.3.git20100520-0maemo1/include -I. -o ut_qtcontacts_add_async.o ut_qtcontacts_add_async.cpp
      In file included from /usr/include/qt4/QtCore/QSharedDataPointer:1,
      from /home/local/Trolltech/qt-contacts-harmattan-4.5.3.git20100520-0maemo1/include/qcontact.h:51,
      from /home/local/Trolltech/qt-contacts-harmattan-4.5.3.git20100520-0maemo1/include/QContact:1,
      from ut_qtcontacts_add_async.h:45,
      from ut_qtcontacts_add_async.cpp:42:
      /usr/include/qt4/QtCore/qshareddata.h: In copy constructor 'QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer<T>&) [with T = QPixmapData]':
      /usr/local/Trolltech/Qt-4.6.2/include/QtCore/qglobal.h:2043: instantiated from 'void qSwap(T&, T&) [with T = QExplicitlySharedDataPointer<QPixmapData>]'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:290: instantiated from here
      /usr/include/qt4/QtCore/qshareddata.h:155: error: invalid use of incomplete type 'struct QPixmapData'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:68: error: forward declaration of 'struct QPixmapData'
      /usr/include/qt4/QtCore/qshareddata.h: In destructor 'QExplicitlySharedDataPointer<T>::~QExplicitlySharedDataPointer() [with T = QPixmapData]':
      /usr/local/Trolltech/Qt-4.6.2/include/QtCore/qglobal.h:2043: instantiated from 'void qSwap(T&, T&) [with T = QExplicitlySharedDataPointer<QPixmapData>]'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:290: instantiated from here
      /usr/include/qt4/QtCore/qshareddata.h:152: error: invalid use of incomplete type 'struct QPixmapData'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:68: error: forward declaration of 'struct QPixmapData'
      /usr/include/qt4/QtCore/qshareddata.h:152: warning: possible problem detected in invocation of delete operator:
      /usr/include/qt4/QtCore/qshareddata.h:152: warning: invalid use of incomplete type 'struct QPixmapData'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:68: warning: forward declaration of 'struct QPixmapData'
      /usr/include/qt4/QtCore/qshareddata.h:152: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
      /usr/include/qt4/QtCore/qshareddata.h: In member function 'QExplicitlySharedDataPointer<T>& QExplicitlySharedDataPointer<T>::operator=(const QExplicitlySharedDataPointer<T>&) [with T = QPixmapData]':
      /usr/local/Trolltech/Qt-4.6.2/include/QtCore/qglobal.h:2044: instantiated from 'void qSwap(T&, T&) [with T = QExplicitlySharedDataPointer<QPixmapData>]'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:290: instantiated from here
      /usr/include/qt4/QtCore/qshareddata.h:169: error: invalid use of incomplete type 'struct QPixmapData'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:68: error: forward declaration of 'struct QPixmapData'
      /usr/include/qt4/QtCore/qshareddata.h:170: error: invalid use of incomplete type 'struct QPixmapData'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:68: error: forward declaration of 'struct QPixmapData'
      /usr/include/qt4/QtCore/qshareddata.h:171: warning: possible problem detected in invocation of delete operator:
      /usr/include/qt4/QtCore/qshareddata.h:171: warning: invalid use of incomplete type 'struct QPixmapData'
      /usr/local/Trolltech/Qt-4.6.2/include/QtGui/qpixmap.h:68: warning: forward declaration of 'struct QPixmapData'
      /usr/include/qt4/QtCore/qshareddata.h:171: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
      make[2]: *** [ut_qtcontacts_add_async.o] Error 1

      Attachments

        Activity

          People

            mgoddard Michael Goddard (closed Nokia identity) (Inactive)
            pohly Patrick Ohly
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: