Skip to content
Snippets Groups Projects
  1. Apr 11, 2013
  2. Apr 03, 2013
  3. Apr 02, 2013
  4. Mar 27, 2013
  5. Mar 13, 2013
  6. Feb 22, 2013
  7. Jan 29, 2013
  8. Jan 16, 2013
  9. 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
  10. Dec 13, 2012
  11. Nov 20, 2012
  12. Oct 05, 2012
  13. Oct 03, 2012
  14. Sep 21, 2012
  15. Sep 20, 2012
    • Christian Kandeler's avatar
      Do not use QAbstractItemModel::reset(). · 938612c3
      Christian Kandeler authored
      
      Change-Id: Ie49bdf576a6d3543aef6df133b27c8827775c935
      Rationale:
          a) It is conceptually cleaner to do the changes to the model
             in between calls to beginResetModel() and endResetModel,
             respectively.
          b) The function is deprecated in Qt 5, for exactly that reason.
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      938612c3
  16. Aug 21, 2012
  17. Aug 17, 2012
  18. Aug 07, 2012
  19. Aug 06, 2012
  20. Jul 30, 2012
  21. Jul 24, 2012
  22. Jul 19, 2012
  23. Jul 18, 2012
  24. Jul 12, 2012
  25. Jul 09, 2012
  26. Jun 19, 2012
  27. May 25, 2012
  28. May 16, 2012
  29. May 11, 2012
  30. May 08, 2012
Loading