kcmodule and kcmoduleproxy

Matthias Kretz kretz at kde.org
Thu Dec 4 09:41:27 GMT 2008


AFAIR that's the original behavior of the proxy. This line was probably 
introduced to "fix" the incorrect initial size of the dialog (yes, as svn 
blame + svn log tells us). I.e. with your patch the dialog now might resize 
when you show one of the contained KCMs for the first time.

IMO (not humble in this case) it is better to have a resizing dialog than a 
long delay before having the dialog ready. Which is why I made the proxy delay 
loading, and breaking it like this one might have just deleted all the delayed 
loading logic...

If dialogs are initially "ridicolous"ly small then the application needs to be 
"fixed" to set a sensible initial size for the dialog...

So that's strong support for your patch from me. :)

BTW, you can then also remove the minimumSizeHint altogether.

On Thursday 04 December 2008 03:00:19 Sebastian Sauer wrote:
> Hi *
>
> The KCMultiDialog class used for e.g. "Configure Konqueror" uses kcmodule
> for its configurable items and kcmoduleproxy which allows to delay loading
> the kcmodule plugins till they are requested.
>
> Current situation is, that the kcmodule's are just always loaded and not
> only if they are needed/displayed. That results here in a delay of around
> 10 seconds if I call "Configure Konqueror" till the dialog is displayed and
> does render the kcmoduleproxy's unneeded. The reason for that is, that on
> addPage() also KCModuleProxy::minimumSizeHint() got called and there the
> kcmodule is loaded.
>
> Attached patch does fix that. Ok to commit?
>
> Index: kcmoduleproxy.cpp
> ===================================================================
> --- kcmoduleproxy.cpp   (revision 892245)
> +++ kcmoduleproxy.cpp   (working copy)
> @@ -343,7 +343,6 @@
>
>  QSize KCModuleProxy::minimumSizeHint() const
>  {
> -       realModule();
>         return QWidget::minimumSizeHint();
>  }

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/





More information about the kde-core-devel mailing list