Qt plugin resource collision rules of precedence



  • If I have an app with the resource:

    qrc:/myresources/icon.png
    

    And I load a plugin which has a resource with the identical URL:

    qrc:/myresources/icon.png
    

    What are Qt's rules for resolving that conflict?

    When I ask for the resource in code, do I get the first resource, the second one, or is this undefined...?

    I can test for this, but if it's non-deterministic that doesn't help...

    Thx


  • Lifetime Qt Champion

    Hi,

    Good question. I'd recommend bringing it to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

    Personally, I'd rather use a prefix for the plugin qrc path to ensure that there won't be such clashes.


  • Moderators

    It's probably defined in some way but it's also unspecified, so don't rely on any test you do. It can change without a warning. Duplicates are basically unsupported, which saddens me deeply.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.