Hi everybody, 

config = KSharedConfig.openConfig()
group = config.group('General')

The second line results in a segfault. Interestingly, it doesn't if the config 
object is returned by KGlobal.config(). Documentation tells us KGlobal.config() 
returns a KSharedConfig object as does KSharedConfig.openConfig(). Strange.

See the attached minimal.py example.

I'm here on Kubuntu 8.10 with KDE 4.2 packages from ppa:

Python 2.5.2
Qt 4.4.3
PyQt 4.4.4
sip 4.7.9
PyKDE 4.2.0

This bug occurs since the update from KDE 4.1.4 to 4.2. 

Actually, where do bug reports on PyKDE go? bugs.kde.org? Should I file one for 
this?

Best wishes, 

Benno. 

import sys
from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs, KSharedConfig, KGlobal
from PyKDE4.kdeui import KApplication, KXmlGuiWindow

class MainWindow(KXmlGuiWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        config = KSharedConfig.openConfig()
#        config = KGlobal.config()
        group = config.group('General')

appName     = "pykdeminimaltest"
catalog     = ""
programName = ki18n("pykdeminimaltest")
version     = "0.1"
aboutData   = KAboutData(appName, catalog, programName, version)
KCmdLineArgs.init(sys.argv, aboutData)
    
app = KApplication()
w = MainWindow()
w.show()
app.exec_()
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to