Comment 6 for bug 141023

Revision history for this message
archdrone (archdrone) wrote :

Evidently the error appears only in internationalised versions of mountconfig (module called by my systemsettings is in Czech and has the error, module called directly from console is in English and works fine).
original:
    def slotUUIDCheckboxClicked(self):
        if self.uuidlineedit.text() == "":
            label = microhal.getUUIDByDevice(str(self.devicelineedit.text()))
            self.uuidlineedit.setText(label)
        self.devicecheckbox.setChecked(False)
        self.devicelineedit.setEnabled(False)
        self.labelcheckbox.setChecked(False)
        self.labellineedit.setEnabled(False)
        self.uuidlineedit.setEnabled(True)

dirty workaround (set the states of text/checkboxes before the crash could occur) :

    def slotUUIDCheckboxClicked(self):
        self.devicecheckbox.setChecked(False)
        self.devicelineedit.setEnabled(False)
        self.labelcheckbox.setChecked(False)
        self.labellineedit.setEnabled(False)
        self.uuidlineedit.setEnabled(True)
        if self.uuidlineedit.text() == "":
            label = microhal.getUUIDByDevice(str(self.devicelineedit.text()))
            self.uuidlineedit.setText(label)

and likewise for the label slot

Works OK on my machine.