mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
remove unused variables and commented-out code
This commit is contained in:
parent
c8373f1ced
commit
e001cd4d3a
4 changed files with 1 additions and 11 deletions
|
@ -131,7 +131,6 @@ class DataModel(QAbstractTableModel):
|
||||||
if role == Qt.FontRole:
|
if role == Qt.FontRole:
|
||||||
if self.activeCols[index.column()] not in ("question", "answer", "noteFld"):
|
if self.activeCols[index.column()] not in ("question", "answer", "noteFld"):
|
||||||
return
|
return
|
||||||
row = index.row()
|
|
||||||
c = self.getCard(index)
|
c = self.getCard(index)
|
||||||
t = c.template()
|
t = c.template()
|
||||||
if not t.get("bfont"):
|
if not t.get("bfont"):
|
||||||
|
@ -293,7 +292,6 @@ class DataModel(QAbstractTableModel):
|
||||||
return "%Y-%m-%d"
|
return "%Y-%m-%d"
|
||||||
|
|
||||||
def columnData(self, index):
|
def columnData(self, index):
|
||||||
row = index.row()
|
|
||||||
col = index.column()
|
col = index.column()
|
||||||
type = self.columnType(col)
|
type = self.columnType(col)
|
||||||
c = self.getCard(index)
|
c = self.getCard(index)
|
||||||
|
@ -388,7 +386,6 @@ class DataModel(QAbstractTableModel):
|
||||||
if type != "noteFld":
|
if type != "noteFld":
|
||||||
return False
|
return False
|
||||||
|
|
||||||
row = index.row()
|
|
||||||
c = self.getCard(index)
|
c = self.getCard(index)
|
||||||
nt = c.note().model()
|
nt = c.note().model()
|
||||||
return nt["flds"][self.col.models.sortIdx(nt)]["rtl"]
|
return nt["flds"][self.col.models.sortIdx(nt)]["rtl"]
|
||||||
|
@ -2061,7 +2058,7 @@ where id in %s"""
|
||||||
self.model.beginReset()
|
self.model.beginReset()
|
||||||
self.mw.checkpoint(tr(TR.BROWSING_TAG_DUPLICATES))
|
self.mw.checkpoint(tr(TR.BROWSING_TAG_DUPLICATES))
|
||||||
nids = set()
|
nids = set()
|
||||||
for s, nidlist in res:
|
for _, nidlist in res:
|
||||||
nids.update(nidlist)
|
nids.update(nidlist)
|
||||||
self.col.tags.bulkAdd(list(nids), tr(TR.BROWSING_DUPLICATE))
|
self.col.tags.bulkAdd(list(nids), tr(TR.BROWSING_DUPLICATE))
|
||||||
self.mw.progress.finish()
|
self.mw.progress.finish()
|
||||||
|
|
|
@ -270,7 +270,6 @@ class AnkiQt(QMainWindow):
|
||||||
# called on .clear()
|
# called on .clear()
|
||||||
return
|
return
|
||||||
name = self.pm.profiles()[n]
|
name = self.pm.profiles()[n]
|
||||||
f = self.profileForm
|
|
||||||
self.pm.load(name)
|
self.pm.load(name)
|
||||||
|
|
||||||
def openProfile(self):
|
def openProfile(self):
|
||||||
|
|
|
@ -71,7 +71,6 @@ class TagLimit(QDialog):
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
self.hide()
|
self.hide()
|
||||||
n = 0
|
|
||||||
# gather yes/no tags
|
# gather yes/no tags
|
||||||
yes = []
|
yes = []
|
||||||
no = []
|
no = []
|
||||||
|
|
|
@ -201,16 +201,11 @@ class ButtonedDialog(QMessageBox):
|
||||||
self.help = help
|
self.help = help
|
||||||
self.setIcon(QMessageBox.Warning)
|
self.setIcon(QMessageBox.Warning)
|
||||||
self.setText(text)
|
self.setText(text)
|
||||||
# v = QVBoxLayout()
|
|
||||||
# v.addWidget(QLabel(text))
|
|
||||||
# box = QDialogButtonBox()
|
|
||||||
# v.addWidget(box)
|
|
||||||
for b in buttons:
|
for b in buttons:
|
||||||
self._buttons.append(self.addButton(b, QMessageBox.AcceptRole))
|
self._buttons.append(self.addButton(b, QMessageBox.AcceptRole))
|
||||||
if help:
|
if help:
|
||||||
self.addButton(tr(TR.ACTIONS_HELP), QMessageBox.HelpRole)
|
self.addButton(tr(TR.ACTIONS_HELP), QMessageBox.HelpRole)
|
||||||
buttons.append(tr(TR.ACTIONS_HELP))
|
buttons.append(tr(TR.ACTIONS_HELP))
|
||||||
# self.setLayout(v)
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
Loading…
Reference in a new issue