1. 19 Sep, 2014 1 commit
  2. 24 Jul, 2014 1 commit
    • 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
  3. 15 Jul, 2014 1 commit
  4. 04 Jul, 2014 1 commit
  5. 10 Jun, 2014 2 commits
    • Nikolai Kosjar's avatar
      CppTools: Unexport some internal classes. · 11845cd3
      Nikolai Kosjar authored
      Unexports CppModelManager, CppSourceProcessor and CppToolsPlugin.
      
      Now only some constructor signatures mention "Internal::" in the
      exported symbols:
      
      % nm --extern-only --demangle ./lib/qtcreator/plugins/libCppTools.so | grep "Internal::"
      CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*)
      CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*)
      CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*)
      CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*)
      
      Change-Id: I167c21a6dc03cf02230c95fde66cf404e40df36f
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      11845cd3
    • Nikolai Kosjar's avatar
      Cpp{Editor,Tools}: Move tests for IncludeGroups to CppTools · 9921960a
      Nikolai Kosjar authored
      They belong there. This will also kill the CppSourceProcessor dependency
      from CppEditor.
      
      Change-Id: Ic2ae6b0c6f0913d913636be61df194846985d1ce
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      9921960a
  6. 04 Jun, 2014 1 commit
  7. 03 Jun, 2014 1 commit
  8. 28 May, 2014 1 commit
  9. 10 Mar, 2014 1 commit
  10. 24 Feb, 2014 1 commit
  11. 20 Feb, 2014 1 commit
  12. 21 Jan, 2014 3 commits
  13. 08 Jan, 2014 1 commit
  14. 23 Dec, 2013 1 commit
    • 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
  15. 11 Dec, 2013 1 commit
  16. 22 Nov, 2013 1 commit
  17. 12 Nov, 2013 1 commit
  18. 18 Oct, 2013 1 commit
  19. 17 Oct, 2013 1 commit
    • Przemyslaw Gorszkowski's avatar
      C++: fix endless loop during template instantiation · 5be56c07
      Przemyslaw Gorszkowski authored
      This is the first phase of fixing bug QTCREATORBUG-10320.
      This change resolves typedefs of template parameters(and resolves
      problem with endless loop).
      
      The next step will be matching appropriate template specialization
      (this is needed to solve problem with missing code completion).
      
      Missing matching: template specialization with the same parameters,
      e.g.:
      template <class T1, class T2, class T3>
      class T
      {
      };
      
      template <class T1, class T2>
      class T<T1, T2, T2>
      {
      };
      
      Task-number: QTCREATORBUG-10320
      Change-Id: Icb6b539c021b2a67a66db9011a2e627f7d96526b
      Reviewed-by: default avatarPrzemyslaw Gorszkowski <pgorszkowski@gmail.com>
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      5be56c07
  20. 01 Oct, 2013 3 commits
  21. 13 Sep, 2013 1 commit
  22. 03 Sep, 2013 2 commits
  23. 22 Aug, 2013 1 commit
  24. 20 Aug, 2013 1 commit
  25. 19 Aug, 2013 1 commit
  26. 13 Aug, 2013 1 commit
    • Nikolai Kosjar's avatar
      CppTools: Rework handling of ProjectInfo changes · 8ea14767
      Nikolai Kosjar authored
      (a) The code model manager figures out by itself which files were added
          or removed from the project.
      
          If this was done successfully, check also the timestamp of the
          common files and reindex if necessary.
      
      (b) A full reindexing is only triggered if the project configuration
          changes (defines, includes, framework paths).
      
      (c) If project files were removed, the garbage collector is called.
      
      Task-number: QTCREATORBUG-9730
      Change-Id: Ib855614b070880576233a3525813617c967a72f3
      Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
      8ea14767
  27. 08 Aug, 2013 1 commit
  28. 05 Aug, 2013 1 commit
    • Przemyslaw Gorszkowski's avatar
      C++: fix auto completion for template parameters · bfbf93e6
      Przemyslaw Gorszkowski authored
      Fix auto completion for the case when template parameter should be
      found somewhere of scope of template instantiation declaration.
      Example:
      struct A
      {
          void foo();
          struct B
          {
              int b;
          };
      };
      
      template<typename T>
      struct Template
      {
          T* get() { return 0; }
          T t;
      };
      
      void A::foo()
      {
          Template<B> templ;
          templ.get()->//no autocompletion
          templ.t.//no autocompletion
      }
      
      Task-number: QTCREATORBUG-8852
      Task-number: QTCREATORBUG-9169
      Change-Id: I56b40776e66740f995ae6fc5d69e3c50139a3af2
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      bfbf93e6
  29. 31 Jul, 2013 1 commit
  30. 22 Jul, 2013 2 commits
  31. 17 Jul, 2013 1 commit
  32. 12 Jul, 2013 2 commits