This commit is contained in:
Kovid Goyal 2013-05-18 09:49:28 +05:30
parent b45e97134e
commit fa227be4dd

View File

@ -364,7 +364,7 @@ class CcCommentsDelegate(QStyledItemDelegate): # {{{
if hasattr(QStyle, 'CE_ItemViewItem'):
style.drawControl(QStyle.CE_ItemViewItem, option, painter)
ctx = QAbstractTextDocumentLayout.PaintContext()
ctx.palette = option.palette #.setColor(QPalette.Text, QColor("red"));
ctx.palette = option.palette # .setColor(QPalette.Text, QColor("red"));
if hasattr(QStyle, 'SE_ItemViewItemText'):
textRect = style.subElementRect(QStyle.SE_ItemViewItemText, option)
painter.save()
@ -457,7 +457,7 @@ class CcTemplateDelegate(QStyledItemDelegate): # {{{
validation_formatter.validate(val)
except Exception as err:
error_dialog(self.parent(), _('Invalid template'),
'<p>'+_('The template %s is invalid:')%val + \
'<p>'+_('The template %s is invalid:')%val +
'<br>'+str(err), show=True)
model.setData(index, QVariant(val), Qt.EditRole)
@ -469,3 +469,4 @@ class CcTemplateDelegate(QStyledItemDelegate): # {{{
# }}}