Merge pull request #909 from wallgrenen/remove-unused-variables
remove unused variables and commented-out code
This commit is contained in:
commit
02209c5c16
@ -131,7 +131,6 @@ class DataModel(QAbstractTableModel):
|
||||
if role == Qt.FontRole:
|
||||
if self.activeCols[index.column()] not in ("question", "answer", "noteFld"):
|
||||
return
|
||||
row = index.row()
|
||||
c = self.getCard(index)
|
||||
t = c.template()
|
||||
if not t.get("bfont"):
|
||||
@ -293,7 +292,6 @@ class DataModel(QAbstractTableModel):
|
||||
return "%Y-%m-%d"
|
||||
|
||||
def columnData(self, index):
|
||||
row = index.row()
|
||||
col = index.column()
|
||||
type = self.columnType(col)
|
||||
c = self.getCard(index)
|
||||
@ -388,7 +386,6 @@ class DataModel(QAbstractTableModel):
|
||||
if type != "noteFld":
|
||||
return False
|
||||
|
||||
row = index.row()
|
||||
c = self.getCard(index)
|
||||
nt = c.note().model()
|
||||
return nt["flds"][self.col.models.sortIdx(nt)]["rtl"]
|
||||
@ -2061,7 +2058,7 @@ where id in %s"""
|
||||
self.model.beginReset()
|
||||
self.mw.checkpoint(tr(TR.BROWSING_TAG_DUPLICATES))
|
||||
nids = set()
|
||||
for s, nidlist in res:
|
||||
for _, nidlist in res:
|
||||
nids.update(nidlist)
|
||||
self.col.tags.bulkAdd(list(nids), tr(TR.BROWSING_DUPLICATE))
|
||||
self.mw.progress.finish()
|
||||
|
@ -270,7 +270,6 @@ class AnkiQt(QMainWindow):
|
||||
# called on .clear()
|
||||
return
|
||||
name = self.pm.profiles()[n]
|
||||
f = self.profileForm
|
||||
self.pm.load(name)
|
||||
|
||||
def openProfile(self):
|
||||
|
@ -71,7 +71,6 @@ class TagLimit(QDialog):
|
||||
|
||||
def accept(self):
|
||||
self.hide()
|
||||
n = 0
|
||||
# gather yes/no tags
|
||||
yes = []
|
||||
no = []
|
||||
|
@ -201,16 +201,11 @@ class ButtonedDialog(QMessageBox):
|
||||
self.help = help
|
||||
self.setIcon(QMessageBox.Warning)
|
||||
self.setText(text)
|
||||
# v = QVBoxLayout()
|
||||
# v.addWidget(QLabel(text))
|
||||
# box = QDialogButtonBox()
|
||||
# v.addWidget(box)
|
||||
for b in buttons:
|
||||
self._buttons.append(self.addButton(b, QMessageBox.AcceptRole))
|
||||
if help:
|
||||
self.addButton(tr(TR.ACTIONS_HELP), QMessageBox.HelpRole)
|
||||
buttons.append(tr(TR.ACTIONS_HELP))
|
||||
# self.setLayout(v)
|
||||
|
||||
def run(self):
|
||||
self.exec_()
|
||||
|
Loading…
Reference in New Issue
Block a user