[PATCH] Configure toolbars from RMB switch to the current toolbar

Andras Mantia amantia at kde.org
Wed Apr 28 21:15:08 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 28 April 2004 22:57, David Faure wrote:
[...]
> > The second version of the patch with the static member variable is
> > attached.
>
> As I said, static objects in libraries are a big no no.
> We've had enough crash due to them.

Even as member variables? Well, in this case const char is the way to 
go.

> I still strongly suggest a static const char* (initialized and reset
> to 0). The code in the widget can compare its member var to labels if
> it wants, (for the people using the widget's ctor directly), that's
> not a problem.
>
> Of course this is quite a hack - a hack which would break as soon as
> we try moving KEditToolbar to another lib like kio or kutils, since
> at that point KToolbar wouldn't be able to set the static var.... I
> think we'll have to redo this feature for KDE 4.
There are other things to modify in KEdtiToolbar for KDE4 as well... 

3rd patch attached.

Andras

- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAkBDMTQdfac6L/08RAvYUAKCLBw8QUX7+0xUXDqgndgTrkSynQQCg6HvO
ID4LMTh4TL5wCoBhppNEe8Q=
=thD0
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edittoolbar.diff
Type: text/x-diff
Size: 5480 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040428/0db5e132/attachment.diff>


More information about the kde-core-devel mailing list