Skip to content
Snippets Groups Projects
  1. Feb 19, 2016
  2. Feb 16, 2016
  3. Feb 15, 2016
  4. Jan 19, 2016
  5. Jan 12, 2016
  6. Dec 16, 2015
  7. Dec 09, 2015
  8. Sep 02, 2015
    • 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. Jul 10, 2015
  10. Jun 23, 2015
  11. Jun 22, 2015
  12. Feb 26, 2015
  13. Jan 16, 2015
  14. Jan 12, 2015
  15. Nov 28, 2014
  16. Nov 06, 2014
  17. Nov 03, 2014
  18. Oct 23, 2014
  19. Oct 15, 2014
  20. Sep 26, 2014
  21. Sep 25, 2014
  22. Sep 19, 2014
  23. Aug 29, 2014
  24. Aug 25, 2014
    • 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: default avatarOrgad Shaneh <orgads@gmail.com>
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      89bd4ee3
Loading