D17887: Fix detection of .kexi file types after recent change of mime database on Linux for SQLite type (2018-06-17)

Pino Toscano noreply at phabricator.kde.org
Mon Dec 31 17:26:10 GMT 2018


pino added a comment.


  In D17887#384409 <https://phabricator.kde.org/D17887#384409>, @staniek wrote:
  
  > In D17887#384384 <https://phabricator.kde.org/D17887#384384>, @pino wrote:
  >
  > >
  >
  >
  >
  >
  > > The QSet is used to avoid that the same metadats is registered twice in `m_metadata_by_mimetype` for the same mimetype, in case a plugin specifies two entries (mime name and one alias of it).
  >
  > Thanks. Interesting though m_metadata_by_mimetype.insertMulti(mimeType, metaData.data()) is used for a purpose, it's valid case to have multiple plugins supporting the same type.
  
  
  Let me explain this better -- the situation fixed by using the QSet is:
  
  - a plugin has application/x-foo, and application/x-foo-alias as MimeTypes
  - application/x-foo-alias is an alias of application/x-foo
  - directly inserting in `m_metadata_by_mimetype` the result of the mime type resolution means that `m_metadata_by_mimetype` will have the metadata of this plugin twice for the same key (application/x-foo)
  
  My draft of patch does not change at all the fact that different plugins can register for the same mimetype.

REPOSITORY
  R15 KDb

REVISION DETAIL
  https://phabricator.kde.org/D17887

To: staniek, piggz
Cc: pino, Kexi-Devel-list, barman, wicik, staniek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kexi-devel/attachments/20181231/ea24cf73/attachment.html>


More information about the Kexi-devel mailing list