diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2023-03-27 17:57:13 -0600 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-09-22 23:04:45 -0700 |
commit | b40c61c8eb93b4a2c32dac7ed680e1b1ffb34b8e (patch) | |
tree | fe4db91efd3b52f5846ccfb8c8d79e27981d0d49 /src/corelib/ipc/qsharedmemory.cpp | |
parent | 0523b06055119f5ab426e591ade56e153e3f0e57 (diff) |
IPC: make the two platformSafeKey functions return QNativeIpcKey
There's no need to return QString, only to create the QNativeIpcKey
elsewhere, when nothing uses this intermediary QString (those two
functions aren't used in unit tests any more, since the two "IPC: add
native key support" commits (2c286561bbc9e4e408d34e5bf43db8ad9acc0e84
and 3ae052d3bb5d7af0badf32575a5aa042cffd8243). Since they aren't used in
the tests, we can remove the Q_AUTOTEST_EXPORT macro too and the
unnecessary default argument.
I'll need the ability to return QNativeIpcKey to store the original,
legacy key inside of it.
Change-Id: Idd5e1bb52be047d7b4fffffd17506c05e4f61f79
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b5584ed2240abe3892fa5b0a23b3ad093ed9fec2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 608b08f4d57369378b1a101b78a46202bd17c11a)
Diffstat (limited to 'src/corelib/ipc/qsharedmemory.cpp')
-rw-r--r-- | src/corelib/ipc/qsharedmemory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/ipc/qsharedmemory.cpp b/src/corelib/ipc/qsharedmemory.cpp index 139c1440e3..89bd4ffe0c 100644 --- a/src/corelib/ipc/qsharedmemory.cpp +++ b/src/corelib/ipc/qsharedmemory.cpp @@ -686,12 +686,12 @@ bool QSharedMemory::isKeyTypeSupported(QNativeIpcKey::Type type) QNativeIpcKey QSharedMemory::platformSafeKey(const QString &key, QNativeIpcKey::Type type) { - return { QtIpcCommon::platformSafeKey(key, IpcType::SharedMemory, type), type }; + return QtIpcCommon::platformSafeKey(key, IpcType::SharedMemory, type); } QNativeIpcKey QSharedMemory::legacyNativeKey(const QString &key, QNativeIpcKey::Type type) { - return { legacyPlatformSafeKey(key, IpcType::SharedMemory, type), type }; + return QtIpcCommon::legacyPlatformSafeKey(key, IpcType::SharedMemory, type); } #endif // QT_CONFIG(sharedmemory) |