hluk/CopyQ — pull request #131 by rygwdn (2013-12-08 22:50:15+00:00)
Title: Add support for OS X

Add support for OS X (#26). This merge:
- Cleans up build on OS X 10.9 with qmake 5.2rc1.
- Adds build target to generate a self-contained copyq.app (with Qt, plugins, etc.)
- Fixes qxt global shortcuts for OS X and Qt 5.2
- Adds an OS X native timer class (backed by `NSTimer`) which allows for setting
"tolerance" (e.g. trigger on average every 250ms with a tolerance of 500ms)
to minimize CPU wakeups and battery usage.
- Uses the timer to check for changes to the global "pasteboard" (OS X doesn't
trigger any events when the pasteboard changes).
- Change `RemoteProcess` to start up asynchronously, as Qt on OS X won't properly
switch sockets between sync and async mode.
- Disable hiding menu bar on OSX (this breaks the UI)
- Ensure that the main window is always open when another window is open (otherwise
the menubar is broken)
- Show and hide the CopyQ icon in the dock depending on whether or not there are
any windows open.
- Ensure that there is always an active "activity" so that CopyQ gets system
resources on OS X 10.9.
- Add a new `QMacPasteboardMime` subclass which doesn't throw away *any* clipboard
data.
- Implemented `macplatform.h`

Remaining work:
- [ ] fix 4 failing tests
- [ ] pull latest changes from master
- [ ] update to 5.2 final, and make note about that being the only supported version on OS X
- [ ] add docs on how to package app (`make copyq.app`) to the readme and hacking files
`~/Qt5.2.0/5.2.0-rc1/clang_64/bin/qmake CONFIG+=release && make copyq.app`
- [ ] fully test build on cmake
- [ ] b&w themed icon?
- \[ ] [sign][] the bundle (?)
- [ ] test all features and plugins
- [ ] set up Travis CI for OS X testing
- [ ] Find a way to get the current window title instead of the application title

[sign]: https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2