Instantiate QFont only when it's needed
This commit is contained in:
parent
39fe1b8e9f
commit
bd708b721d
|
@ -1089,8 +1089,6 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
self, tableWidget, msgfolder, msgid, toAddress, fromAddress,
|
self, tableWidget, msgfolder, msgid, toAddress, fromAddress,
|
||||||
subject, received, read
|
subject, received, read
|
||||||
):
|
):
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setBold(True)
|
|
||||||
if toAddress == str_broadcast_subscribers:
|
if toAddress == str_broadcast_subscribers:
|
||||||
acct = accountClass(fromAddress)
|
acct = accountClass(fromAddress)
|
||||||
else:
|
else:
|
||||||
|
@ -1116,6 +1114,8 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
time_item.setFlags(
|
time_item.setFlags(
|
||||||
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
|
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
|
||||||
if not read:
|
if not read:
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
time_item.setFont(font)
|
time_item.setFont(font)
|
||||||
items.append(time_item)
|
items.append(time_item)
|
||||||
self.addMessageListItem(tableWidget, items)
|
self.addMessageListItem(tableWidget, items)
|
||||||
|
|
Reference in New Issue
Block a user