Skip to content
Snippets Groups Projects
  1. 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
  2. Jan 07, 2013
  3. Dec 30, 2012
  4. Dec 29, 2012
  5. Dec 23, 2012
  6. Dec 17, 2012
  7. Dec 12, 2012
  8. Dec 11, 2012
  9. Nov 30, 2012
  10. Nov 28, 2012
  11. Nov 20, 2012
  12. Nov 16, 2012
Loading