From kde-core-devel Mon Nov 22 11:12:04 2010 From: David Faure Date: Mon, 22 Nov 2010 11:12:04 +0000 To: kde-core-devel Subject: Re: Helping libraries load their own translation catalogs Message-Id: <201011221212.05843.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=129042437330559 On Sunday 21 November 2010, Oswald Buddenhagen wrote: > On Sun, Nov 21, 2010 at 12:46:53AM +0000, Albert Astals Cid wrote: > > It achieves that by creating a static that instructs KGlobal to load a > > given translation catalog on global locale creation. > > statics in shared libraries have always been like a red flag for us. i > don't know whether the reasons (some proprietary unix dynloader) are > still applicable. > qt has Q_CONSTRUCTOR_FUNCTION in qglobal.h nowadays. its implementation > seems more complicated than necessary to me (why the integer return > value?), so i wonder whether that's a workaround for something or just > random baroqueness. Your message is not entirely useful because we don't know what to conclude from it :-) Can you ask the one who wrote it, or dig up the logs, to find out whether this is still needed or not, and which problems it solves? What's for sure is that K_CATALOG_LOADER will fail when using static libs, but that's not something we generally support (although WinCE uses that), and static libs means generally only one or very few apps, so they can just hardcode insertCatalog calls. Anyway, I'm fine with the patch. There's no destructor code so order-of- destruction won't be a problem, and the ctor code doesn't seem to rely on other things being created already, it will just create KGlobal if needed. (just one thing, "@since 4.6" missing in the new api) -- David Faure, faure@kde.org, http://www.davidfaure.fr Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).