78 lexer = pygmentsLexer |
78 lexer = pygmentsLexer |
79 else: |
79 else: |
80 lexer = "Pygments|{0}".format(pygmentsLexer) |
80 lexer = "Pygments|{0}".format(pygmentsLexer) |
81 if ext and lexer: |
81 if ext and lexer: |
82 itmList = self.editorLexerList.findItems( |
82 itmList = self.editorLexerList.findItems( |
83 ext, Qt.MatchFlags(Qt.MatchFlag.MatchExactly), 0) |
83 ext, Qt.MatchFlag.MatchExactly, 0) |
84 if itmList: |
84 if itmList: |
85 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
85 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
86 itm = self.editorLexerList.takeTopLevelItem(index) |
86 itm = self.editorLexerList.takeTopLevelItem(index) |
87 # __IGNORE_WARNING__ |
87 # __IGNORE_WARNING__ |
88 del itm |
88 del itm |