7#include <QtCore/qtipccommon.h>
9# include <QtCore/qobject.h>
11# include <QtCore/qobjectdefs.h>
12# include <QtCore/qscopedpointer.h>
13# include <QtCore/qstring.h>
18#if QT_CONFIG(sharedmemory)
20class QSharedMemoryPrivate;
22class Q_CORE_EXPORT QSharedMemory :
public QObject
25 Q_DECLARE_PRIVATE(QSharedMemory)
35 enum SharedMemoryError
49 QSharedMemory(
QObject *parent =
nullptr);
50 QSharedMemory(
const QNativeIpcKey &
key,
QObject *parent =
nullptr);
57 void setNativeKey(
const QNativeIpcKey &
key);
58 void setNativeKey(
const QString &
key, QNativeIpcKey::Type
type = QNativeIpcKey::legacyDefaultTypeForOs())
59 { setNativeKey({
key,
type }); }
61 QNativeIpcKey nativeIpcKey()
const;
62#if QT_CORE_REMOVED_SINCE(6, 5)
69 bool attach(AccessMode
mode = ReadWrite);
70 bool isAttached()
const;
74 const void* constData()
const;
75 const void *
data()
const;
77#if QT_CONFIG(systemsemaphore)
82 SharedMemoryError
error()
const;
86 static QNativeIpcKey platformSafeKey(
const QString &
key,
87 QNativeIpcKey::Type
type = QNativeIpcKey::DefaultTypeForOs);
88 static QNativeIpcKey legacyNativeKey(
const QString &
key,
89 QNativeIpcKey::Type
type = QNativeIpcKey::legacyDefaultTypeForOs());
92 Q_DISABLE_COPY(QSharedMemory)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_DECL_CONST_FUNCTION
DBusConnection const char DBusError * error
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data