[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] KSpell2 improvement
From: Thiago Macieira <thiago () kde ! org>
Date: 2006-03-27 16:34:51
Message-ID: 200603271834.58515.thiago () kde ! org
[Download RAW message or body]
Mashrab Kuvatov wrote:
>Hi all,
>
>could anyone from TWG give a clear message if the patch is OK or not. If
> OK, where should it go? If not OK, why?
It's almost ok for KDE4, but not KDE 3.5.x. We've not lifted the message
freeze, so you cannot commit it to 3.5.x
If the message freeze is lifted again, you may commit to 3.5.x.
I also said "almost" because I see a couple of things that can be
improved.
First, you declare variantList as:
const variantListType variantList[] = {
please make that static as well, to avoid being initialised at every call
to languagesName.
Second, you construct allLocalizedDictionaries at every call to
languagesName. That sounds like a waste. I had recommended to implement
it with a static list instead, built on first use.
For the KDE4 code, I recommend using Q_GLOBAL_STATIC_WITH_ARGS:
Q_GLOBAL_STATIC_WITH_ARGS(QStringList, allLocalizedDictionaries,
(initAllLocalizedDictionaries()))
static QStringList initAllLocalizedDictionaries()
{
// put the real code here
}
QStringList Broker::languagesName() const
{
return allLocalizedDictionaries();
}
In this case, don't use "static" in variantList.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
thiago.macieira (AT) trolltech.com Trolltech AS
GPG: 0x6EF45358 | Sandakerveien 116,
E067 918B B660 DBD1 105C | NO-0402
966C 33F5 F005 6EF4 5358 | Oslo, Norway
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic