diff options
Diffstat (limited to 'src/corelib/ipc/qsystemsemaphore.cpp')
-rw-r--r-- | src/corelib/ipc/qsystemsemaphore.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/corelib/ipc/qsystemsemaphore.cpp b/src/corelib/ipc/qsystemsemaphore.cpp index 0f59b378a3..4c24ef6043 100644 --- a/src/corelib/ipc/qsystemsemaphore.cpp +++ b/src/corelib/ipc/qsystemsemaphore.cpp @@ -68,25 +68,13 @@ inline void QSystemSemaphorePrivate::destructBackend() \sa {Inter-Process Communication}, QSharedMemory, QSemaphore */ -#if QT_DEPRECATED_SINCE(6, 10) /*! - \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; } -#endif /*! Requests a system semaphore for the specified \a key. The parameters @@ -210,8 +198,6 @@ void QSystemSemaphore::setNativeKey(const QNativeIpcKey &key, int initialValue, } d->initialValue = initialValue; d->handle(mode); - - d->legacyKey.clear(); } /*! @@ -229,9 +215,7 @@ QNativeIpcKey QSystemSemaphore::nativeIpcKey() const return d->nativeKey; } -#if QT_DEPRECATED_SINCE(6, 10) /*! - \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 @@ -244,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. @@ -256,9 +238,8 @@ void QSystemSemaphore::setKey(const QString &key, int initialValue, AccessMode m */ QString QSystemSemaphore::key() const { - return d->legacyKey; + return QNativeIpcKeyPrivate::legacyKey(d->nativeKey); } -#endif /*! Acquires one of the resources guarded by this semaphore, if there is @@ -406,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 |