Skip to content
Snippets Groups Projects
  1. Jan 08, 2013
    • 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. Dec 14, 2012
  3. Nov 22, 2012
  4. Oct 24, 2012
  5. Oct 17, 2012
  6. Oct 15, 2012
  7. Oct 05, 2012
  8. Sep 13, 2012
  9. Jul 19, 2012
  10. Jun 06, 2012
  11. Jun 05, 2012
  12. May 22, 2012
  13. May 11, 2012
  14. Apr 04, 2012
  15. Mar 29, 2012
  16. Mar 27, 2012
  17. Mar 16, 2012
  18. Mar 14, 2012
  19. Feb 15, 2012
  20. Feb 09, 2012
  21. Feb 07, 2012
  22. Jan 26, 2012
  23. Jan 24, 2012
  24. Dec 20, 2011
  25. Nov 10, 2011
    • hjk's avatar
      more Id type fixes · 82f55736
      hjk authored
      
      Change-Id: I3720946ba5485696822976567d83b4d6cb1fb283
      
      x
      
      Change-Id: Iab58bc34bc56371405d132315573b484a533b77c
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      82f55736
  26. Nov 03, 2011
  27. Sep 14, 2011
  28. Sep 13, 2011
  29. Sep 06, 2011
  30. May 31, 2011
  31. May 12, 2011
    • Oswald Buddenhagen's avatar
      move the "cannot undo" warning to the search result pane · a14955d0
      Oswald Buddenhagen authored
      this is where it belongs, rather than into some arbitrary editor.
      as a nice side effect, now not only the "rename symbol", but also the
      global search&replace has such a warning.
      a14955d0
    • Oswald Buddenhagen's avatar
      rewrite editor info bar handling · 882e34ee
      Oswald Buddenhagen authored
      the info about the bars is now stored in the IFile, not in the
      EditorView. this is somewhat more expensive for the bars which
      identically apply to all editors of one type, but fixes consistency
      issues between views.
      
      additionally, it is now possible to set several simultaneous
      info bars per file, which ensures that no information is lost.
      
      Co-authored-by: mae
      882e34ee
Loading