Skip to content
Snippets Groups Projects
  1. Jan 19, 2016
  2. Jan 13, 2016
  3. Dec 16, 2015
  4. Dec 15, 2015
  5. 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
  6. Jul 10, 2015
  7. Feb 20, 2015
  8. Jan 16, 2015
  9. Dec 17, 2014
  10. Sep 19, 2014
  11. Aug 29, 2014
  12. 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
  13. Aug 20, 2014
  14. Aug 07, 2014
    • Nikolai Kosjar's avatar
      CppTools: Tests: Add "Find Errors Indexing" mode · 0f3032f8
      Nikolai Kosjar authored
      
      Adding QTC_FIND_ERRORS_INDEXING=1 to the run environment will Creator
      force to do some "extended indexing" in order to find bugs:
      
         1) The project files are parsed as if they would be opened in an
            editor. That is, parsing happens as precisely as possible, based on
            the ProjectPart information.
      
         2) Symbols are looked up by invoking CheckSymbols, the backend of the
            semantic highlighter.
      
         3) A "Task List File" (*.tasks) will be written with all diagnostic
            messages.
      
      This special indexing mode is meant for testing purposes. E.g. it can be
      run nightly on some bigger projects to find regressions.
      
      Note that Qt Creator will quit exactly after the first time some source
      files are indexed. E.g. that will happen if you open a file manually or
      if you open a new unconfigured project. Therefore it's required to
      configure projects as needed before invoking in this indexing mode.
      
      Change-Id: If25b83e67d24df9e28e107cb062f21cbf3b4c643
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      0f3032f8
  15. Jul 24, 2014
    • Nikolai Kosjar's avatar
      CppTools: Auto-include pre-compiled headers · 6a9ae7e2
      Nikolai Kosjar authored
      
      So far the pre-compiled headers were processed (thus defines from those
      headers were visible), but the actual includes for the documents were
      not added, which is necessary for lookup/completion.
      
      Note that this will be only done if pre-compiled headers are not ignored
      (Options > C++ > Code Model > [] Ignore pre-compiled headers).
      
      Change-Id: I54a8e6b00597af164d958e3e9f2a1075ea187788
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      6a9ae7e2
  16. Jul 04, 2014
  17. Jun 18, 2014
  18. Jun 04, 2014
  19. Feb 27, 2014
  20. Jan 08, 2014
  21. Dec 10, 2013
  22. Nov 12, 2013
    • Erik Verbruggen's avatar
      C++: Release more documents. · 566be099
      Erik Verbruggen authored
      
      - fix memory leak in find-usages
      - do not retain snapshot in search history
      - when an editor is invisible for more than 2 minutes, release the
        backing snapshot
      
      Retaining snapshots will retain their documents, and if done for too
      long, the memory consumption might grow. This is especially the case
      when switching to a different kit (Qt version): in that case, the new
      versions of headers will be indexed, while the old ones stay around.
      
      Task-number: QTCREATORBUG-5583
      Task-number: QTCREATORBUG-7645
      Task-number: QTCREATORBUG-9842
      
      Change-Id: I045eda1565e0a3fa702baeffaab9c12662f90289
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      566be099
  23. Oct 23, 2013
  24. Oct 22, 2013
  25. Oct 09, 2013
  26. Oct 01, 2013
Loading