1. 03 Jun, 2014 1 commit
  2. 28 May, 2014 1 commit
  3. 10 Mar, 2014 1 commit
  4. 24 Feb, 2014 1 commit
  5. 20 Feb, 2014 1 commit
  6. 21 Jan, 2014 3 commits
  7. 08 Jan, 2014 1 commit
  8. 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
  9. 11 Dec, 2013 1 commit
  10. 22 Nov, 2013 1 commit
  11. 12 Nov, 2013 1 commit
  12. 18 Oct, 2013 1 commit
  13. 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
  14. 01 Oct, 2013 3 commits
  15. 13 Sep, 2013 1 commit
  16. 03 Sep, 2013 2 commits
  17. 22 Aug, 2013 1 commit
  18. 20 Aug, 2013 1 commit
  19. 19 Aug, 2013 1 commit
  20. 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
  21. 08 Aug, 2013 1 commit
  22. 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
  23. 31 Jul, 2013 1 commit
  24. 22 Jul, 2013 2 commits
  25. 17 Jul, 2013 1 commit
  26. 12 Jul, 2013 2 commits
  27. 02 Jul, 2013 1 commit
  28. 28 Jun, 2013 1 commit
  29. 25 Jun, 2013 2 commits
  30. 18 Jun, 2013 1 commit
    • Przemyslaw Gorszkowski's avatar
      C++: add support for local types · 68d6a762
      Przemyslaw Gorszkowski authored
      This change addes support for class, enum definition inside blocks({}) or
      functions, e.g.:
      void f()
      {
      	struct S
      	{
      		int bar;
      	};
      	S s;
      	s.bar;
      }
      
      It fixes:
      * code completion
      * highlighting
      * follow symbol
      * marking
      * find usages
      
      It fixes also problem with namespace aliases inside blocks or functions.
      
      This change can have also impact on performance(there are additional processing)
      
      Task-number: QTCREATORBUG-166 (namespace aliases inside function/block)
      Task-number: QTCREATORBUG-3620
      Task-number: QTCREATORBUG-6013
      Task-number: QTCREATORBUG-8020
      Change-Id: Iaea6c6dfe276f1d7b2279b50bdd2e68e375d31eb
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      68d6a762
  31. 12 Jun, 2013 1 commit
  32. 11 Jun, 2013 1 commit