Skip to content
Snippets Groups Projects
  1. Jan 19, 2016
  2. Feb 04, 2015
    • 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. Jan 16, 2015
  4. Nov 06, 2014
  5. Oct 15, 2014
  6. Oct 09, 2014
  7. Sep 26, 2014
  8. May 23, 2014
  9. May 16, 2014
  10. May 15, 2014
  11. Mar 31, 2014
  12. Mar 25, 2014
  13. Mar 05, 2014
  14. Feb 27, 2014
  15. Feb 04, 2014
  16. Jan 20, 2014
  17. Jan 08, 2014
  18. Oct 15, 2013
  19. Aug 29, 2013
  20. Jul 17, 2013
  21. Jun 03, 2013
  22. Apr 10, 2013
  23. Apr 03, 2013
  24. Jan 29, 2013
  25. 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
  26. Nov 28, 2012
  27. Oct 05, 2012
  28. Sep 19, 2012
  29. Jul 19, 2012
  30. Jun 06, 2012
    • Leandro Melo's avatar
      C++: Introduce unicode char/strings support · 23c637c4
      Leandro Melo authored
      
      Those are the types char16_t and char32_t along with the new
      char/string literals u'', U'', u"", u8"", and U"".
      
      This is particularly important for the use of QStringLiteral
      since in some platforms it relies on expansion such as above.
      
      Note: The string literals quickfixes still need some tunning.
      
      Task-number: QTCREATORBUG-7449
      Change-Id: Iebcfea15677dc8e0ebb6143def89a5477e1be7d4
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      23c637c4
  31. Mar 12, 2012
  32. Feb 15, 2012
  33. Jan 26, 2012
  34. Jan 24, 2012
  35. Dec 08, 2011
  36. Nov 03, 2011
  37. Oct 11, 2011
  38. Sep 21, 2011
Loading