[patch] istatus additions

Manuel Breugelmans mbr.nxi at gmail.com
Sun Aug 31 08:27:00 UTC 2008


Hi,

Attached a patch which does the following to IStatus:

1/ Allows any QObject to register itself instead of only IPlugins .
2/ Introduces a showErrorMessage signal, which shows warnings in a 
NegativeText color 
3/ Fixes a small typo minimum->maximum in StatusBar

One is imo good for two reasons, first it is annoying and bad style to pass 
your IPlugin around evrywhere. Secondly it is very well possible to want 
multiple status info's per plugin.

The second allows you to show non-modal errors. This is a good replacement for 
non-critical stuff where you'd otherwise have a 'ignore this' box. I find popups 
to be intrusive and irritating + sooo last century ;)

Btw if this gets through I think a re-structure of the istatus design would be 
good, since the q_extension stuff is only needed for plugins. This is what I 
had in mind:

class IStatus : QObject { slots: ...} // no Q_DECLARE interfaces / KDEV_EXT no 
more
class IUiController { IStatus* status(); }
class Status : public IStatus { private: StatusBar m_bar; } // implementation
class UiController { IStatus* status(); // return Status

Clients would then connect their progress signals to (I)Status object' slots, 
instead of re-implementing an IStatus. This remove the 'registerStatus' 
methods and eliminates the need for signal-inheritance. Maybe IStatus is not 
the correct name no more then, not sure.


Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: istatusUpgrade.patch
Type: text/x-patch
Size: 8560 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20080831/4c4b2695/attachment.patch>


More information about the KDevelop-devel mailing list