[Kde-pim] Problem with akonadi plugin serializer

Kevin Krammer krammer at kde.org
Wed Mar 13 14:27:08 GMT 2013


Hi Michael,

On Wednesday, 2013-03-13, Michael Parchet wrote:
> Le 12 mars 2013 à 14:42, Kevin Krammer <krammer at kde.org> a écrit :
> 
> Hello Kevin,
> 
> > Hi Michael,
> > 
> > On Tuesday, 2013-03-12, Michael Parchet wrote:
> >> Hello kevin kramer,
> >> 
> >> I tried to make an akonadi plugin for my project but I have this error
> >> when I try to compile.
> >> 
> >> /opt/local/include/QtCore/qmetatype.h:169: erreur : no member named
> >> 'qt_metatype_id' in 'QMetaTypeId<History>' (History is the Tutorial
> >> class)
> > 
> > Hmm.
> > Try adding
> > Q_DECLARE_METATYPE(History)
> > at the end of history.h
> 
> Thank you very much for your proposal.
> 
> I write this code line at the end of History.h :
> 
> Q_DECLARE_METATYPE (History)
> #endif
> 
> but I got a new error that I couldn't understand. Here is this error :
> 
> QtCore/qmetatype.h:169: erreur : no member named 'qt_metatype_id' in
> 'QMetaTypeId<const char>'

That seems unrelated to the code from the tutorial, neither of those objects 
use const char* data.

> Can you help me again please ?

You have to find out where in your code you are trying to access const char as 
a meta type.

> I have also put these followed line code in History.cpp I found it in the
> qmetatype documentation.
> 
> Here is this code

>     int id = QMetaType::type("History");
>     if (id != 0) {
>         void *HistoryPtr = QMetaType::construct(id);
>         QMetaType::destroy(id, HistoryPtr);
>         HistoryPtr = 0;
>     }

that is just an example of what one can do with the meta type system.
You don't need that at all.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20130313/bea6c078/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list