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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon May 9 22:01:10 CEST 2011


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

           Summary: Telepathy-Qt4 doesn't set the URI property for file
                    transfers.
           Product: Telepathy
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: tp-qt4
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: daniele.domenichelli at gmail.com
         QAContact: telepathy-bugs at lists.freedesktop.org
            Blocks: 24920


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

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.

I can work on this but I need to know how should I fix it...

1) Add a setUri method to FileTransferChannelCreationProperties
2) Add a constructor to FileTransferChannelCreationProperties(const QString
&uri) (that might also set size, hash, content, etc)
3) Just rename "suggestedFileName" to "uri", fix documentation and hope that
nobody uses it yet with a non existent file.

In my opinion #2 is the best.

I also suggest that (but this will break abi compatibility)
- the "FileTransferChannelCreationProperties(const QString &suggestedFileName,
  const QString &contentType, qulonglong size);" constructor should be removed;
- a method setSuggestedFileName(const QString &suggestedFileName) should be
  added to override the default name extracted from the URI.

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



More information about the telepathy-bugs mailing list