1. 15 May, 2013 1 commit
  2. 23 Apr, 2013 3 commits
  3. 17 Apr, 2013 1 commit
  4. 28 Mar, 2013 2 commits
  5. 19 Mar, 2013 1 commit
  6. 13 Mar, 2013 1 commit
  7. 12 Mar, 2013 1 commit
  8. 14 Feb, 2013 1 commit
  9. 13 Feb, 2013 1 commit
  10. 12 Feb, 2013 1 commit
  11. 11 Feb, 2013 4 commits
  12. 08 Feb, 2013 1 commit
  13. 29 Jan, 2013 1 commit
  14. 21 Jan, 2013 2 commits
  15. 18 Jan, 2013 1 commit
  16. 15 Jan, 2013 1 commit
  17. 08 Jan, 2013 1 commit
    • Orgad Shaneh's avatar
      Remove braces for single lines of conditions · 29a93998
      Orgad Shaneh authored
      
      
      #!/usr/bin/env ruby
      
      Dir.glob('**/*.cpp') { |file|
        # skip ast (excluding paste, astpath, and canv'ast'imer)
        next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
        s = File.read(file)
        next if s.include?('qlalr')
        orig = s.dup
        s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
          res = $&
          if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
            res
          else
            res.gsub!('} else', 'else')
            res.gsub!(/\n +} *\n/m, "\n")
            res.gsub(/ *{$/, '')
          end
        }
        s.gsub!(/ *$/, '')
        File.open(file, 'wb').write(s) if s != orig
      }
      
      Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      29a93998
  18. 29 Dec, 2012 1 commit
  19. 27 Nov, 2012 2 commits
  20. 22 Nov, 2012 1 commit
  21. 08 Nov, 2012 1 commit
  22. 06 Nov, 2012 1 commit
  23. 05 Oct, 2012 2 commits
  24. 04 Oct, 2012 2 commits
  25. 01 Oct, 2012 2 commits
  26. 25 Sep, 2012 3 commits
  27. 21 Sep, 2012 1 commit