Skip to content
Snippets Groups Projects
  1. Feb 12, 2016
  2. Jan 19, 2016
  3. Jan 12, 2016
  4. Dec 16, 2015
  5. Dec 09, 2015
  6. Sep 29, 2015
    • 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
  7. 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
  8. Aug 31, 2015
  9. Jul 10, 2015
  10. Jan 16, 2015
  11. Jan 14, 2015
  12. Oct 23, 2014
    • Francois Ferrand's avatar
      CppTools: Fix C++ diagnostics hightlighting. · acf79d7f
      Francois Ferrand authored
      
      When the length of the highlight is specified, the code does not properly
      check for end of line. This causes some lines to be highlighted when only
      the last word was supposed to be.
      
      For example, with this code:
         1: void foo(int x);
         2: int a = foo
         3:            ();
         4: int b = foo(
         5:             );
      line 2 and 4 used to be completely highlighted (underlined), instead of
      just 'foo'.
      
      Change-Id: I40e895410ce0f38bad0adbccd509fd2943c93c97
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      acf79d7f
  13. Oct 15, 2014
  14. Sep 25, 2014
  15. Sep 19, 2014
  16. Sep 04, 2014
  17. 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