summaryrefslogtreecommitdiffstats
path: root/src/corelib/ipc/qsystemsemaphore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/ipc/qsystemsemaphore.cpp')
-rw-r--r--src/corelib/ipc/qsystemsemaphore.cpp29
1 files changed, 7 insertions, 22 deletions
diff --git a/src/corelib/ipc/qsystemsemaphore.cpp b/src/corelib/ipc/qsystemsemaphore.cpp
index fed4f41496..4c24ef6043 100644
--- a/src/corelib/ipc/qsystemsemaphore.cpp
+++ b/src/corelib/ipc/qsystemsemaphore.cpp
@@ -61,29 +61,19 @@ inline void QSystemSemaphorePrivate::destructBackend()
For details on the key types, platform-specific limitations, and
interoperability with older or non-Qt applications, see the \l{Native IPC
- Key} documentation. That includes important information for sandboxed
+ Keys} documentation. That includes important information for sandboxed
applications on Apple platforms, including all apps obtained via the Apple
App Store.
- \sa Inter-Process Communication, QSharedMemory, QSemaphore
+ \sa {Inter-Process Communication}, QSharedMemory, QSemaphore
*/
/*!
- \deprecated
-
- Requests a system semaphore identified by the legacy key \a key. This
- constructor does the same as:
-
- \code
- QSystemSemaphore(QSystemSemaphore::legacyNativeKey(key), initialValue, mode)
- \endcode
-
- except that it stores the legacy native key to retrieve using key().
+ Requests a system semaphore identified by the legacy key \a key.
*/
QSystemSemaphore::QSystemSemaphore(const QString &key, int initialValue, AccessMode mode)
: QSystemSemaphore(legacyNativeKey(key), initialValue, mode)
{
- d->legacyKey = key;
}
/*!
@@ -183,7 +173,7 @@ QSystemSemaphore::~QSystemSemaphore()
This function is useful if the native key was shared from another process.
See \l{Native IPC Keys} for more information.
- \sa QSystemSemaphore(), nativeKey()
+ \sa QSystemSemaphore(), nativeIpcKey()
*/
void QSystemSemaphore::setNativeKey(const QNativeIpcKey &key, int initialValue, AccessMode mode)
{
@@ -208,8 +198,6 @@ void QSystemSemaphore::setNativeKey(const QNativeIpcKey &key, int initialValue,
}
d->initialValue = initialValue;
d->handle(mode);
-
- d->legacyKey.clear();
}
/*!
@@ -228,7 +216,6 @@ QNativeIpcKey QSystemSemaphore::nativeIpcKey() const
}
/*!
- \deprecated
This function works the same as the constructor. It reconstructs
this QSystemSemaphore object. If the new \a key is different from
the old key, calling this function is like calling the destructor of
@@ -241,11 +228,9 @@ QNativeIpcKey QSystemSemaphore::nativeIpcKey() const
void QSystemSemaphore::setKey(const QString &key, int initialValue, AccessMode mode)
{
setNativeKey(legacyNativeKey(key), initialValue, mode);
- d->legacyKey = key;
}
/*!
- \deprecated
Returns the legacy key assigned to this system semaphore. The key is the
name by which the semaphore can be accessed from other processes.
@@ -253,7 +238,7 @@ void QSystemSemaphore::setKey(const QString &key, int initialValue, AccessMode m
*/
QString QSystemSemaphore::key() const
{
- return d->legacyKey;
+ return QNativeIpcKeyPrivate::legacyKey(d->nativeKey);
}
/*!
@@ -402,12 +387,12 @@ bool QSystemSemaphore::isKeyTypeSupported(QNativeIpcKey::Type type)
QNativeIpcKey QSystemSemaphore::platformSafeKey(const QString &key, QNativeIpcKey::Type type)
{
- return { QtIpcCommon::platformSafeKey(key, IpcType::SystemSemaphore, type), type };
+ return QtIpcCommon::platformSafeKey(key, IpcType::SystemSemaphore, type);
}
QNativeIpcKey QSystemSemaphore::legacyNativeKey(const QString &key, QNativeIpcKey::Type type)
{
- return { legacyPlatformSafeKey(key, IpcType::SystemSemaphore, type), type };
+ return QtIpcCommon::legacyPlatformSafeKey(key, IpcType::SystemSemaphore, type);
}
QT_END_NAMESPACE