[PATCH] Fix for 54209

David Faure dfaure at klaralvdalens-datakonsult.se
Tue Mar 25 16:30:49 GMT 2003


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

On Tuesday 25 March 2003 00:20, Ravikiran Rajagopal wrote:
> Hi,
>   This trivial patch fixes bug 54209. We should not be using methods not
> available when KDE_NO_COMPAT is defined. 
Sounds right.

> Index: khtmlimage.cpp
> ===================================================================
> RCS file: /home/kde/kdelibs/khtml/khtmlimage.cpp,v
> retrieving revision 1.29
> diff -u -p -r1.29 khtmlimage.cpp
> --- khtmlimage.cpp      21 Feb 2003 01:11:06 -0000      1.29
> +++ khtmlimage.cpp      24 Mar 2003 23:17:07 -0000
> @@ -140,14 +140,23 @@ void KHTMLImage::slotPopupMenu( KXMLGUIC
>  {
>      KAction *encodingAction = cl->actionCollection()->action( "setEncoding"
> );
>      if ( encodingAction )
> -        cl->actionCollection()->take( encodingAction );
> +    {
> +        encodingAction->unplugAll();
> +        delete encodingAction;
> +    }

OK. It's not strictly equivalent (unplugging and deleting instead of just removing
from collection), but the net effect should be the same - no such action in
khtmlimage's menus.

I wonder why this is done in slotPopupMenu though - those actions are created 
only once, in KHTMLPart::init, so it would be enough to remove them in the
KHTMLImage ctor.

- -- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+gIQ572KcVAmwbhARAjbaAJsHAldjvwTNFWIefN58MdnnaiwGGQCglJz7
lcdk5dsuW+w1sSdEf6Hw4cM=
=8I8J
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list