5#include <QtCore/qvarlengtharray.h>
6#include <QtCore/qendian.h>
7#include <QtCore/qlist.h>
18 REGSAM permissions, REGSAM
access)
20 if (RegOpenKeyExW(parentHandle,
reinterpret_cast<const wchar_t *
>(subKey.
utf16()),
21 0, permissions |
access, &m_key) != ERROR_SUCCESS) {
48 const auto subKeyC = subKey.
isEmpty() ?
nullptr :
reinterpret_cast<const wchar_t *
>(subKey.
utf16());
51 DWORD dataType = REG_NONE;
53 LONG
ret = RegQueryValueExW(m_key, subKeyC,
nullptr, &dataType,
nullptr, &
dataSize);
54 if (
ret != ERROR_SUCCESS)
58 if (dataType == REG_SZ || dataType == REG_EXPAND_SZ)
60 else if (dataType == REG_MULTI_SZ)
67 ret = RegQueryValueExW(m_key, subKeyC,
nullptr,
nullptr,
data.data(), &
dataSize);
68 if (
ret != ERROR_SUCCESS)
76 reinterpret_cast<const wchar_t *
>(
data.constData()));
87 reinterpret_cast<const wchar_t *
>(
data.constData()) +
i);
102 reinterpret_cast<const wchar_t *
>(
data.constData()),
data.size() / 2);
108 return qFromLittleEndian<quint32>(
data.constData());
110 case REG_DWORD_BIG_ENDIAN:
111 return qFromBigEndian<quint32>(
data.constData());
114 return qFromLittleEndian<quint64>(
data.constData());
void append(parameter_type t)
constexpr const storage_type * utf16() const noexcept
constexpr bool isEmpty() const noexcept
Returns whether this string view is empty - that is, whether {size() == 0}.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString fromWCharArray(const wchar_t *string, qsizetype size=-1)
qsizetype length() const
Returns the number of characters in this string.
QString stringValue(QStringView subKey) const
QPair< DWORD, bool > dwordValue(QStringView subKey) const
QVariant value(QStringView subKey) const
Combined button and popup list for selecting options.
std::pair< T1, T2 > QPair
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))