| 30 | } |
| 31 | |
| 32 | void LexerManager::registerSciLexerProxy(const QString &language, AbstractLexerProxy *proxy) |
| 33 | { |
| 34 | if (sciLexerProxyMng.contains(language)) { |
| 35 | qWarning() << "The lexer proxy of " << language << " has been registed!"; |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | if (!proxy) { |
| 40 | qWarning() << "The proxy is null"; |
| 41 | return; |
| 42 | } |
| 43 | |
| 44 | // The `proxy` is structured by `LexerManager` |
| 45 | if (!proxy->parent()) |
| 46 | proxy->setParent(this); |
| 47 | |
| 48 | sciLexerProxyMng.insert(language, proxy); |
| 49 | } |
| 50 | |
| 51 | QsciLexer *LexerManager::createSciLexer(const QString &language, const QString &fileName) |
| 52 | { |
no test coverage detected