[Kde-pim] Segment fault tring to create akonadi resource in

Mario Santagiuliana fedora at marionline.it
Wed Aug 17 12:15:23 BST 2011


In data 17/8/2011 12:24:31, Kevin Krammer ha scritto:
> I think the problem is that you are missing the QApplication instance, 
> basically the first thing any Qt or KDE application creates in main.
> 
> The main() function in C++ works a bit like this (simplified, the
> original  uses templates):
> 
> int main( int argc, char **argv )
> {
>       const QString id = parseArguments( argc, argv );
>       KApplication app;
>       ResourceClass* r = new ResourceClass( id );
> 
>       // check if ResourceClass also inherits AgentBase::Observer and
>       // if it does, automatically register it on itself
>       Observer *observer = dynamic_cast<Observer*>( r );
>       if ( observer != 0 )
>         r->registerObserver( observer );
> 
>       return init( r );
> }
> 
> So you could try the PyKDE equivalent of
> KApplication app;
> before creating the instance of your resource class.
> 
> Cheers,
> Kevin

Kevin! Thank you very much for your help!
In attachment I have a test python script without error...In this week I'm 
creating a test akonadi resource using python, I hope this work fine...

Thank you very much!
-- 
Mario Santagiuliana
www.marionline.it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 951 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110817/a04acd14/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110817/a04acd14/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