py3 in qtgui
This commit is contained in:
@@ -76,7 +76,7 @@ class Console(QtGui.QPlainTextEdit):
|
||||
|
||||
def getCommand(self):
|
||||
doc = self.document()
|
||||
curr_line = unicode(doc.findBlockByLineNumber(doc.lineCount() - 1).text())
|
||||
curr_line = doc.findBlockByLineNumber(doc.lineCount() - 1).text()
|
||||
curr_line = curr_line.rstrip()
|
||||
curr_line = curr_line[len(self.prompt):]
|
||||
return curr_line
|
||||
@@ -86,7 +86,7 @@ class Console(QtGui.QPlainTextEdit):
|
||||
return
|
||||
|
||||
doc = self.document()
|
||||
curr_line = unicode(doc.findBlockByLineNumber(doc.lineCount() - 1).text())
|
||||
curr_line = doc.findBlockByLineNumber(doc.lineCount() - 1).text()
|
||||
self.moveCursor(QtGui.QTextCursor.End)
|
||||
for i in range(len(curr_line) - len(self.prompt)):
|
||||
self.moveCursor(QtGui.QTextCursor.Left, QtGui.QTextCursor.KeepAnchor)
|
||||
@@ -95,7 +95,6 @@ class Console(QtGui.QPlainTextEdit):
|
||||
self.textCursor().insertText(command)
|
||||
self.moveCursor(QtGui.QTextCursor.End)
|
||||
|
||||
|
||||
def show_completions(self, completions):
|
||||
if self.completions_visible:
|
||||
self.hide_completions()
|
||||
@@ -113,7 +112,6 @@ class Console(QtGui.QPlainTextEdit):
|
||||
self.moveCursor(QtGui.QTextCursor.End)
|
||||
self.completions_visible = True
|
||||
|
||||
|
||||
def hide_completions(self):
|
||||
if not self.completions_visible:
|
||||
return
|
||||
@@ -125,7 +123,6 @@ class Console(QtGui.QPlainTextEdit):
|
||||
self.moveCursor(QtGui.QTextCursor.End)
|
||||
self.completions_visible = False
|
||||
|
||||
|
||||
def getConstruct(self, command):
|
||||
if self.construct:
|
||||
prev_command = self.construct[-1]
|
||||
|
||||
Reference in New Issue
Block a user