Skip to content

Commit

Permalink
rename, remove line, use default spyder theme
Browse files Browse the repository at this point in the history
  • Loading branch information
skjerns committed May 4, 2022
1 parent 62c6ab8 commit f4df955
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spyder_line_profiler/spyder/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ def select_file(self):

def show_log(self):
if self.output:
editor = TextEditor(self.output, title=_("Line profiler output"))
editor = TextEditor(self.output, title=_("Line profiler output"),
readonly=True, parent=self)

# Call .show() to dynamically resize editor;
# see spyder-ide/spyder#12202
Expand All @@ -373,7 +374,7 @@ def show_errorlog(self):
if self.error_output:
editor = TextEditor(self.error_output,
title=_("Line profiler output"),
readonly=True)
readonly=True, parent=self)
self.datelabel.setText(_('Profiling did not complete (error)'))
# Call .show() to dynamically resize editor;
# see spyder-ide/spyder#12202
Expand Down Expand Up @@ -580,7 +581,7 @@ def __init__(self, parent=None):
self.setColumnCount(len(self.header_list))
self.setHeaderLabels(self.header_list)
self.clear()
self.itemClicked.connect(self.onItemClick)
self.itemClicked.connect(self.on_item_clicked)

def show_tree(self):
"""Populate the tree with line profiler data and display it."""
Expand Down Expand Up @@ -655,8 +656,7 @@ def load_data(self, profdatafile):

# Fill dict
self.stats[func_info] = [func_stats, func_total_time]



def fill_item(self, item, filename, line_no, code, time, percent, perhit,
hits):
item.setData(COL_POS, Qt.UserRole, (osp.normpath(filename), line_no))
Expand Down Expand Up @@ -771,7 +771,7 @@ def populate_tree(self):
# Monospace font for code
line_item.setFont(COL_LINE, monospace_font)

def onItemClick(self, item):
def on_item_clicked(self, item):
data = item.data(COL_POS, Qt.UserRole)
if data is None or len(data)<2: return
filename, line_no = data
Expand Down

0 comments on commit f4df955

Please sign in to comment.