70 if not pygmentsLexer: |
70 if not pygmentsLexer: |
71 lexer = pygmentsLexer |
71 lexer = pygmentsLexer |
72 else: |
72 else: |
73 lexer = "Pygments|{0}".format(pygmentsLexer) |
73 lexer = "Pygments|{0}".format(pygmentsLexer) |
74 if ext and lexer: |
74 if ext and lexer: |
75 itmList = self.editorLexerList.findItems(\ |
75 itmList = self.editorLexerList.findItems( |
76 ext, Qt.MatchFlags(Qt.MatchExactly), 0) |
76 ext, Qt.MatchFlags(Qt.MatchExactly), 0) |
77 if itmList: |
77 if itmList: |
78 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
78 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
79 itm = self.editorLexerList.takeTopLevelItem(index) |
79 itm = self.editorLexerList.takeTopLevelItem(index) |
80 del itm |
80 del itm |