[RFC] How do I tell the MainWindow that the Part won't work?

David Faure dfaure at klaralvdalens-datakonsult.se
Sat Jun 7 21:02:48 BST 2003


On Saturday 07 June 2003 13:02, Christian Loose wrote:
> Hi guys,
> 
> We have a problem in Cervisia. 
> 
> In KDE HEAD, Cervisia uses the new cvs DCOP service to provide it's 
> functionality to it's users. Without the DCOP service Cervisia won't work at 
> all. Normally this isn't a problem because the part should be able to start 
> the service.
> 
> Now to the problem: 
> CervisiaPart starts the service in its constructor. Now if 
> KApplication::startServiceByDesktopName(...) fails (e.g. user made a mistake 
> while installing KDE), there is no way that the part can prevent the further 
> processing by telling its calling app (CervisiaShell, Konqueror) that an 
> error occurred. Instead the part is created but non-functional.

I'd show a label as the widget of the part, to make clear it's non-functional.
Something like:
 setWidget( new QLabel( i18n("Installation problem blah blah"), parentWidget ) );

-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions




More information about the kde-core-devel mailing list