Fix build error on iOS with the configure option -qtnamespace
qtbase/src/corelib/kernel/qsharedmemory_p.h:62:33: error: unknown type name 'QString'; did you mean 'XXXX::QString'? int createUnixKeyFile(const QString &fileName); ^~~~~~~ XXXX::QString Change-Id: I455526503f059efc2f496b159b4cb098385dda00 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit d81a9206ac528ad7b5093305d7fe0037053468b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
d12a395f33
commit
41d8dc7c59
@ -56,14 +56,20 @@
|
|||||||
#include <QtCore/qstring.h>
|
#include <QtCore/qstring.h>
|
||||||
|
|
||||||
#ifdef QT_NO_SHAREDMEMORY
|
#ifdef QT_NO_SHAREDMEMORY
|
||||||
# ifndef QT_NO_SYSTEMSEMAPHORE
|
# ifndef QT_NO_SYSTEMSEMAPHORE
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
namespace QSharedMemoryPrivate
|
namespace QSharedMemoryPrivate
|
||||||
{
|
{
|
||||||
int createUnixKeyFile(const QString &fileName);
|
int createUnixKeyFile(const QString &fileName);
|
||||||
QString makePlatformSafeKey(const QString &key,
|
QString makePlatformSafeKey(const QString &key,
|
||||||
const QString &prefix = QLatin1String("qipc_sharedmemory_"));
|
const QString &prefix = QLatin1String("qipc_sharedmemory_"));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include "qsystemsemaphore.h"
|
#include "qsystemsemaphore.h"
|
||||||
|
@ -109,7 +109,7 @@ key_t QSharedMemoryPrivate::handle()
|
|||||||
0 already existed
|
0 already existed
|
||||||
1 created
|
1 created
|
||||||
*/
|
*/
|
||||||
int QSharedMemoryPrivate::createUnixKeyFile(const QString &fileName)
|
int QT_PREPEND_NAMESPACE(QSharedMemoryPrivate)::createUnixKeyFile(const QString &fileName)
|
||||||
{
|
{
|
||||||
int fd = qt_safe_open(QFile::encodeName(fileName).constData(),
|
int fd = qt_safe_open(QFile::encodeName(fileName).constData(),
|
||||||
O_EXCL | O_CREAT | O_RDWR, 0640);
|
O_EXCL | O_CREAT | O_RDWR, 0640);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user