Advertisement
orgads

Adaptations for to-do

Feb 20th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.89 KB | None | 0 0
  1. diff --git a/src/plugins/todo/cpptodoitemsscanner.cpp b/src/plugins/todo/cpptodoitemsscanner.cpp
  2. index 9f60e62..04aefdb 100644
  3. --- a/src/plugins/todo/cpptodoitemsscanner.cpp
  4. +++ b/src/plugins/todo/cpptodoitemsscanner.cpp
  5. @@ -53,7 +53,7 @@ bool CppTodoItemsScanner::shouldProcessFile(const QString &fileName)
  6.      CPlusPlus::CppModelManagerInterface *modelManager = CPlusPlus::CppModelManagerInterface::instance();
  7.  
  8.      foreach (const CPlusPlus::CppModelManagerInterface::ProjectInfo &info, modelManager->projectInfos())
  9. -        if (info.project->files(ProjectExplorer::Project::ExcludeGeneratedFiles).contains(fileName))
  10. +        if (info.project().data()->files(ProjectExplorer::Project::ExcludeGeneratedFiles).contains(fileName))
  11.              return true;
  12.  
  13.      return false;
  14. @@ -68,7 +68,7 @@ void CppTodoItemsScanner::keywordListChanged()
  15.  
  16.      QStringList filesToBeUpdated;
  17.      foreach (const CPlusPlus::CppModelManagerInterface::ProjectInfo &info, modelManager->projectInfos())
  18. -        filesToBeUpdated << info.project->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
  19. +        filesToBeUpdated << info.project().data()->files(ProjectExplorer::Project::ExcludeGeneratedFiles);
  20.  
  21.      modelManager->updateSourceFiles(filesToBeUpdated);
  22.  }
  23. diff --git a/src/plugins/todo/todoitemsprovider.cpp b/src/plugins/todo/todoitemsprovider.cpp
  24. index 5e3dda2..54c2799 100644
  25. --- a/src/plugins/todo/todoitemsprovider.cpp
  26. +++ b/src/plugins/todo/todoitemsprovider.cpp
  27. @@ -79,7 +79,7 @@ void TodoItemsProvider::updateList()
  28.      // Show only items of the current file if any
  29.      if (m_settings.scanningScope == ScanningScopeCurrentFile) {
  30.          if (m_currentEditor)
  31. -            m_itemsList = m_itemsHash.value(m_currentEditor->file()->fileName());
  32. +            m_itemsList = m_itemsHash.value(m_currentEditor->document()->fileName());
  33.      }
  34.  
  35.      // Show only items of the startup project if any
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement