6 """ |
6 """ |
7 Module implementing the browser model. |
7 Module implementing the browser model. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 try: |
|
12 str = unicode |
|
13 except NameError: |
|
14 pass |
|
15 |
11 |
16 import os |
12 import os |
17 import sys |
|
18 import fnmatch |
13 import fnmatch |
19 import json |
14 import json |
20 |
15 |
21 from PyQt5.QtCore import QDir, QModelIndex, QAbstractItemModel, \ |
16 from PyQt5.QtCore import QDir, QModelIndex, QAbstractItemModel, \ |
22 QFileSystemWatcher, Qt, QProcess, QCoreApplication |
17 QFileSystemWatcher, Qt, QProcess, QCoreApplication |
1147 elif self.isDFile(): |
1142 elif self.isDFile(): |
1148 pixName = "fileD.png" |
1143 pixName = "fileD.png" |
1149 elif self.isJavaScriptFile(): |
1144 elif self.isJavaScriptFile(): |
1150 pixName = "fileJavascript.png" |
1145 pixName = "fileJavascript.png" |
1151 self._populated = False |
1146 self._populated = False |
1152 self._lazyPopulation = sys.version_info[0] == 3 |
1147 self._lazyPopulation = True |
1153 self._moduleName = os.path.basename(finfo) |
1148 self._moduleName = os.path.basename(finfo) |
1154 else: |
1149 else: |
1155 pixName = "fileMisc.png" |
1150 pixName = "fileMisc.png" |
1156 |
1151 |
1157 if os.path.lexists(self._filename) and os.path.islink(self._filename): |
1152 if os.path.lexists(self._filename) and os.path.islink(self._filename): |