Skip to content
Snippets Groups Projects
  1. Mar 10, 2013
  2. Mar 01, 2013
  3. Feb 28, 2013
  4. Feb 26, 2013
  5. Feb 20, 2013
  6. Feb 18, 2013
  7. Feb 14, 2013
  8. Feb 13, 2013
  9. Feb 12, 2013
  10. Feb 11, 2013
  11. Feb 09, 2013
  12. Feb 05, 2013
  13. Jan 29, 2013
  14. Jan 24, 2013
  15. Jan 23, 2013
  16. Jan 21, 2013
  17. Jan 17, 2013
  18. Jan 11, 2013
  19. Jan 10, 2013
  20. Jan 09, 2013
  21. Jan 08, 2013
    • Orgad Shaneh's avatar
      Git: Force showing untracked files if needed · 7bd95a4f
      Orgad Shaneh authored
      
      Might be disabled by configuration. Override it.
      
      Change-Id: I262c5c34a840811b635b460c7759f4cfbe93ded6
      Reviewed-by: default avatarThorbjørn Lindeijer <bjorn@lindeijer.nl>
      Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
      7bd95a4f
    • 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
Loading