4#ifndef QSYSTEMSEMAPHORE_H
5#define QSYSTEMSEMAPHORE_H
7#include <QtCore/qcoreapplication.h>
8#include <QtCore/qtipccommon.h>
9#include <QtCore/qstring.h>
10#include <QtCore/qscopedpointer.h>
14#if QT_CONFIG(systemsemaphore)
16class QSystemSemaphorePrivate;
18class Q_CORE_EXPORT QSystemSemaphore
30 enum SystemSemaphoreError
41 QSystemSemaphore(
const QNativeIpcKey &
key,
int initialValue = 0, AccessMode = Open);
44 void setNativeKey(
const QNativeIpcKey &
key,
int initialValue = 0, AccessMode = Open);
45 void setNativeKey(
const QString &
key,
int initialValue = 0, AccessMode
mode = Open,
46 QNativeIpcKey::Type
type = QNativeIpcKey::legacyDefaultTypeForOs())
47 { setNativeKey({
key,
type }, initialValue,
mode); }
48 QNativeIpcKey nativeIpcKey()
const;
50#if QT_DEPRECATED_SINCE(6, 10)
52 QSystemSemaphore(const
QString &
key,
int initialValue = 0, AccessMode
mode = Open);
62 SystemSemaphoreError
error()
const;
66 static QNativeIpcKey platformSafeKey(
const QString &
key,
67 QNativeIpcKey::Type
type = QNativeIpcKey::DefaultTypeForOs);
68 static QNativeIpcKey legacyNativeKey(
const QString &
key,
69 QNativeIpcKey::Type
type = QNativeIpcKey::legacyDefaultTypeForOs());
72 Q_DISABLE_COPY(QSystemSemaphore)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_DECL_CONST_FUNCTION
#define Q_DECLARE_TR_FUNCTIONS(context)
DBusConnection const char DBusError * error
#define QT_DEPRECATED_VERSION_X_6_10(text)