1. 14 Dec, 2017 1 commit
  2. 24 Nov, 2017 1 commit
  3. 20 Nov, 2017 1 commit
  4. 25 Oct, 2017 1 commit
  5. 24 Oct, 2017 1 commit
  6. 17 Oct, 2017 1 commit
  7. 22 Sep, 2017 2 commits
  8. 15 Sep, 2017 1 commit
  9. 14 Sep, 2017 1 commit
  10. 16 Mar, 2017 1 commit
  11. 07 Mar, 2017 1 commit
  12. 20 Feb, 2017 1 commit
    • Nikolai Kosjar's avatar
      CppTools/ProjectManagers: Reduce ui blocking when loading projects · 8c90998f
      Nikolai Kosjar authored
      ${AnyProject}::updateCppCodeModel() did two potentially not that cheap
      operations in the ui thread:
       (1) Querying the MimeDatabase for the mime type for the source files of
           the project. In 99.9% of the cases no files need to be read for
           this as the file extension will resolve the type. The expensiveness
           comes from the sheer number of files that can occur.
       (2) Calling compilers with the "(sub)project's compiler command line"
           to determine the macros. While the caches avoid redundant calls,
           the number of the unique compiler calls makes this still a
           ui-freezing experience.
      
      These two operations are moved into a worker thread. For this, the
      expensive compiler calls are encapsulated in thread safe lambdas
      ("runners") in order to keep the "mutexed" data minimal. The original
      API calls of the toolchains are implemented in terms of the runners.
      
      While adapting the project managers, remove also the calls to
      setProjectLanguage(). These are redundant because all of the project
      managers already set a proper value in the constructor. Also, currently
      there is no need (client) to report back detection of C sources in
      project parts. This also keeps CppProjectUpdater simple.
      
      There is still room for improvement:
       * Run the compiler calls in parallel instead of sequence.
       * Ensure that the mime type for a file is determined exactly once.
      
      Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f
      Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
      8c90998f
  13. 30 Jan, 2017 1 commit
  14. 26 Jan, 2017 1 commit
  15. 16 Dec, 2016 1 commit
  16. 13 Dec, 2016 2 commits
  17. 08 Dec, 2016 1 commit
  18. 06 Dec, 2016 1 commit
  19. 31 Aug, 2016 1 commit
  20. 16 Aug, 2016 1 commit
  21. 04 Aug, 2016 1 commit
  22. 28 Jun, 2016 1 commit
    • Nikolai Kosjar's avatar
      CppTools/Clang: Announce only removed project parts · d63e27d8
      Nikolai Kosjar authored
      ...and not all projects parts of a project if it is closed.
      
      Re-produce with:
        open a project A with subdirs (e.g. qtcreator.pro)
        open a subdir project from project A (e.g. cppeditor.pro)
        close project A
        --> The project part representing the subdir is announced as removed
            although it is still open.
      
      The clang code model was the only affected user - affected translation
      units were not parsed/updated anymore
      ("ERROR: ProjectPartDoesNotExistMessage").
      
      Change-Id: Ia79341ce201e3b4aefff9f597920dbc6f7d67634
      Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
      d63e27d8
  23. 23 May, 2016 1 commit
  24. 03 May, 2016 1 commit
    • Nikolai Kosjar's avatar
      QbsProjectManager: Fix SOFT ASSERT: "future.isFinished()" · 1cbb4cc9
      Nikolai Kosjar authored
      ...in file qbsproject.cpp, line 940.
      
      The assert can be triggered with e.g.:
       1. Load a bigger qbs project, e.g. qtcreator.qbs.
       2. Trigger project build as soon as possible.
       3. Cancel the "Parsing C/C++" operation.
       4. Wait until the build finished and the assert occurs.
      
      This happens because CppModelManager::updateProjectInfo() since
      
        commit  536ccc8a
        CppTools: Fix incompletely indexed project
      
      will check whether the previous indexer run was canceled or not. If it
      was canceled, it will trigger a full-reindexing of the project.
      
      Updating the compiler call data is a special case and it should never
      trigger an indexing operation, so introduce a dedicated update function
      for this case.
      
      Change-Id: I456945ccf2bf697aaeada572ed87f3acb21a5eaf
      Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
      Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
      1cbb4cc9
  25. 25 Apr, 2016 1 commit
    • Nikolai Kosjar's avatar
      CppTools: Fix incompletely indexed project · 536ccc8a
      Nikolai Kosjar authored
      Use case to reproduce:
       1. Open some bigger project, e.g. qtcreator.pro
       2. As soon as "Parsing C/C++ files" is reported, add a character to
          qmake's additional arguments in project mode (indexing should not be
          finished at this point).
       3. The indexing gets canceled.
       ==> ...but reindexing is not triggered.
      
      Fix by checking whether the future was canceled.
      
      Task-number: QTCREATORBUG-16134
      Change-Id: I520c6a64a6adc1cb04cafb5e0aa56c8bf41d7b14
      Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
      536ccc8a
  26. 24 Mar, 2016 1 commit
  27. 19 Feb, 2016 1 commit
  28. 12 Feb, 2016 1 commit
  29. 19 Jan, 2016 1 commit
  30. 13 Jan, 2016 1 commit
  31. 16 Dec, 2015 1 commit
  32. 15 Dec, 2015 1 commit
  33. 01 Dec, 2015 1 commit
  34. 16 Nov, 2015 1 commit
  35. 09 Nov, 2015 1 commit
  36. 06 Nov, 2015 1 commit
  37. 14 Oct, 2015 1 commit
    • Nikolai Kosjar's avatar
      CppTools: Fix dead lock on project unloading · 77270648
      Nikolai Kosjar authored
      ...with the clang code model.
      
      In updateProjectInfo() we lock the project mutex and emit a signal.
      However, the correspondig slot in the clang code model will call back
      into a function that needs to lock the mutex, too:
      
          CppTools::CppModelManager::workingCopy // dead locks here
          CppTools::BaseEditorDocumentParser::InMemoryInfo::InMemoryInfo
          ClangCodeModel::Internal::ClangEditorDocumentProcessor::run
          ClangCodeModel::Internal::ModelManagerSupportClang::unregisterTranslationUnitsWithProjectParts
          ClangCodeModel::Internal::ModelManagerSupportClang::onProjectPartsRemoved
           ...
          CppTools::CppModelManager::projectPartsRemoved
          CppTools::CppModelManager::updateProjectInfo // emits here
      
      Fixed by emitting the signal after releasing the mutex.
      
      Change-Id: Id3f3cd22b0604f343ada56ea13c26f0dc1a75bd6
      Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
      77270648
  38. 12 Oct, 2015 1 commit
    • Nikolai Kosjar's avatar
      CppTools: Make FollowSymbol respect projects · 6b6ad446
      Nikolai Kosjar authored
      Finding the class definition for a forward declaration or finding the
      function definition from its declaration is mostly determined by the
      file iteration order. Documents with the most common path prefix are
      checked first.
      
      This works fine as long as the files of your project have a common
      ancestor. If that's not the case, FollowSymbol might take you to the
      definition within another project.
      
      Fix that issue by considering the project part id when constructing the
      file iteration order. Since the cached file iteration order now depends
      on the projects, ensure to clear it if projects are added, changed or
      removed.
      
      Task-number: QTCREATORBUG-15116
      Change-Id: I529166bac363959c9fee0b946747fd0370a88809
      Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
      6b6ad446