[Bug 37034] Telepathy-Qt4 doesn't set the URI property for file transfers.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 19 13:01:08 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=37034

--- Comment #4 from Olli Salli <ollisal at gmail.com> 2011-05-19 04:01:07 PDT ---
(In reply to comment #0)
> Telepathy-Qt4 doesn't set the URI property for file transfers.
> Therefore if the handler is not the same that initiates the transfer channel,
> it is impossible to know the location of the file that should be sent and to
> open the file in order to call
> OutgoingFileTransferChannel::provideFile(QIODevice* input).    

Very much true, so indeed we should add support for the new URI property - but
we also need a getter for it in FileTransferChannel, for the Handler to
actually get to the information with a nice API.

We also need change notification and a setter for the property in
IncomingFileTransferChannel for the usecase mentioned in the spec:

For incoming file transfers, this property MAY be set by the channel handler
before calling AcceptFile to inform observers where the incoming file will be
saved.

> 
> FileTransferChannelCreationProperties only accepts a "suggestedFileName".
> Moreover accounts.cpp:271 uses QFileInfo for a suggestedFileName. If the file
> name is just "suggested" it could be set by the user and could not correspond
> to a real file. (This is probably another bug)
> 
> Therefore if the "suggestedFileName" corresponds to a real file, it is possible
> to set the URI property getting the absolute path, otherwise it is impossible.

Please read the spec, as Andre linked. The suggested filename is a distinct
concept from the URI.

> 
> I can work on this but I need to know how should I fix it...
> 
> 1) Add a setUri method to FileTransferChannelCreationProperties

No. I think this would be useless if we have 2).

> 2) Add a constructor to FileTransferChannelCreationProperties(const QString
> &uri) (that might also set size, hash, content, etc)

Yes.

> 3) Just rename "suggestedFileName" to "uri", fix documentation and hope that
> nobody uses it yet with a non existent file.

No. The suggested filename is still a valid concept, and should be able to be
set independently of the URI filename if desired (once an instance is built by
the URI create method(), to override the filename extracted thus).

> 
> In my opinion #2 is the best.

Agreed.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list