1. 06 Aug, 2020 1 commit
  2. 01 Aug, 2020 1 commit
  3. 30 Jul, 2020 1 commit
  4. 23 Jul, 2020 2 commits
  5. 17 Jul, 2020 1 commit
  6. 23 Jun, 2020 2 commits
  7. 18 Jun, 2020 2 commits
  8. 17 Jun, 2020 2 commits
  9. 10 Jun, 2020 1 commit
  10. 02 Jun, 2020 4 commits
  11. 24 May, 2020 1 commit
  12. 19 May, 2020 1 commit
  13. 08 May, 2020 6 commits
  14. 06 May, 2020 1 commit
  15. 05 May, 2020 5 commits
  16. 02 May, 2020 9 commits
    • Igor Kushnir's avatar
      af51b25a
    • Igor Kushnir's avatar
    • Igor Kushnir's avatar
      Move a format_sources comment from unsupported position · c3a7739d
      Igor Kushnir authored
      kdev_format_source does not look for comments in the middle of a line.
      It only discards lines that start with '#' (possibly after whitespaces).
      This mistake did not result in a bug under GNU/Linux because the comment
      was passed as a command to Bash, which ignored it:
          bash -c "# (otherwise this breaks unit tests)"
      Let us fix this mistake so as not to mislead users that take KDevelop's
      own format_sources as a syntax example.
      c3a7739d
    • Igor Kushnir's avatar
      kdev_format_source: don't ignore the root directory · 37a8c9c7
      Igor Kushnir authored
      Not looking for format_sources in the root directory looks like an
      unintentional omission.
      37a8c9c7
    • Igor Kushnir's avatar
      09dd4b92
    • Igor Kushnir's avatar
      Work around QDir::match() behavior change in Qt 5.12.0 · f56cdda5
      Igor Kushnir authored
      QDir::match() migrated to QRegularExpression in Qt 5.12.0. In the new
      implementation asterisk in a wildcard no longer matches path separators.
      
      This caused two bugs in KDevelop:
      1. kdev_format_source rejects input files if the 'format_sources' file
        is not located in the same directory as the target file.
      2. Exclude filter in Find/Replace in Files has no effect (unless the
        user specifies almost complete paths in the format supported by Bash
        Filename Expansion with the globstar shell option disabled).
      
      Note that Files (aka `include`) filter in Find/Replace in Files is
      unaffected by the behavior change because in its code a filename rather
      than a path is passed as the second argument to QDir::match().
      
      WildcardHelpers can migrate to
      QRegularExpression::wildcardToRegularExpression() once we require
      Qt 5.12.1 or later. This function was added in Qt 5.12.0 and started
      anchoring wildcard pattern in Qt 5.12.1.
      
      Ideally support for globstar (**) in glob patterns should be added to
      QRegularExpression::wildcardToRegularExpression() and to QDir::match().
      In that case WildcardHelpers could be eliminated and QDir::match() could
      be used again.
      
      If globstar support is not added to
      QRegularExpression::wildcardToRegularExpression(), WildcardHelpers can
      port away from QRegExp, for example, by replacing `starEscape` (see the
      definition of wildcardToRegularExpression()) with ".*" in the value
      returned by wildcardToRegularExpression() and passing
      DotMatchesEverythingOption to QRegularExpression constructor.
      
      When we port away from QRegExp, we can change the syntax of
      format_sources and possibly Exclude filter to match Bash globstar
      syntax or perhaps some other new Qt wildcard syntax. Alternatively, we
      can process user-provided wildcard patterns before and/or after passing
      them to wildcardToRegularExpression() so as to preserve our syntax.
      
      BUG: 409222, 417628
      FIXED-IN: 5.5.1
      f56cdda5
    • Igor Kushnir's avatar
      Add failing kdev_format_source and grepview tests · 80409842
      Igor Kushnir authored
      kdev_format_source's wildcard path matching was not tested thoroughly.
      grepview's include and exclude filters weren't tested at all.
      This is why regressions caused by QDir::match() behavior change have
      slipped in unnoticed by KDevelop developers (but reported by users!).
      80409842
    • Igor Kushnir's avatar
      Handle errors better in KDevFormatFile::executeCommand() · 607b3fe6
      Igor Kushnir authored
      * Don't try to execute an empty command.
      * Make error messages refer to a command-line interpreter rather than
        to the command passed to it. Note that kdev_format_source did not
        detect when a user-specified command failed to start or crashed.
      * Warn when the command-line interpreter exits with a non-zero code.
        A non-zero exit code likely means that the process executed by the
        interpreter failed to start, crashed or reported failure. It can also
        be a nonfatal error report from the user-supplied command. Therefore
        let kdev_format_source report it as a warning, not an error.
      607b3fe6
    • Igor Kushnir's avatar
      grepview: search in hidden files and directories · 66e4f3b3
      Igor Kushnir authored
      The omission of the hidden entries looks like an oversight. Especially
      because a search limited to project files - thread_getProjectFiles() -
      does not skip hidden items.
      66e4f3b3