1. 26 Sep, 2014 1 commit
  2. 22 Sep, 2014 1 commit
  3. 11 Sep, 2014 1 commit
  4. 09 Sep, 2014 1 commit
  5. 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
        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: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      89bd4ee3
  6. 20 Aug, 2014 1 commit
  7. 18 Aug, 2014 1 commit
  8. 04 Aug, 2014 1 commit
  9. 01 Aug, 2014 1 commit
    • Przemyslaw Gorszkowski's avatar
      C++: nested class with enclosing template class · ba42ceb0
      Przemyslaw Gorszkowski authored
      
      
      The parent of instantiation of nested class of template class
      should be the instantiation of enclosing template class.
      
      To prevent the infinite loop for case with local typedef of enclosing
      template we should not change a parent of typedefed instatiation of
      enclosing template. Example:
      template <typename T>
      struct Enclosing
      {
        typedef Enclosing<T> EnclosingT;// first case
        struct Nested
        {
          typedef Enclosing<T> EnclosingT;// second case
        };
      };
      
      Task-number: QTCREATORBUG-11752
      Task-number: QTCREATORBUG-11999
      Change-Id: Iadd7b5ef73ee0c4881f59c9dabfe03339f55827b
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      ba42ceb0
  10. 31 Jul, 2014 1 commit
  11. 30 Jul, 2014 1 commit
  12. 08 Jul, 2014 1 commit
  13. 07 Jul, 2014 1 commit
  14. 04 Jul, 2014 2 commits
  15. 06 Jun, 2014 1 commit
  16. 09 Apr, 2014 1 commit
  17. 04 Apr, 2014 3 commits
  18. 26 Mar, 2014 1 commit
  19. 25 Mar, 2014 2 commits
  20. 12 Mar, 2014 1 commit
  21. 24 Jan, 2014 1 commit
  22. 21 Jan, 2014 1 commit
  23. 08 Jan, 2014 1 commit
  24. 07 Jan, 2014 3 commits
  25. 28 Dec, 2013 3 commits
  26. 23 Dec, 2013 6 commits
    • Orgad Shaneh's avatar
      CppTools: Fix indentation for some completion tests · 90265b76
      Orgad Shaneh authored
      
      
      Change-Id: I9a5bf4705da5ca88776dec70057da2c64e4c1494
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      90265b76
    • Orgad Shaneh's avatar
      CppTools: Make completion tests data-driven · 0909c029
      Orgad Shaneh authored
      
      
      Mostly done using the following Ruby script:
      
      Fname = 'src/plugins/cpptools/cppcompletion_test.cpp'
      s = File.read(Fname)
      mod = s.gsub(/(?<declaration>void CppToolsPlugin::test_(?<test_name>[^(]+)\(\)\n\{)(?<body>.*?\n)\}/m) { |func|
        match = $~
        declaration = match['declaration']
        body = match['body']
        test_name = match['test_name'].sub('_data', '')
        final = body.gsub(/(?:completions.clear\(\);\s+)?(?: +)[^\n]* =\n(?<code>.*?);\s*(?<completions>(?:completions.append\(QLatin1String\("[^"]*"\)\);\s*)*)QTest::newRow\("case: (?<name>.+?)"\)\s*<< code << _\("(?<prefix>[^"]+)"\) << completions;/m) {
          m = $~
          res = "    QTest::newRow(\"#{test_name}: #{m['name']}\") << _(\n#{m['code'].rstrip}\n        ) << _(\"#{m['prefix']}\") << (QStringList()"
          m['completions'].scan(/completions.append\((.+)\);/) { |comp|
            res << "\n            << #{comp[0]}"
          }
          res + ');'
        }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?, "(?<prefix>.+?)"\);\s*QStringList expected;\s*(?<completions>(?:expected.append\(QLatin1String\("[^"]*"\)\);\s*)*)const QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions, expected\);/m) {
          m = $~
          res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(\"#{m['prefix']}\") << (QStringList()"
          m['completions'].scan(/expected.append\((.+)\);/) { |comp|
            res << "\n            << #{comp[0]}"
          }
          res + ');'
        }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*(?:const )?QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\n/m) { |mm|
          m = $~
          res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(#{m['prefix']}) << (QStringList()"
          m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp|
            res << "\n            << #{comp[0]}"
          }
          res + ");\n"
        }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*bool replaceAccessOperator = false;\s*const QStringList completions = test.getCompletions\(\&replaceAccessOperator\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\s*QVERIFY\((?<replace>!?)[^)]*\);\n/m) { |mm|
          m = $~
          res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(#{m['prefix']}) << (QStringList()"
          m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp|
            res << "\n            << #{comp[0]}"
          }
          res + ")\n        << #{m['replace'].empty?};\n"
        }
        if final == body or final['QTest::addColumn']
          declaration + final + "}"
        else
          final
        end
      }.gsub(/QTest::newRow\("([^"]+)"/) { |m|
        name = $1
        if name.size > 73
          space = name[0..73].rindex(/[ _]/)
          "QTest::newRow(\"#{name[0..space]}\"\n                  \"#{name[space+1..-1]}\""
        else
          m
        end
      }.gsub(/\s+QTest::newRow/, "\n\n    QTest::newRow")
      if mod != s
          File.open(Fname, 'wt').write(mod)
      end
      
      Change-Id: Id6bfb03cdf31ac27b36028fcdc861c340a5398f4
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      0909c029
    • Orgad Shaneh's avatar
      CppTools: Reorder completion tests · ed2d9857
      Orgad Shaneh authored
      
      
      For reasonable diff on following commit
      
      Change-Id: I97e121355279f9166cea2f500cf2d4df5fafaa32
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      ed2d9857
    • Orgad Shaneh's avatar
      CppTools: Generalize data-driven test_completion · b0c3a6ba
      Orgad Shaneh authored
      
      
      Change-Id: I409a00b869a95dff2d69c9744da75c324c82776a
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      b0c3a6ba
    • Orgad Shaneh's avatar
      CppTools: Cleanup completion tests #2 · 0204f566
      Orgad Shaneh authored
      
      
      Change-Id: I3c5f42de464a5607f1caa6a48d881c5a4a113ec3
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      0204f566
    • Orgad Shaneh's avatar
      CppTools: Remove superfluous comments from completion tests · 7356987c
      Orgad Shaneh authored
      
      
      Change-Id: I2526daeaf54f7f8d4b808cf556cff9242adaa391
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      7356987c
  27. 18 Dec, 2013 1 commit