Results 1 to 7 of 7

Thread: application plugins differences between 5.6 and 4.7?

  1. #1
    Join Date
    Mar 2008
    Posts
    44
    Thanks
    2
    Platforms
    Unix/X11 Windows

    Default 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

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: application plugins differences between 5.6 and 4.7?

    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.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Mar 2008
    Posts
    44
    Thanks
    2
    Platforms
    Unix/X11 Windows

    Default 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.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default 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,
    _

  5. #5
    Join Date
    Mar 2008
    Posts
    44
    Thanks
    2
    Platforms
    Unix/X11 Windows

    Default Re: application plugins differences between 5.6 and 4.7?

    Quote Originally Posted by anda_skoa View Post
    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

  6. #6
    Join Date
    Mar 2008
    Posts
    44
    Thanks
    2
    Platforms
    Unix/X11 Windows

    Default 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

  7. #7
    Join Date
    Mar 2008
    Posts
    44
    Thanks
    2
    Platforms
    Unix/X11 Windows

    Default 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

Similar Threads

  1. Load custom plugins after application startup.
    By rwhartzell in forum Newbie
    Replies: 6
    Last Post: 29th August 2015, 19:36
  2. QWidget-derived Application Plugins
    By SnarlCat in forum Qt Programming
    Replies: 2
    Last Post: 25th March 2008, 19:25
  3. Replies: 0
    Last Post: 18th February 2008, 11:53
  4. Application Plugins in Windows [XP]
    By dcurtis in forum Installation and Deployment
    Replies: 10
    Last Post: 9th February 2007, 04:01
  5. Plugins as small application
    By blackliteon in forum Qt Programming
    Replies: 4
    Last Post: 12th January 2006, 10:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.