Fix some code linter complaints in doc editor
This commit is contained in:
@@ -138,24 +138,20 @@ class GuiDocEditor(QTextEdit):
|
|||||||
self.setFrameStyle(QFrame.NoFrame)
|
self.setFrameStyle(QFrame.NoFrame)
|
||||||
|
|
||||||
# Custom Shortcuts
|
# Custom Shortcuts
|
||||||
QShortcut(
|
self.keyContext = QShortcut(self)
|
||||||
QKeySequence("Ctrl+."),
|
self.keyContext.setKey("Ctrl+.")
|
||||||
self,
|
self.keyContext.setContext(Qt.WidgetShortcut)
|
||||||
context=Qt.WidgetShortcut,
|
self.keyContext.activated.connect(self._openSpellContext)
|
||||||
activated=self._openSpellContext
|
|
||||||
)
|
self.followTag1 = QShortcut(self)
|
||||||
QShortcut(
|
self.followTag1.setKey(Qt.Key_Return | Qt.ControlModifier)
|
||||||
Qt.Key_Return | Qt.ControlModifier,
|
self.followTag1.setContext(Qt.WidgetShortcut)
|
||||||
self,
|
self.followTag1.activated.connect(self._followTag)
|
||||||
context=Qt.WidgetShortcut,
|
|
||||||
activated=self._followTag
|
self.followTag2 = QShortcut(self)
|
||||||
)
|
self.followTag2.setKey(Qt.Key_Enter | Qt.ControlModifier)
|
||||||
QShortcut(
|
self.followTag2.setContext(Qt.WidgetShortcut)
|
||||||
Qt.Key_Enter | Qt.ControlModifier,
|
self.followTag2.activated.connect(self._followTag)
|
||||||
self,
|
|
||||||
context=Qt.WidgetShortcut,
|
|
||||||
activated=self._followTag
|
|
||||||
)
|
|
||||||
|
|
||||||
# Set Up Document Word Counter
|
# Set Up Document Word Counter
|
||||||
self.wcTimerDoc = QTimer()
|
self.wcTimerDoc = QTimer()
|
||||||
@@ -1162,6 +1158,7 @@ class GuiDocEditor(QTextEdit):
|
|||||||
|
|
||||||
posCursor = self.cursorForPosition(thePos)
|
posCursor = self.cursorForPosition(thePos)
|
||||||
spellCheck = self._spellCheck
|
spellCheck = self._spellCheck
|
||||||
|
theWord = ""
|
||||||
|
|
||||||
if posCursor.block().text().startswith("@"):
|
if posCursor.block().text().startswith("@"):
|
||||||
spellCheck = False
|
spellCheck = False
|
||||||
@@ -1430,6 +1427,7 @@ class GuiDocEditor(QTextEdit):
|
|||||||
origB = theCursor.selectionEnd()
|
origB = theCursor.selectionEnd()
|
||||||
else:
|
else:
|
||||||
origA = theCursor.position()
|
origA = theCursor.position()
|
||||||
|
origB = theCursor.position()
|
||||||
|
|
||||||
findOpt = QTextDocument.FindFlag(0)
|
findOpt = QTextDocument.FindFlag(0)
|
||||||
if self.docSearch.isCaseSense:
|
if self.docSearch.isCaseSense:
|
||||||
|
|||||||
Reference in New Issue
Block a user