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

List:       kde-devel
Subject:    Re: KIO::listDir crashes when called from KIO slave
From:       David Faure <faure () kde ! org>
Date:       2005-03-29 10:05:44
Message-ID: 200503291205.44600.faure () kde ! org
[Download RAW message or body]

On Tuesday 29 March 2005 08:48, Oliver Eichler wrote:
> Am Dienstag, 22. März 2005 17:52 schrieben Sie:
> >
> > Not from a kioslave. It's supposed to be a non-gui program - dialogs are
> > for the application side.
> 
> Hm, this seems to be a potential bug. The KIO slave audiocd will request 
> messageboxes or dialogs when it detects errors or asks to overwrite files. 
> Using audiocd from another slave will crash this slave in this situation. 

No... If it detects an error or asks to overwrite files, it in fact
simply returns an error code and KIO::CopyJob (the job, in the application side)
shows the dialog (in case of overwrite). If that job is itself in a slave, 
then you can use setInteractive(false) to ensure that it doesn't popup any dialogs
- and you can also make sure preconditions are met, like handling "destination
exists" before calling your sub-slave. For simple errors it's even simpler,
Job doesn't show anything, it's up to the app code (or the slave, in your case)
do handle the error. kio_trash is an example of all of this.

And for dialogs requested using the SlaveBase interface, the dialogs appear
in kio_uiserver so it shouldn't be a problem to do that in a sub-slave.

> On the other hand side: Is there any restriction to enable the slave's GUI by 
> setting the KApplication constructor flag to true? 

I don't understand the question exactly. It's fine to pass true (non-gui) to KApplication,
it's even recommended for slaves.

> And while asking silly  
> question: Is it ok to use KUniqueApplication instead of KApplication?

I'd say no. The application (or two of them) might want to launch two instances of the slave.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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