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

List:       kfm-devel
Subject:    Re: KIO question
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-12-03 20:06:35
[Download RAW message or body]

On Monday 03 December 2001 20:09, Holger Freyther wrote:
> Hi Simon, David, all,
> simon pointed me to this list. Currently I'm adding a feature for a friend of 
> mime. If he clicks on the cd image on kdesktop he want's kde to check if the 
> cd is an audio cd and wants kde to run konqueror with the URL audiocd:/. 
> Doing this wasn't a big deal but there's one thing I don't like. In KIO there 
> is a wrapper for the KMessageBox it's called sorry. If I call sorry(), sory 
> checks if (kApp)  and then shows the KMessageBox. Most of the times there 
> will be a valid kApp. 
> Imagine the following scenario. In the background an app is stating a dir and 
> it becomes unavailable then there would be a messagebox showing an error and 
> the user wouldn't know why it happened.
> In my case if no audio is found then there will be this damn messagebox. 
> Either I'm way too braindead and need some sleep or there's a fudamental 
> failure in the concept of the sorry

Which KIO call are you making, exactly ? stat() ?

There are two solutions. 
1) Adding a flag to StatJob to say "don't show errors"
2) Derive your own job from StatJob and reimplement slotResult (which
I guess is the one that displays the error), so that it doesn't display
any error but simply emit that there was an error.

It's quite usual to have to reimplement jobs, when you don't want them to
do what they usually do.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops

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

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