Skip to content
Snippets Groups Projects
  1. Mar 24, 2016
  2. Jan 19, 2016
  3. Jan 13, 2016
  4. Dec 16, 2015
  5. Oct 06, 2015
  6. 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
  7. Jul 10, 2015
  8. Jun 03, 2015
  9. Apr 24, 2015
    • Nikolai Kosjar's avatar
      CppTools: Remove separate indexing revision · d4bb5033
      Nikolai Kosjar authored
      
      For indexing we used a custom revision that was updated on each
      modelManager BuiltinIndexingSupport::refreshSourceFiles() call. This
      could lead to rejection of updated documents triggered by refactoring
      actions, like for the following case:
      
       1. Open a project containing a.h and a.cpp
       2. Open a.cpp, insert some new lines, save and close the document
       3. Open a.h and rename a function that is defined in a.cpp
          --> The refactoring action modifies a.h and a.cpp, so re-indexing
              of those is triggered. Since a.cpp has already a higher revision
              (step 2) than the updated document, the updated document is
              discarded. As a consequence find usages and follow symbol fails
              for the renamed function.
      
      Now the document call back provided to CppSourceProcessor is responsible
      for updating the document revision based on the latest revision in the
      global snapshot.
      
      Change-Id: I4dfa0a4d34991655acfa749109f00c47b0fbfdbe
      Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
      Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
      d4bb5033
  10. Mar 05, 2015
  11. Feb 04, 2015
    • Orgad Shaneh's avatar
      C++: Remove unneeded qualifications · 65e7db42
      Orgad Shaneh authored
      
      Mostly done using the following ruby script:
      Dir.glob('**/*.cpp').each { |file|
        next if file =~ %r{src/shared/qbs|/qmljs/}
        s = File.read(file)
        s.scan(/^using namespace (.*);$/) {
          ns = $1
          t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
            before = $1
            char = $2
            if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
              m
            else
              before + char
            end
          }
          if t != s
            puts file
            File.open(file, 'w').write(t)
          end
        }
      }
      
      Change-Id: I6fbe13ddc1485efe95c3156097bf41d90c0febac
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      65e7db42
  12. Jan 29, 2015
  13. Jan 16, 2015
  14. Jan 14, 2015
  15. Jan 12, 2015
  16. Dec 19, 2014
  17. Dec 15, 2014
  18. Dec 03, 2014
    • Nikolai Kosjar's avatar
      CppTools: Update document on activation · cb0d1369
      Nikolai Kosjar authored
      
      ...if the project was updated in the meanwhile.
      
      If a project is updated mark invisible editor documents dirty and update
      them if they get focus.
      
      This also fixes document highlighting when restoring a session for
      documents that the user "switched away" before the project info is
      pushed to CppModelManager.
      
      This completes
      
          CppTools: Update visible documents on project update
          commit c2eb91e0
      
      which only takes care of visible documents.
      
      Task-number: QTCREATORBUG-13270
      Change-Id: Id445e7f509deac5d03194aecc54ce4629b7926ce
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
      cb0d1369
  19. Nov 28, 2014
  20. Nov 03, 2014
  21. Oct 21, 2014
  22. Oct 09, 2014
  23. Oct 06, 2014
  24. Oct 02, 2014
  25. Sep 26, 2014
  26. Sep 19, 2014
  27. Sep 16, 2014
  28. Sep 12, 2014
  29. Sep 04, 2014
  30. Aug 28, 2014
  31. 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
  32. Aug 20, 2014
Loading