1. 19 Jan, 2016 1 commit
  2. 04 Feb, 2015 1 commit
    • 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
  3. 16 Jan, 2015 1 commit
  4. 09 Oct, 2014 1 commit
  5. 24 Jul, 2014 1 commit
  6. 16 Jun, 2014 1 commit
  7. 04 Jun, 2014 1 commit
  8. 02 Jun, 2014 1 commit
  9. 30 May, 2014 1 commit
  10. 28 May, 2014 1 commit
  11. 27 May, 2014 1 commit
  12. 21 May, 2014 1 commit
  13. 31 Mar, 2014 1 commit
  14. 08 Jan, 2014 1 commit
  15. 14 Nov, 2013 1 commit
  16. 13 Sep, 2013 1 commit
  17. 30 Aug, 2013 1 commit
  18. 26 Aug, 2013 1 commit
  19. 18 Jun, 2013 1 commit
  20. 15 May, 2013 1 commit
  21. 10 Apr, 2013 1 commit
  22. 03 Apr, 2013 1 commit
  23. 07 Mar, 2013 1 commit
  24. 29 Jan, 2013 1 commit
  25. 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
  26. 26 Nov, 2012 1 commit
  27. 05 Oct, 2012 1 commit
  28. 19 Jul, 2012 1 commit
  29. 26 Jan, 2012 1 commit
  30. 02 Dec, 2011 1 commit
  31. 03 Nov, 2011 1 commit
  32. 06 May, 2011 1 commit
  33. 13 Apr, 2011 1 commit
  34. 12 Jan, 2011 2 commits
  35. 17 Dec, 2010 1 commit
  36. 08 Sep, 2010 1 commit
  37. 07 Sep, 2010 1 commit
  38. 06 Sep, 2010 1 commit
  39. 26 Aug, 2010 1 commit