1. 03 Jun, 2015 1 commit
  2. 02 Jun, 2015 2 commits
  3. 01 Jun, 2015 1 commit
  4. 22 May, 2015 2 commits
  5. 20 May, 2015 1 commit
  6. 13 May, 2015 1 commit
  7. 22 Apr, 2015 1 commit
  8. 20 Apr, 2015 1 commit
  9. 27 Feb, 2015 1 commit
  10. 26 Feb, 2015 1 commit
  11. 25 Feb, 2015 2 commits
  12. 20 Feb, 2015 1 commit
  13. 17 Feb, 2015 2 commits
    • Nikolai Kosjar's avatar
      CppTools: Add basic completion support for qt5 style signals/slots · 9fb5b0be
      Nikolai Kosjar authored
      Trigger completion for Qt5 signals/slots as soon as the user types '&'
      in
      
          connect(object, &
          connect(object, &Foo:signal, object2, &
      
      Change-Id: I338a26415196959e3dc413bdfd023314812f3aaa
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
      9fb5b0be
    • Adam Strzelecki's avatar
      C++: Basic support for C++11 user-defined literals · 42581129
      Adam Strzelecki authored
      1. Extends lexer so digit or string can be followed by underscore '_' and
         alphanumeric defining literal.
      
      2. Extends parser so it accepts operator"" _abc(...) user-defined literal
         definition.
      
      3. Adds Token::Flags.userDefinedLiteral bool flag field representing if token
         carries user-defined literal.
      
      4. Adds C++11 auto tests case with: 12_km, 0.5_Pa, 'c'_X, "abd"_L, u"xyz"_M
      
      5. All optional suffix scanning methods now return boolean if the suffix was
         found.
      
      6. Adds C++ Lexer tests for user-defined literals with C++11 feature enabled.
      
      This change however does not make QtCreator understand user-defined literal
      semantics, e.g. properly resolve type when applying custom literal operator.
      
      Change-Id: I30e62f025ec9fb11c39261985ea4d772b1a80949
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      42581129
  14. 12 Feb, 2015 2 commits
    • Nikolai Kosjar's avatar
      C++: Cache parsing of template ids · 921ec6da
      Nikolai Kosjar authored
      ...in order to stop memory intensive parsing for invalid code.
      
      Parsing the test data/snippet "hard" led to a memory consumption of
      about 5.5MB and this could easily get up to hundreds/gigabytes by adding
      some more "if_<bool_<true>,\n" lines. With the caching, we are at about
      1.0MB, even if more lines are added.
      
      The "memory consumption" was measured with valgrind-massif. The stated
      numbers are the reported peaks.
      
      Task-number: QTCREATORBUG-12890
      Change-Id: Ie7eb00cfc7915552d29bb27410a6b13a486f486e
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
      921ec6da
    • Nikolai Kosjar's avatar
      C++: Remove workaround for crashing if parsing invalid code · ae3aa07c
      Nikolai Kosjar authored
      This reverts the changes
      
          commit beac7b95
          C++: Fix highlighting after "invalid code"
      
          commit 78ab287f
          C++: Stop parsing a declaration after two tries
      
      which were a work around for QTCREATORBUG-12890.
      
      A follow-up patch provides a proper fix.
      
      Task-number: QTCREATORBUG-12890
      Change-Id: I2650a8e41c8ff1180cad9f069e463fc51bd2f1b1
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
      ae3aa07c
  15. 09 Feb, 2015 2 commits
  16. 04 Feb, 2015 2 commits
    • 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
    • Przemyslaw Gorszkowski's avatar
      C++: fix auto declaration in if condition · 955e28f9
      Przemyslaw Gorszkowski authored
      Fix for auto completion in case of auto declaration inside if condition:
      
      struct Foo { int bar; };
      void func()
      {
          if (auto s = new Foo)
              s->; // auto completion does not work
      }
      
      Task-number: QTCREATORBUG-13805
      Change-Id: Ia1776e8cc04e6040a6bf5f43cf82cfd6ce6dde7a
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
      955e28f9
  17. 21 Jan, 2015 1 commit
  18. 16 Jan, 2015 1 commit
  19. 14 Jan, 2015 5 commits
  20. 07 Jan, 2015 1 commit
  21. 18 Dec, 2014 1 commit
  22. 05 Dec, 2014 1 commit
  23. 19 Nov, 2014 2 commits
  24. 18 Nov, 2014 1 commit
    • Nikolai Kosjar's avatar
      C++: Stop parsing a declaration after two tries · 78ab287f
      Nikolai Kosjar authored
      If we fail to parse a declaration, we rewind, eat the token and look for the
      next token that might be a good candidate for a declaration start (e.g. an
      identifier). This becomes cpu and memory expensive with super long and invalid
      expressions like
      
          typedef b::m::if_< b::m::bool_<
      	(sizeof(fun((Dummy *) 0, (ThisT *) 0, (b::m::int_<70> *) 0)) ==
      	 sizeof(defined_)) >, b::m::if_< b::m::bool_<
      	(sizeof(fun((Dummy *) 0, (ThisT *) 0, (b::m::int_<71> *) 0)) ==
      	 sizeof(defined_)) >, b::m::if_< b::m::bool_<
      	(sizeof(fun((Dummy *) 0, (ThisT *) 0, (b::m::int_<72> *) 0)) ==
      	 sizeof(defined_)) >, b::m::if_< b::m::bool_<
      	(sizeof(fun((Dummy *) 0, (ThisT *) 0, (b::m::int_<73> *) 0)) ==
      	 sizeof(defined_)) >, b::m::if_< b::m::bool_<
      	(sizeof(fun((Dummy *) 0, (ThisT *) 0, (b::m::int_<74> *) 0)) ==
      	 sizeof(defined_)) >, b::m::if_< b::m::bool_<
      	(sizeof(fun((Dummy *) 0, (ThisT *) 0, (b::m::int_<75> *) 0)) ==
      	 sizeof(defined_)) >, b::m::if_< b::m::bool_<
      	// ...some more crazy lines like this
      
      Therefore, stop trying after two failures by looking for the next semicolon or
      closing curly brace.
      
      Task-number: QTCREATORBUG-12890
      Change-Id: I6637daeb840dd549d669080775228fa91fc932eb
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@theqtcompany.com>
      78ab287f
  25. 13 Nov, 2014 1 commit
  26. 04 Nov, 2014 1 commit
  27. 21 Oct, 2014 1 commit
  28. 15 Oct, 2014 1 commit
    • Nikolai Kosjar's avatar
      C++: Fix parsing of "Foo *foo = new Foo()" · 390b4f0e
      Nikolai Kosjar authored
      It should be parsed as an DeclarationStatement, but instead it was
      parsed as an ExpressionStatement.
      
      Regression introduced with
      
          commit d3c5fff6.
          C++: Fix expensive parsing of expressions
      
      The introduced ASTCache did not save the correct return value of a
      parse* function. Because of that, the first return in
      Parser::parseExpressionList returned false on the second invocation
      (cache hit), instead of true, which resulted in an ExpressionStatement.
      
      Task-number: QTCREATORBUG-13122
      Change-Id: I8dbd8852b0909edddcd3195b484f4cea92328cc5
      Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
      390b4f0e