[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PyQt and PyKDE, the same old story



The recent update of PyQt broke PyKDE again for me.

I receive a Segmentation fault, nothing new here, but this time the place is 
much more hard to find. Two ways to get let Python crash:
- remove the local reference to the KAboutData object
- read a KConfig option

See the attached example, which runs through, unless you uncomment parts 
"Crash 1" or "Crash 2".

What's about the version incompatibilities between PyQt and PyKDE? I'm coming 
to this list with this issue on a regular basis now. Should PyQt just add a 
'Conflict' on the PyKDE version built before it?

I believe that SIP is one mess of C++ dependencies, but technically speaking 
there should be a way out of it.

-Christoph
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys

from PyKDE4.kdecore import ki18n, KCmdLineArgs, KAboutData
from PyKDE4.kdecore import KConfig, KConfigGroup
from PyKDE4.kdeui import KApplication

aboutData = KAboutData("a", "", ki18n("a"), "1", ki18n(""),
    KAboutData.License_GPL_V3, ki18n(""), ki18n(""), "", "")
KCmdLineArgs.init(sys.argv, aboutData)

# Crash 1
#del aboutData
g_app = KApplication()

# Crash 2
#config = KConfig()
#DictionaryConfig = KConfigGroup(config, "Dictionary")
#DictionaryConfig.readEntry("Language", None)

Reply to: