Allow to open the device when using the App Sandbox on OSX


When running the App Sandbox, a system has no any temporary directories
which can be shared between applications (or, maybe, it is configurable
option):

* https://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html

In this case QSP::open() can not create a lock file that lead to fails
when opening.

Workaround it is to use the
QStandardPaths::writableLocation(QStandardPaths::TempLocation) for receiving
a temporal directory of application. Where the writableLocation() implicitly
uses the NSTemporaryDirectory function that is the recommended way
(see "The App Sandbox Container Directory") in here:

* https://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW4

This will allow to open the serial port, but the locking feature will not
work properly.

Task-number: QTBUG-45338
Change-Id: Iea52aada11493126b0f58c40488c38c86f69fca5
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
commitad56086040e6b40565214380b083ecf986924f92
parentda396bc54b776da682ffdcd2aa61f504d607bc12
authorDenis Shienkov <denis.shienkov@gmail.com>
committerDenis Shienkov <denis.shienkov@gmail.com>
commit timeTue, 12 May 2015 13:08:48 +0000