[PyQt] A dire warning message

Baz Walter bazwal at ftml.net
Fri Jul 8 04:37:35 BST 2011


On 08/07/11 02:36, Algis Kabaila wrote:
> On Fri, 8 Jul 2011 03:36:40 AM Baz Walter wrote:
>>>> Hmm, at the first glance, this is a KDE problem, since KDE plugs its own
>>>> file dialog into Qt, but fails to properly deal with locales there
>>>> after due to them not being initialized correctly. This is going to
>>>> produce issues, if you're calling QFileDialogs and expects them being
>>>> localized correctly. It might be possible to circumvent these issues by
>>>> instancing KApplication instead of QApplication (and doing the proper
>>>> KDE4 setup sequence).
>>
>> yes, the problem is indirectly caused by a "compatibility" plugin that
>> invokes the kde open-dialog instead of the one provided by qt.
>>
>> the offending plugin is usually installed here:
>>
>>        /usr/lib/kde4/plugins/gui_platform/libkde.so
>>
>> personally, i always remove it whenever kde is updated.
>
> Baz,
>
> Being a careful (and easily rattled) old soul, I did not remove libke.so, but
> moved it to my data partition, so that I would have a chance to "reinstate" it
> if it was necessary.  Have not noticed any harmful effects - Kmail continued to
> work, opening and saving files.
>
> Unfortunately, it did not have any effect on the "dire warning message", as the
> following dialog shows:
>
> ak at supremo:~/save$ python3 save.py
> KGlobal::locale::Warning your global KLocale is being recreated with a valid
> main component instead of a fake component, this usually means you tried to
> call i18n related functions before your main component was created. You should
> not do that since it most likely will not work
> ak at supremo:~/save$
>
> There is no change as far as the little test script shows.  Perhaps I am too
> timid, but I copied back the libkde.so where it was, namely
> /usr/lib/kde4/plugins/gui_platform/libkde.so

you would need to reboot for it to have an effect, as the plugin would 
still be loaded in memory.

in any case, it's not a real solution to your problem - just a possible 
workaround if you don't want/need the functionality the plugin provides.

really, i can't understand why kde chose to force this plugin on users. 
i appreciate that many people want unified dialogs and so forth, but 
it's pretty rude not to give users the option to disable something which 
affects non-kde applications.


More information about the PyQt mailing list