From d9030bb9da8d7b472f86513e8695c442a43f19e7 Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Mon, 23 Oct 2017 19:02:43 +0300 Subject: Allow more paths for lookup of lock-file directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It makes sense to use the QStandardPaths::writableLocation(QStandardPaths::TempLocation) directory for any of Unix-like platforms, as a 'last resort' to store the lock-files, if no other preferable directory was found. Change-Id: Ifd1a5789c014388509b29837171d3fdc440d63e6 Reviewed-by: André Hartmann Reviewed-by: Alex Blasche --- src/serialport/qserialport_unix.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp index 4f5203e..5d35446 100644 --- a/src/serialport/qserialport_unix.cpp +++ b/src/serialport/qserialport_unix.cpp @@ -98,10 +98,7 @@ struct termios2 { #include #include #include - -#ifdef Q_OS_OSX #include -#endif QT_BEGIN_NAMESPACE @@ -118,12 +115,8 @@ QString serialPortLockFilePath(const QString &portName) << QStringLiteral("/run/lock") #ifdef Q_OS_ANDROID << QStringLiteral("/data/local/tmp") -#elif defined(Q_OS_OSX) - // This is the workaround to specify a temporary directory - // on OSX when running the App Sandbox feature. - << QStandardPaths::writableLocation(QStandardPaths::TempLocation); #endif - ; + << QStandardPaths::writableLocation(QStandardPaths::TempLocation); QString fileName = portName; fileName.replace(QLatin1Char('/'), QLatin1Char('_')); -- cgit v1.2.1