Intergrating mht file to konqueror

David Faure faure at kde.org
Fri Sep 24 12:39:51 BST 2004


On Friday 24 September 2004 12:40, Thiago Macieira wrote:
> Spiros Georgaras wrote:
> >kmhtconvert_part.cpp:19: error:   because the following virtual functions
> > are abstract:
> >/opt/kde3/include/klibloader.h:393: error:      virtual QObject*
> >KLibFactory::createObject(QObject* = 0, const char* = 0, const char* =
> >"QObject", const QStringList& = QStringList())
> >
> >What is wrong? I have followed the tutorial to the letter (adapting it to
> > my app of course). Can you help?
> 
> You forgot to override 
> createObject(QObject*, const char*, const char*, const QStringList&)
> in your class.

... which KParts::GenericFactory does for you automatically, so no need to override
that method by hand.

I strongly suggest looking at kdeaddons/konq-plugins/fsview for an example.

fsview_part.cpp:#include <kparts/genericfactory.h>
fsview_part.cpp:typedef KParts::GenericFactory<FSViewPart> FSViewPartFactory;
fsview_part.cpp:K_EXPORT_COMPONENT_FACTORY( libfsviewpart, FSViewPartFactory )
fsview_part.cpp:    setInstance( FSViewPartFactory::instance() );

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list