1. 24 Apr, 2015 1 commit
    • 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: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
      Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
  2. 07 Apr, 2015 1 commit
  3. 05 Mar, 2015 1 commit
  4. 27 Feb, 2015 1 commit
  5. 26 Feb, 2015 1 commit
  6. 20 Feb, 2015 1 commit
  7. 04 Feb, 2015 1 commit
    • 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_/
              before + char
          if t != s
            puts file
            File.open(file, 'w').write(t)
      Change-Id: I6fbe13ddc1485efe95c3156097bf41d90c0febac
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
  8. 16 Jan, 2015 1 commit
  9. 14 Jan, 2015 1 commit
  10. 12 Jan, 2015 1 commit
  11. 19 Dec, 2014 1 commit
  12. 18 Dec, 2014 1 commit
  13. 17 Dec, 2014 1 commit
  14. 15 Dec, 2014 1 commit
  15. 03 Dec, 2014 2 commits
    • Nikolai Kosjar's avatar
      CppTools: Remove QTC_ASSERT in CppModelManager::editorDocument() · 6b894b50
      Nikolai Kosjar authored
      This fixes
          SOFT ASSERT: "!filePath.isEmpty()" in file
          line 467
      which can be triggered by e.g. a "git show" document
      (onCurrentEditorChanged does not check for an empty file path).
      Change-Id: If4ed8e552069b290cb4ac93da52427b7ed2b91e8
      Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
    • 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>
  16. 24 Nov, 2014 1 commit
  17. 07 Nov, 2014 1 commit
  18. 23 Oct, 2014 1 commit
  19. 21 Oct, 2014 1 commit
  20. 15 Oct, 2014 2 commits
  21. 09 Oct, 2014 1 commit
  22. 06 Oct, 2014 1 commit
    • Nikolai Kosjar's avatar
      CppTools: Handle reset case for setIndexingSupport · 983c87dd
      Nikolai Kosjar authored
      For the time being, this function actually sets an additional
      CppIndexSupport to be executed. Handle the case that a client tries to
      restore the previous CppIndexingSupport (see SymbolSearcherTestCase).
      This fixes GenericProjectManager::test_simple in interaction with
      CppTools::test_builtinsymbolsearcher. Now first running the CppTools
      tests and then the GenericProjectManager tests work fine.
      Change-Id: Ibe7248ec8651d4fdc312f10cdcc9c56d6dd086d9
      Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
  23. 02 Oct, 2014 1 commit
  24. 25 Sep, 2014 1 commit
  25. 22 Sep, 2014 1 commit
  26. 19 Sep, 2014 3 commits
  27. 16 Sep, 2014 1 commit
  28. 08 Sep, 2014 1 commit
    • Orgad Shaneh's avatar
      CppTools: Fix compilation with recent gcc 4.9.2 · c023a1ca
      Orgad Shaneh authored
      See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62224
      .obj/release-shared/cppcodemodelinspectordialog.o: In function `CppEditor::Internal::CppCodeModelInspectorDialog::refresh()':
      cppcodemodelinspectordialog.cpp:(.text+0x79fc): undefined reference to `CppTools::Internal::CppModelManager::ensureUpdated()'
      .obj/release-shared/cppcodemodelinspectordialog.o: In function `CppTools::Internal::CppModelManager::definedMacros()':
      cppcodemodelinspectordialog.cpp:+0x26): undefined reference to `CppTools::Internal::CppModelManager::ensureUpdated()'
      .obj/release-shared/cppcodemodelinspectordialog.o: In function `CppTools::Internal::CppModelManager::headerPaths()':
      cppcodemodelinspectordialog.cpp: +0x26): undefined reference to `CppTools::Internal::CppModelManager::ensureUpdated()'
      Change-Id: Ie0e01f7628668cbbe11b701a93caef98bb8e335f
      Reviewed-by: default avatarAdam Majer <adamm@zombino.com>
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
  29. 05 Sep, 2014 1 commit
  30. 04 Sep, 2014 1 commit
  31. 29 Aug, 2014 1 commit
  32. 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
      * 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>
  33. 20 Aug, 2014 2 commits
  34. 07 Aug, 2014 1 commit
    • 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
      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>
  35. 04 Jul, 2014 1 commit