[Delta] Iris questions

Justin Karneges justin-psi2 at affinix.com
Wed Mar 26 10:32:39 PDT 2008


On Wednesday 26 March 2008 5:36 am, K. Nimer wrote:
> On Tue, Mar 25, 2008 at 12:59 PM, Justin Karneges <justin-psi2 at affinix.com>
>
> wrote:
> > Did you change it so the program doesn't exit until the file has finished
> > sending?
>
> is it something different than sending the message? because it sends a
> message now , so that means i didnt touch the way , we close client

When you close Client and wait for the finished signal, this ensures all 
pending stanzas are sent to the server.  In the case of a file transfer, this 
is simply the file transfer request.  The file itself is not sent until the 
other person accepts the request.

So yes, you should not close Client until the entire file has transferred.  
However, even if you are closing it immediately after offering the file, the 
other person should at least receive the file transfer request (but when they 
press Accept, it will fail).

> > Try listening to the error() signal from the FileTransfer.
>
> i tried but the thing is that error() << has one parameter
> and sendFile has many so they are not compitable,

connect(ft, SIGNAL(error(int)), SLOT(ft_error(int)));

define the slot:

void ft_error(int errorCode)
{
    std::cout << "Error sending file: " << errorCode << std::endl;
    ft->deleteLater();
}

Please learn Qt signals and slots. :P

-Justin


More information about the Delta mailing list