Make ExternalEditor slots private

This commit is contained in:
Florian Bruhin 2018-11-30 16:57:48 +01:00
parent d484d9363e
commit a7a8f4470b

View File

@ -84,7 +84,7 @@ class ExternalEditor(QObject):
message.error("Failed to delete tempfile... ({})".format(e))
@pyqtSlot(int, QProcess.ExitStatus)
def on_proc_closed(self, _exitcode, exitstatus):
def _on_proc_closed(self, _exitcode, exitstatus):
"""Write the editor text into the form field and clean up tempfile.
Callback for QProcess when the editor was closed.
@ -100,7 +100,7 @@ class ExternalEditor(QObject):
self._cleanup()
@pyqtSlot(QProcess.ProcessError)
def on_proc_error(self, _err):
def _on_proc_error(self, _err):
self._cleanup()
def edit(self, text, caret_position=None):
@ -176,8 +176,8 @@ class ExternalEditor(QObject):
column: the column number to pass to the editor
"""
self._proc = guiprocess.GUIProcess(what='editor', parent=self)
self._proc.finished.connect(self.on_proc_closed)
self._proc.error.connect(self.on_proc_error)
self._proc.finished.connect(self._on_proc_closed)
self._proc.error.connect(self._on_proc_error)
editor = config.val.editor.command
executable = editor[0]