[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: an example for kio
From:       Nicolas Brodu <nicolas.brodu () free ! fr>
Date:       2000-01-20 21:05:26
[Download RAW message or body]

Stephan Kulow wrote:
> >
> > Though I have no idea if it's feasible at all in this form (and I don't mean to
> > say "hey, this or that is better" when I didn't work on it!).
> >
> > At least, there would be no more 'KIOJob' hanging around externally. (wether
> > internally there is only one Job, or a pool, or whatever).
> >
> Yeah, this _could_ work. The problem is that you need the object for
> almost
> anything else that has in between results (get, listDir, perhaps more).

Let func be such a function.

KIO::func(funcParam, this, SLOT(result(KIO::SomeType*)), optional_Id);

myClass::result(KIO::SomeType *s) {
    ... // handle error and Id

    switch ( s->answerType() ) {
        case KIO::MimeType:
            ... // something with s->mimeType()
            break;
        case KIO::String:
            ... // something with s->filename() or whatever appropriate
            break;
        ...
    }
}

Could this work, considered that KIO:func would emit several signals, one for
each in-between result, and then die automatically?
 
> Greetings, Stephan
> P.S. Please everyone: tell me when you changed your address _before_ you
> post
> to kde-core-devel

I used an old address and asked for writing access. Martin Konold was really 
fast on this one! Thanks to him :-)

Cheers,
Nicolas
-- 
A shortcut is the longest distance between two points. (unknown author)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic