1. 06 Nov, 2015 2 commits
  2. 14 Oct, 2015 1 commit
  3. 05 Oct, 2015 1 commit
  4. 01 Oct, 2015 1 commit
    • Nikolai Kosjar's avatar
      Clang: Unregister file with project immediately on project close · a5674be6
      Nikolai Kosjar authored
      Ensure that first the editors unregister with the removed project part,
      then unregister the project part.
      
      This makes testing and following the message logs easier.
      
      It also fixes the following race condition:
       * Unload project of opened file
       * Immediately close the editor before a new project part is calculated
       ==> The editor is closed, but the translation unit is not properly
           unregistered.
      
      Change-Id: I618930d221323435ba60ac6c051380bccc9fdaf1
      Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
      a5674be6
  5. 30 Sep, 2015 2 commits
  6. 29 Sep, 2015 2 commits
    • 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
    • Nikolai Kosjar's avatar
      Clang: Refactor handling of diagnostics · de6d7f06
      Nikolai Kosjar authored
      ...by introducing ClangDiagnosticManager and the helper class
      ClangDiagnosticFilter.
      
      ClangDiagnosticManager will get more state in a follow-up change.
      
      Change-Id: Id2c312bc897ea41ed67292b56b24dcfb7975ff4a
      Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
      de6d7f06
  7. 10 Sep, 2015 1 commit
  8. 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
  9. 31 Aug, 2015 4 commits
  10. 29 Jul, 2015 1 commit
  11. 20 Jul, 2015 2 commits
  12. 10 Jul, 2015 1 commit
  13. 01 Jul, 2015 1 commit
  14. 23 Jun, 2015 1 commit
  15. 22 Jun, 2015 1 commit
  16. 16 Jun, 2015 1 commit
  17. 10 Jun, 2015 1 commit
    • Nikolai Kosjar's avatar
      Clang: Use completion through backend process · 23b8a3b2
      Nikolai Kosjar authored
      This makes us independent of libclang crashes for completion.
      Re-parsing for highlighting still happens in the Qt Creator process.
      
      Run in verbose mode:
          qtc.clangcodemodel.ipc=true
      
      Run tests:
          -test "ClangCodeModel"
      
      Task-number: QTCREATORBUG-14108
      Task-number: QTCREATORBUG-12819
      Change-Id: Id3e95bd2afdb6508bbd1d35fddc69534a909b905
      Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
      23b8a3b2
  18. 16 Jan, 2015 1 commit
  19. 12 Jan, 2015 1 commit
  20. 28 Nov, 2014 1 commit
  21. 03 Nov, 2014 1 commit
  22. 16 Oct, 2014 1 commit
  23. 25 Sep, 2014 1 commit
  24. 19 Sep, 2014 1 commit
  25. 29 Aug, 2014 1 commit
  26. 25 Aug, 2014 1 commit
    • Nikolai Kosjar's avatar
      C++: Base parsing on editor document instead of widget · 89bd4ee3
      Nikolai Kosjar authored
      This mainly takes CppEditorSupport apart.
      
      * Parsing is now invoked by CPPEditorDocument itself by listening to
        QTextDocument::contentsChanged().
      
      * Upon construction and destruction CPPEditorDocument creates and
        deletes an EditorDocumentHandle for (un)registration in the model
        manager. This handle provides everything to generate the working copy
        and to access the editor document processor.
      
      * A CPPEditorDocument owns a BaseEditorDocumentProcessor instance that
        controls parsing, semantic info recalculation and the semantic
        highlighting for the document. This is more or less what is left from
        CppEditorSupport and can be considered as the backend of a
        CPPEditorDocument. CPPEditorDocument itself is quite small.
      
          * BuiltinEditorDocumentProcessor and ClangEditorDocumentProcessor
            derive from BaseEditorDocumentProcessor and implement the gaps.
      
          * Since the semantic info calculation was bound to the widget, it
            also calculated the local uses, which depend on the cursor
            position. This calculation got moved into the extracted class
            UseSeletionsUpdater in the cppeditor plugin, which is run once the
            cursor position changes or the semantic info document is updated.
      
          * Some more logic got extracted:
      	- SemanticInfoUpdater (logic was in CppEditorSupport)
      	- SemanticHighlighter (logic was in CppEditorSupport)
      
          * The *Parser and *Processor classes can be easily accessed by the
            static function get().
      
      * CppHighlightingSupport is gone since it turned out to be useless.
      
      * The editor dependency in CompletionAssistProviders is gone since we
        actually only need the file path now.
      
      Change-Id: I49d3a7bd138c5ed9620123e34480772535156508
      Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      89bd4ee3