diff options
Diffstat (limited to 'src/corelib/ipc/qsystemsemaphore.cpp')
-rw-r--r-- | src/corelib/ipc/qsystemsemaphore.cpp | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/corelib/ipc/qsystemsemaphore.cpp b/src/corelib/ipc/qsystemsemaphore.cpp index c41ae6dbc2..4c24ef6043 100644 --- a/src/corelib/ipc/qsystemsemaphore.cpp +++ b/src/corelib/ipc/qsystemsemaphore.cpp @@ -69,21 +69,11 @@ inline void QSystemSemaphorePrivate::destructBackend() */ /*! - \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; } /*! @@ -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 |