[PyQt] A dire warning message
akabaila at pcug.org.au
Fri Jul 8 02:36:36 BST 2011
On Fri, 8 Jul 2011 03:36:40 AM Baz Walter wrote:
> On 07/07/11 13:00, Algis Kabaila wrote:
> > On Thu, 7 Jul 2011 09:03:47 PM Hans-Peter Jansen wrote:
> >>> On opening a file dialog, I get this warning:
> >>> 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
> >>> Search on the net seems to give some grim news:
> >>> <quote start>
> >>> Re: VLC Hangs on Open File dialog
> >>> Postby Rémi Denis-Courmont » Sat Jan 29, 2011 11:58 pm
> >>> In the mean time, someone in KDE actually looked at the issue.
> >>> It turns to be a longstanding known bug in the QProcess class from
> >>> Qt4. That bug gets triggered by a new "feature" in KDE 4.6 relative
> >>> to MIME types in the Open and Save dialogs, that happens to involve
> >>> the QProcess class.
> >>> In the end, VLC is blaming KDE, KDE is blaming Qt, and Qt is blaming
> >>> the kernel.
> >>> <quote end>
> >>> '''
> according to that thread, the problem has been fixed in kde-4.6.1. are
> you able to upgrade?
> >> 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:
> personally, i always remove it whenever kde is updated.
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
Thank you again for the interesting suggestion.
More information about the PyQt