1. 12 Oct, 2015 2 commits
    • 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
    • Nikolai Kosjar's avatar
      CppEditor: Move static symbol finder instance to CppTools · 6ced48ea
      Nikolai Kosjar authored
      ...to it can be reused by other clients more easily. Also, in a
      follow-up change it will have a project part dependency that can be
      cleared inside the CppModelManager more easily.
      
      Change-Id: Ic9f2ce5212a94fd05ab0571e9ad99d0a25f5bc5c
      Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
      6ced48ea
  2. 09 Oct, 2015 1 commit
  3. 06 Oct, 2015 1 commit
  4. 29 Sep, 2015 1 commit
    • Nikolai Kosjar's avatar
      Clang: Integrate clang's fixits as refactoring actions · a7928b4b
      Nikolai Kosjar authored
      They are invokable by the usual means (Alt+Enter, editor's context menu
      > Refactor) plus by the context menu of the editor's left margin for the
      related line.
      
      The fixit text comes directly from libclang and is thus not translated.
      We modify the text slighty by stripping the diagnostic category prefix
      ("note:", "error:", ...) and capitalizing the first letter.
      
      A follow-up change should properly indicate available refactorings with
      a refactoring icon in the editor's left margin.
      
      Task-number: QTCREATORBUG-14868
      Change-Id: I86157c9f824d2a9dedf19087476d02ad1e6cc854
      Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
      a7928b4b
  5. 28 Sep, 2015 2 commits
    • Marco Bubke's avatar
      Clang: Add revision and completion management · b412eb81
      Marco Bubke authored
      Reparsing a document is expensive so we should avoid it by all means. In
      this patch we prevent that the same document is send again. It isn't send
      too in advance of a code completion if there was no changes before the
      the completion position.
      
      Change-Id: I0bb786ba1d4e7ce08611a518cb32f8cf8f4d0037
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      b412eb81
    • Nikolai Kosjar's avatar
      C++: Comment out a flaky test · e241444b
      Nikolai Kosjar authored
      The test relied on logic that was reverted with change
      915f68de.
      
      LookupScopePrivate::findSpecialization() gets a "TemplateNameIdTable
      &specializations" with a non-deterministic order. Without the extra
      logic, the very first entry will be chosen as the found specialization.
      
      The non-deterministic order comes from the TemplateNameId::Compare,
      which calls std::lexicographical_compare() with the template arguments,
      which are FullySpecifiedTypes. The result of
      FullySpecifiedType::operator<() might depend on a pointer comparison.
      
      Change-Id: I8d69d1bb5831145b1c21a5ea848c0043f17ec415
      Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
      e241444b
  6. 24 Sep, 2015 1 commit
  7. 23 Sep, 2015 3 commits
  8. 22 Sep, 2015 2 commits
  9. 16 Sep, 2015 2 commits
  10. 14 Sep, 2015 1 commit
  11. 10 Sep, 2015 1 commit
  12. 02 Sep, 2015 1 commit
    • Nikolai Kosjar's avatar
      C++: Fix crash after triggering completion and closing editor · 169556db
      Nikolai Kosjar authored
      Fix use-after-free for the following case:
        1. Open an editor
        2. Trigger a long processing completion
           (e.g. simulate with QThread::msleep in
            CppCompletionAssistInterface::getCppSpecifics)
        3. ...and immediately close the editor (e.g. with Ctrl+W)
        4. Wait until it crashes.
      
      The completion thread relied on the BuiltinEditorDocumentParser object,
      which is deleted once the editor is closed. Fixed by sharing the
      ownership of that object between the *EditorDocumentProcessor and the
      completion assist interface.
      
      This case came up when doing tests for the bug report below.
      
      Task-number: QTCREATORBUG-14991
      Change-Id: I0b009229e68fc6b7838740858cdc41a32403fe6f
      Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
      169556db
  13. 31 Aug, 2015 3 commits
  14. 24 Aug, 2015 1 commit
  15. 21 Aug, 2015 1 commit
  16. 17 Aug, 2015 1 commit
  17. 10 Aug, 2015 1 commit
  18. 03 Aug, 2015 1 commit
  19. 20 Jul, 2015 4 commits
  20. 14 Jul, 2015 2 commits
  21. 10 Jul, 2015 4 commits
  22. 08 Jul, 2015 2 commits
  23. 02 Jul, 2015 1 commit
  24. 01 Jul, 2015 1 commit
    • Orgad Shaneh's avatar
      C++: Cleanup LookupContext · 7bed5cd3
      Orgad Shaneh authored
      Since the cache is now more reliable, some workarounds and optimizations
      in the instantiation process are not needed anymore.
      
      Also avoid instantiation of base classes when expandTemplates is
      disabled.
      
      As a bonus, we now resolve decltype of template function for a type that is not
      referenced anywhere but in the decltype.
      
      Change-Id: Idf42ba7280992db477c9aa62bb1815b27174594d
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      7bed5cd3