summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qsharedmemory.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-10-04 19:34:39 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-10-06 14:41:04 +0200
commit3165bb8da20c0eb5f4dbfadd30dc5326e9d164cd (patch)
tree233f5d9603d728cfadb7d7e7f45e034b69befaad /src/corelib/kernel/qsharedmemory.cpp
parent381538991229299c1e62bb0ebf282506b567e322 (diff)
Fix indentation in QSharedMemory docs
Change-Id: I99293a51bf001bbf3bf6a4afeee332a4bcca2a65 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qsharedmemory.cpp')
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp83
1 files changed, 41 insertions, 42 deletions
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index 2a2e2d6bf2..79a5bfe1cb 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -96,59 +96,58 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
\list
- \li Windows: QSharedMemory does not "own" the shared memory segment.
- When all threads or processes that have an instance of QSharedMemory
- attached to a particular shared memory segment have either destroyed
- their instance of QSharedMemory or exited, the Windows kernel
- releases the shared memory segment automatically.
-
- \li Unix: QSharedMemory "owns" the shared memory segment. When the
- last thread or process that has an instance of QSharedMemory
- attached to a particular shared memory segment detaches from the
- segment by destroying its instance of QSharedMemory, the Unix kernel
- release the shared memory segment. But if that last thread or
- process crashes without running the QSharedMemory destructor, the
- shared memory segment survives the crash.
-
- \li HP-UX: Only one attach to a shared memory segment is allowed per
- process. This means that QSharedMemory should not be used across
- multiple threads in the same process in HP-UX.
-
- \li Apple platforms: Sandboxed applications (including apps
- shipped through the Apple App Store) require the use of POSIX
- shared memory (instead of System V shared memory), which adds
- a number of limitations, including:
+ \li Windows: QSharedMemory does not "own" the shared memory segment.
+ When all threads or processes that have an instance of QSharedMemory
+ attached to a particular shared memory segment have either destroyed
+ their instance of QSharedMemory or exited, the Windows kernel
+ releases the shared memory segment automatically.
+
+ \li Unix: QSharedMemory "owns" the shared memory segment. When the
+ last thread or process that has an instance of QSharedMemory
+ attached to a particular shared memory segment detaches from the
+ segment by destroying its instance of QSharedMemory, the Unix kernel
+ release the shared memory segment. But if that last thread or
+ process crashes without running the QSharedMemory destructor, the
+ shared memory segment survives the crash.
+
+ \li HP-UX: Only one attach to a shared memory segment is allowed per
+ process. This means that QSharedMemory should not be used across
+ multiple threads in the same process in HP-UX.
+
+ \li Apple platforms: Sandboxed applications (including apps
+ shipped through the Apple App Store) require the use of POSIX
+ shared memory (instead of System V shared memory), which adds
+ a number of limitations, including:
\list
- \li The key must be in the form \c {<application group identifier>/<custom identifier>},
- as documented \l {https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW24}
- {here} and \l {https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups}
- {here}.
+ \li The key must be in the form \c {<application group identifier>/<custom identifier>},
+ as documented \l {https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW24}
+ {here} and \l {https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups}
+ {here}.
- \li The key length is limited to 30 characters.
+ \li The key length is limited to 30 characters.
- \li On process exit, the named shared memory entries are not
- cleaned up, so restarting the application and re-creating the
- shared memory under the same name will fail. To work around this,
- fall back to attaching to the existing shared memory entry:
+ \li On process exit, the named shared memory entries are not
+ cleaned up, so restarting the application and re-creating the
+ shared memory under the same name will fail. To work around this,
+ fall back to attaching to the existing shared memory entry:
- \code
+ \code
- QSharedMemory shm("DEVTEAMID.app-group/shared");
- if (!shm.create(42) && shm.error() == QSharedMemory::AlreadyExists)
- shm.attach();
-
- \endcode
+ QSharedMemory shm("DEVTEAMID.app-group/shared");
+ if (!shm.create(42) && shm.error() == QSharedMemory::AlreadyExists)
+ shm.attach();
+ \endcode
\endlist
- Qt for iOS comes with support for POSIX shared memory out of the box.
- With Qt for \macos an additional configure flag must be added when
- building Qt to enable the feature. To enable the feature pass
- \c {-feature-ipc_posix} Note that the pre-built Qt libraries for
- \macos available through the Qt installer do not include this feature.
+ Qt for iOS comes with support for POSIX shared memory out of the box.
+ With Qt for \macos an additional configure flag must be added when
+ building Qt to enable the feature. To enable the feature pass
+ \c {-feature-ipc_posix} Note that the pre-built Qt libraries for
+ \macos available through the Qt installer do not include this feature.
\endlist