TODO plugin: Add file patterns to exclude from parsing

Additional list of regular expressions added to TODO plugin settings
to allow set patterns to be excluded from file list to parse by this plugin.

Change-Id: I718f111ac7592557a6aa86865283468c53d58078
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Denis Kormalev
2015-05-18 22:47:20 +03:00
parent 4f5a02d596
commit a429ef3d50
19 changed files with 455 additions and 95 deletions

View File

@@ -39,25 +39,20 @@ namespace Todo {
namespace Internal {
TodoItemsScanner::TodoItemsScanner(const KeywordList &keywordList, QObject *parent) :
QObject(parent)
QObject(parent), m_keywordList(keywordList)
{
setKeywordList(keywordList);
}
void TodoItemsScanner::setKeywordList(const KeywordList &keywordList)
void TodoItemsScanner::setParams(const KeywordList &keywordList)
{
m_keywordList = keywordList;
keywordListChanged();
scannerParamsChanged();
}
// Descendants can override and make a request for full rescan here if needed
void TodoItemsScanner::keywordListChanged()
{
}
// Descendants can use this to process comment lines
void TodoItemsScanner::processCommentLine(const QString &fileName, const QString &comment,
unsigned lineNumber, QList<TodoItem> &outItemList)
unsigned lineNumber, QList<TodoItem> &outItemList)
{
LineParser parser(m_keywordList);
QList<TodoItem> newItemList = parser.parse(comment);