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

List:       kde-core-devel
Subject:    Re: (PATCH) Default KDE factory erases other factories
From:       Pascal =?iso-8859-1?q?L=E9tourneau?= <pletourn () globetrotter ! net>
Date:       2003-09-18 20:13:15
[Download RAW message or body]

Hi

This patch breaks QWhatsThis with image (see #64258).
(QWhatsThis uses only the defaultFactory)

On July 29, 2003 15:10, Simon Perreault wrote:
> Hi,
>
> I am using QDesigner-made image libraries. This installs a default
> QMimeSourceFactory so that one can easily fetch an image using the filename
> of the image. The factory is installed before KApplication installs the
> default factory provided by KInstance. KApplication installs its default
> factory in a way that erases any previously set factories (there can be
> multiple default factories).
Wrong, addFactory is a static function.
> Would the following patch be acceptable? This is how the QDesigner-made
> image library installs its default mime source factory. See the
> documentation for QMimeSourceFactory::addFactory() for more information.
>
> I'll commit this change if I don't get any replies.
>
>
> --- kapplication.cpp    29 Jul 2003 16:44:37 -0000      1.604
> +++ kapplication.cpp    29 Jul 2003 19:03:53 -0000
> @@ -731,11 +731,11 @@ void KApplication::init(bool GUIenabled)
>      kdisplaySetFont();
>  //    kdisplaySetPalette(); done by kdisplaySetStyle
>      propagateSettings(SETTINGS_QT);
>
>      // Set default mime-source factory
> -    QMimeSourceFactory::setDefaultFactory (mimeSourceFactory());
> +    QMimeSourceFactory::defaultFactory()->addFactory( mimeSourceFactory()
> );
>
>      KConfigGroupSaver saver( config, "Development" );
>      if( config->hasKey( "CheckAccelerators" ) || config->hasKey(
> "AutoCheckAccelerators" ))
>          d->checkAccelerators = new KCheckAccelerators( this );
>    }

Pascal Létourneau

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

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