1. 10 Jan, 2019 1 commit
  2. 24 Oct, 2018 1 commit
  3. 10 Oct, 2018 1 commit
  4. 12 Sep, 2018 1 commit
  5. 18 Aug, 2018 1 commit
  6. 07 Jul, 2018 1 commit
  7. 27 Mar, 2018 1 commit
  8. 25 Jan, 2018 1 commit
    • Francis Herne's avatar
      Fix crash with contexts opened in the baseclass list of a class definition. · ec8c1c43
      Francis Herne authored
      The baseclass list wasn't visited by the DeclarationBuilder, so
       currentContext wasn't set on those nodes. This caused a crash in case
       of child statements opening a new context such as lambda definitions.
      This makes little sense and is unlikely to occur in real code; the bug report
       is from trying to parse a negative example in a test suite.
      BUG: 389326
  9. 06 Dec, 2017 1 commit
  10. 28 Sep, 2017 2 commits
  11. 13 Sep, 2017 1 commit
    • Francis Herne's avatar
      Visit default argument values for lambdas in DeclarationBuilder · 2e761862
      Francis Herne authored
      Due to an omission in a39fefad "Avoid creating duplicate declarations
       for lambda parameters.", these weren't visited.
      This wasn't noticed because no test cared whether a lambda's default
       values were visited in DeclarationBuilder.
      d42f1308 opens the context belonging to lambdas (created in
       DeclarationBuilder), and there happens to be a test where a lambda
       is a default argument value of another lambda.
      Since this inner lambda was
       never visited in DeclarationBuilder, contextForNode() returned null
       leading to a crash.
      Note: visiting annotations is unnecessary, because it's impossible for
       lambda arguments to have them.
      Add another test that would have found this bug earlier.
  12. 12 Sep, 2017 1 commit
    • Francis Herne's avatar
      Open context for lambdas in ContextBuilder · d42f1308
      Francis Herne authored
      AbstractUseBuilder::newUse() relies on currentContext() to be correct,
       so we need to open the contexts here and not only in DeclarationBuilder.
      This caused uses of lambda parameters to be created in the parent
       context, which broke rainbow-highlighting.
  13. 06 Sep, 2017 1 commit
  14. 01 Sep, 2017 4 commits
  15. 31 Aug, 2017 2 commits
  16. 29 Aug, 2017 1 commit
    • Francis Herne's avatar
      Avoid creating duplicate declarations for lambda parameters. · a39fefad
      Francis Herne authored
      Calling AstDefaultVisitor::visitLambda() was wrong in this case; the
       parameters were visited twice, the first time outside the lambda's
      Add a testcase (lambda_argument_outside) for this. The crash test was
       okay before, but failed with an earlier version of this patch that
       didn't visit the body.
  17. 28 Aug, 2017 1 commit
  18. 15 Aug, 2017 1 commit
  19. 07 Aug, 2017 1 commit
  20. 31 Jul, 2017 1 commit
  21. 27 Jul, 2017 1 commit
    • Francis Herne's avatar
      Rewrite declarationForName() · 1a7d3c13
      Francis Herne authored
      This causes the correct declaration to be found in some unusual cases
       that previously failed.
      Only names declared before a function definition, or at module scope,
       were found in its body. Names may be declared later (but before the
       function is called); these were not found.
      BUG: 378083
      FIXED-IN: 5.2.0
      Class attributes from any enclosing class definition were found in
       default arguments, not only those from a method's parent class.
      Class or instance attributes were, correctly, not directly visible
       inside a method body (only with `self.` or similar), but hid
       declarations of the same name in outer contexts that should be found.
  22. 20 May, 2017 1 commit
    • Nicolás Alvarez's avatar
      Infer correct type from 'and' / 'or' expressions · f046a4fe
      Nicolás Alvarez authored
      kdev-python was assuming boolean operator expressions like 'foo or bar'
      always returned 'bool', but Python defines them to always return the value
      of either variable depending on whether the first one is false-like. Thus,
      'someString or "bar"' should be interpreted as a string, not a boolean.
      This commit makes such boolean operator expressions have a type of
      unsure(type(foo), type(bar)) instead. I also added new tests for this new
      behavior, and to ensure the good old "True or False" is still interpreted
      as a bool.
      Differential Revision: https://phabricator.kde.org/D5915
  23. 12 May, 2017 1 commit
    • Friedrich W. H. Kossebau's avatar
      Default to disabled debug log on Q_LOGGING_CATEGORY calls · 6cd5cbfc
      Friedrich W. H. Kossebau authored
      This removes the need to call QLoggingCategory::setFilterRules()
      in the program code to default to disabled debug type log
      without any other settings.
      The latter has disadvantages, as it shadows any settings done
      in qtlogging.ini config files by the user
      (e.g. via kdebugsettings), thus enabling runtime control only
      via QT_LOGGING_CONF/QT_LOGGING_RULES, which is not that
      comfortable with lots of categories.
      Also use ECMQtDeclareLoggingCategory for less manual code
  24. 17 Apr, 2017 2 commits
  25. 15 Apr, 2017 1 commit
  26. 14 Apr, 2017 1 commit
    • Francis Herne's avatar
      Get correct type when slicing tuple with constant parameters. · e63779e1
      Francis Herne authored
      Previously, slicing a tuple got the original type, which was only rarely
       the correct result type.
      With this patch, we get the correct type when all three parameters are
       either integer literals or left empty. Otherwise we get an empty tuple.
      A tuple with unsure content-type and unknown indices would be better,
       but can't be represented currently.
      Fixes one existing test, adds several new ones. No test regressions.
      Differential Revision: https://phabricator.kde.org/D5442
  27. 08 Apr, 2017 1 commit
  28. 19 Mar, 2017 1 commit
  29. 10 Mar, 2017 2 commits
    • Francis Herne's avatar
      Create NoneType type. · e2f5706a
      Francis Herne authored
      All this boilerplate just to override toString()...
      Display 'None' rather than 'void'. Strictly it would be 'NoneType',
       but in real life everyone says 'int or None'.
       (PEP-484 agrees: "When used in a type hint, the expression None is
        considered equivalent to type(None).")
    • Francis Herne's avatar
      Remove another spammy debugprint. · d3877df6
      Francis Herne authored
      This gets shown a lot if the attribute-holder is a module, or has an
       unsure/mixed type.
  30. 07 Mar, 2017 2 commits
  31. 05 Mar, 2017 2 commits