Commit Graph

21 Commits

Author SHA1 Message Date
Allan Odgaard
1e11a30a53 Remove redundant storage keywords for @property
These were required prior to the new 64 bit run-time.
2014-03-05 16:39:54 +07:00
Allan Odgaard
c38a1a64af Add to_s overload for NSError 2014-03-04 10:23:01 +07:00
Allan Odgaard
c2397484b8 Use C++11 for loop
Majority of the edits done using the following ruby script:

    def update_loops(src)
      dst, cnt = '', 0

      block_indent, variable = nil, nil
      src.each_line do |line|
        if block_indent
          if line =~ /^#{block_indent}([{}\t])|^\t*$/
            block_indent = nil if $1 == '}'
            line = line.gsub(%r{ ([^a-z>]) \(\*#{variable}\) | \*#{variable}\b | \b#{variable}(->) }x) do
              $1.to_s + variable + ($2 == "->" ? "." : "")
            end
          else
            block_indent = nil
          end
        elsif line =~ /^(\t*)c?iterate\((\w+), (?!diacritics::make_range)(.*\))$/
          block_indent, variable = $1, $2
          line = "#$1for(auto const& #$2 : #$3\n"
          cnt += 1
        end
        dst << line
      end
      return dst, cnt
    end

    paths.each do |path|
      src = IO.read(path)

      cnt = 1
      while cnt != 0
        src, cnt = update_loops(src)
        STDERR << "#{path}: #{cnt}\n"
      end

      File.open(path, "w") { |io| io << src }
    end
2014-03-03 10:34:13 +07:00
Allan Odgaard
e4e80a946c Use std::make_shared 2013-09-03 12:27:20 +02:00
Allan Odgaard
bf1e92b865 Do not use global constructors for fixtures 2013-08-16 22:40:08 +02:00
Allan Odgaard
97ad8294a6 Initialize shared spell checker during setup
The first time we ask for the shared spell checker it does some setup involving AppKit (creating the shared spelling panel?). While we already ensure that the spell checker is only called from the main queue, it seems this setup code must run on thread 0, which, when we are not in a Cocoa application, is not necessarily the thread used for the main queue.
2013-08-05 18:55:43 +02:00
Allan Odgaard
cd8b554b59 Ensure NSSpellChecker methods are called from main queue
I have been told that the spell checker should be thread safe (except for the spelling panel) but after moving to concurrent execution of the integration tests, several segmentation faults have pointed toward the spell checker not being thread safe.
2013-08-04 22:15:34 +02:00
Allan Odgaard
a8e677db3c Update testing system for ns framework 2013-08-01 19:03:31 +02:00
Allan Odgaard
34c44bd647 Don’t create NSSpellChecker tags until needed 2013-07-26 22:45:36 +02:00
Allan Odgaard
72b587e147 Account for strings with \0 characters
Previously we would truncate such strings.
2013-01-22 19:23:16 +01:00
Allan Odgaard
a65b7640f9 Handle empty string given to glyphs_for_key
Previously it would work, but as it was calling utf8::to_ch with the empty string, this would trigger an assertion (when running a debug build).
2012-12-28 02:47:19 +01:00
Allan Odgaard
71be61cbbb Enable ARC by default
We now explicitly disable it for targets that hasn’t yet been upgraded to ARC. This way, it’s easier to get an overview of which targets hasn’t yet been upgraded and ensures new targets has ARC enabled.
2012-12-19 19:42:36 +01:00
Allan Odgaard
6bc36a565b ARC: Update ns framework 2012-12-19 19:42:35 +01:00
Allan Odgaard
1eb54282af Move attr_string.h to Find framework 2012-12-19 19:42:35 +01:00
Allan Odgaard
983bce86aa Use @autoreleasepool blocks 2012-09-25 12:30:12 +02:00
Allan Odgaard
6afa7601c0 Provide utf16::advance with range end
There are several crashes reported from firstRectForCharacterRange: which indicate that the system may ask for indexes “out of range”, hence why we now effectively just cap such request.
2012-09-21 01:32:41 +02:00
Allan Odgaard
cbe91ff831 Assume compiler support for explicit keyword
Since we require a fairly recent clang for other features, there is no reason to test for this one.
2012-08-29 14:27:35 +02:00
Jacob Bandes-Storch
9584afba16 Use 64-bit: replace SELNAME with sel_getName 2012-08-28 21:32:46 +02:00
Jacob Bandes-Storch
e3aa997b06 Use libc++: replace std::tr1 with std 2012-08-28 13:30:20 +02:00
Allan Odgaard
783514fcff Strip the numeric keypad flag for key events
This means pressing e.g. ⌘/ (using the slash on the numeric keypad) will still work to toggle comments.

It also means that we can no longer bind specifically to the numeric keypad keys, but I don’t think anyone actually does that (given that few have numeric keypads).

The ideal solution would be to first do a literal check and then, if there was no match and the key event had the numeric keypad flag set, do a test with this flag removed, but that would change the simple string compare we presently use plus the easy caching and binary search of finding the item that matches a key event, i.e. it would add complexity to the code with no known argument in favor of this flexibility.
2012-08-19 21:08:05 +02:00
Allan Odgaard
9894969e67 Initial commit 2012-08-09 16:25:56 +02:00