Need help to port to new QT5 plugins

laurent Montel montel at kde.org
Wed Jul 2 11:30:36 UTC 2014


Hi,
In akonadi we need to load plugins.

We have macro:
#define AKONADI_AGENT_FACTORY( agentClass, catalogName ) \
class agentClass ## Factory : public Akonadi::AgentFactory< agentClass > \
{ \
  Q_OBJECT \
  Q_PLUGIN_METADATA(IID "org.kde.akonadi." # agentClass ) \
  Q_INTERFACES( agentClass ## Factory ) \
  public: \
    explicit agentClass ## Factory( QObject * parent = 0 ) : 
Akonadi::AgentFactory< agentClass >( # catalogName, parent ) {\
      setObjectName(QLatin1String(# catalogName) );\
    } \
}; \
// QT5 Q_EXPORT_PLUGIN2( catalogName, agentClass ## Factory )


I commented Q_EXPORT_PLUGIN2 and add Q_PLUGIN_METADATA and Q_INTERFACES and 
Q_OBJECT

In resources I moved from .cpp to .h as David told me:

For example resources/akonotes/akonotesresource.h

=> AKONADI_AGENT_FACTORY( AkonotesResource, akonadi_akonotes_resource )

But it’s not found.

"
konadi_agent_launcher(27415)/(default) Akonadi::XdgBaseDirs::findPluginDirs: 
search paths:  ("/opt/kde5/lib/plugins", "/opt/kde5/lib64/plugins", 
"/opt/kde5/lib/x86_64-linux-gnu/plugins", "/opt/kde5/plugins", "", 
"/opt/kde5/bin")
akonadi_agent_launcher(27415)/() unknown: QPluginLoader* 
AgentPluginLoader::load(const QString&) Failed to load agent:  "Plugin 
verification data mismatch in 
'/opt/kde5/lib64/plugins/akonadi_akonotes_resource.so'"
"

Do you have an idea ?
Perhaps I need to add new macro ?
Perhaps I need to add new flags etc.
Perhaps I need to add something to desktop file etc.

Could you give me more info about it ?

Perhaps there is some method to debug it.

Thanks
Regards.


-- 
Laurent Montel | laurent.montel at kdab.com | KDE/Qt Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53,  http://www.kdab.fr




More information about the Kde-frameworks-devel mailing list