• Raphael Kubo da Costa's avatar
    Use a different D-Bus object path for each Ark::Part. · c79d8db2
    Raphael Kubo da Costa authored
    So far, all Ark::Part instances used the same D-Bus object path,
    "/DndExtract", to receive drag'n'drop notifications.
    
    This does not work correctly ever since we started supporting using Ark as
    an embedded KPart (for previewing archived inside Konqueror or Rekonq, for
    example). In this case, the object path is added to the embedder (the
    `konqueror-5654' service, for example). If one previews multiple archives in
    different tabs, multiple calls to QDBusConnection::registerObject() will be
    made and only the first one will succeed, since we are always trying to
    register the same path.
    
    Fixing this involves touching separate parts of the code:
    
     o Use a different object path for each KPart instance, just like
       KateDocument or nsplugin do. We do this by keeping a static counter that
       is incremented each time a KPart is created and is part of the path name.
    
     o Use other, more specific mime types for the data we send when dragging
       out of Ark. So far we...
    c79d8db2
archivemodel.h 4.79 KB