application plugins differences between 5.6 and 4.7?
Hello list
I have an application that uses plugins. It loads a plugin when asked to execute a specific function and unloads it again when another function is asked for. The application is as SDR program. It ran without problems the last 4 years, however, after the most recent upgrade of Fedora, where now Qt 5.7 is used. It does not work aymore.
Recompilation of the main program and the plugins seems OK, however, when loading a plugin, the pluginloader reports "Plugin verification data mismatch ".
My sources are unchanged. The only Qt on my system is 5.7.
Is anything changed in plugin handling from 5.6 to 5.7?
Suggestions welcome
best
jan
Re: application plugins differences between 5.6 and 4.7?
Quote:
Is anything changed in plugin handling from 5.6 to 5.7?
You mean 5.6 to 5.7, or between Qt4 and Qt5, as your post title asks?
The Q_PLUGIN_METADATA() macro was introduced with Qt 5.0. This might be the source of the runtime complaint.
Re: application plugins differences between 5.6 and 4.7?
Yes, that was a typo. I just mean 5.6 and 5.7. I cross compiled my software (using mingw-64 32 bits) and it turns out that exactly the same software runs without problem under Windows with an older Qt5 version.
Re: application plugins differences between 5.6 and 4.7?
Verify that the plugin being found is indeed the one you've built with the same version as the application.
I.e. that it doesn't find the old plugin instead.
Cheers,
_
Re: application plugins differences between 5.6 and 4.7?
Quote:
Originally Posted by
anda_skoa
Verify that the plugin being found is indeed the one you've built with the same version as the application.
I.e. that it doesn't find the old plugin instead.
Cheers,
_
I compiled everything with the same compilers, on the same machine, a machine with only Qt5.7 (I removed all other versions).
j
Re: application plugins differences between 5.6 and 4.7?
Solved/
It took some time to find out what was happening. It turned out to be that
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA (IID "cardReader")
#endif
which I include to support building under Qt4 and Qt5 was the culprit: the inequality yields false.
Strange, worked pretty well for previous Qt5 and Qt5 versions
best
J
Re: application plugins differences between 5.6 and 4.7?
It is even stranger than I thought. I am probably making a mental error somewhere.
The header of the class in the plugin reads
class remote: public rigInterface, public Ui_Form {
Q_OBJECT
Q_INTERFACES (rigInterface)
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA (IID "remote")
#endif
This does not work, the Meta data is apparently not found while running.
If I just use
class remote: public rigInterface, public Ui_Form {
Q_OBJECT
Q_INTERFACES (rigInterface)
Q_PLUGIN_METADATA (IID "remote")
It works fine.
Now I checked, and the test
#if QT_VERSION >= 0x050000
evaluates to true, so although I am able to circumvent the error, I am lost.
As sais before, on other systems (also testing on an old Ubuntu box) it compiles and works fine, both using Qt4 and Qt5.
JanK