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

List:       kde-commits
Subject:    Re: kdelibs/kdeui
From:       Simon Hausmann <hausmann () kde ! org>
Date:       2004-09-10 6:11:31
Message-ID: 200409100811.31350.hausmann () kde ! org
[Download RAW message or body]

On Thursday 09 September 2004 23:05, Frans Englich wrote:
> CVS commit by englich:
>
> Add getter for the KConfigDialogManager list.
>
>
>   M +5 -0      kcmodule.cpp   1.28
>   M +6 -0      kcmodule.h   1.51
>
>
> --- kdelibs/kdeui/kcmodule.cpp  #1.27:1.28
> @@ -173,4 +173,9 @@ QString KCModule::quickHelp() const
>
>
> +QPtrList<KConfigDialogManager> KCModule::configs() const
> +{
> +    return d->managers;
> +}
> +

Just a thought: Returning a QPtrList by value can be very dangerous. Usually 
people use iterators to traverse such pointer lists, and right now the 
following does not work:

for (QPtrListIterator<KConfigDialogMananger> it(module->configs());
     it.current(); ++it) {
    ...
}

I suggest to return a const reference instead.

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

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