Mercurial > lcfOS
comparison python/ide.py @ 277:046017431c6a
Started register allocator
author | Windel Bouwman |
---|---|
date | Thu, 26 Sep 2013 21:14:25 +0200 |
parents | ac603eb66b63 |
children | 2ccd57b1d78c |
comparison
equal
deleted
inserted
replaced
276:56d37ed4b4d2 | 277:046017431c6a |
---|---|
50 c = self.model.rowCount() | 50 c = self.model.rowCount() |
51 self.model.removeRows(0, c) | 51 self.model.removeRows(0, c) |
52 for e in errorlist: | 52 for e in errorlist: |
53 item = QStandardItem(self.errorIcon, str(e.msg)) | 53 item = QStandardItem(self.errorIcon, str(e.msg)) |
54 item.setData(e) | 54 item.setData(e) |
55 irow = QStandardItem(str(e.loc.row)) | 55 row = str(e.loc.row) if e.loc else '' |
56 irow = QStandardItem(row) | |
56 irow.setData(e) | 57 irow.setData(e) |
57 icol = QStandardItem(str(e.loc.col)) | 58 col = str(e.loc.col) if e.loc else '' |
59 icol = QStandardItem(col) | |
58 icol.setData(e) | 60 icol.setData(e) |
59 self.model.appendRow([item, irow, icol]) | 61 self.model.appendRow([item, irow, icol]) |
60 | 62 |
61 def itemSelected(self, index): | 63 def itemSelected(self, index): |
62 if not index.isValid(): | 64 if not index.isValid(): |
221 self.restoreState(self.settings.value('mainwindowstate')) | 223 self.restoreState(self.settings.value('mainwindowstate')) |
222 if self.settings.contains('mainwindowgeometry'): | 224 if self.settings.contains('mainwindowgeometry'): |
223 self.restoreGeometry(self.settings.value('mainwindowgeometry')) | 225 self.restoreGeometry(self.settings.value('mainwindowgeometry')) |
224 if self.settings.contains('lastfiles'): | 226 if self.settings.contains('lastfiles'): |
225 lfs = self.settings.value('lastfiles') | 227 lfs = self.settings.value('lastfiles') |
226 self.to_open_files.extend(lfs) | 228 if lfs: |
229 self.to_open_files.extend(lfs) | |
227 | 230 |
228 def showEvent(self, ev): | 231 def showEvent(self, ev): |
229 super().showEvent(ev) | 232 super().showEvent(ev) |
230 while self.to_open_files: | 233 while self.to_open_files: |
231 fn = self.to_open_files.pop(0) | 234 fn = self.to_open_files.pop(0) |