41 #include "qplatformdefs.h"
50 #include "private/qlocking_p.h"
51 #include "private/qtools_p.h"
58 #ifndef QT_NO_GEOM_VARIANT
66 #ifndef QT_BOOTSTRAPPED
83 #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID)
84 #define Q_XDG_PLATFORM
87 #if !defined(QT_NO_STANDARDPATHS) && (defined(Q_XDG_PLATFORM) || defined(QT_PLATFORM_UIKIT))
88 #define QSETTINGS_USE_QSTANDARDPATHS
122 bool userDefined =
false;
140 usedHashFunc()->insert(
name,
this);
146 usedHashFunc()->remove(
name);
165 #ifndef QT_NO_TEMPORARYFILE
170 #ifndef QT_NO_TEMPORARYFILE
175 if (!
dir.mkpath(
dir.absolutePath()))
196 if (!(confFile = usedHash->
value(absPath))) {
197 if ((confFile = unusedCache->
take(absPath)))
198 usedHash->
insert(absPath, confFile);
204 return new QConfFile(absPath, _userPerms);
210 unusedCacheFunc()->clear();
224 :
format(
format), scope(scope), organizationName(organization), applicationName(application),
236 Q_ASSERT_X(!
n.isEmpty(),
"QSettings",
"empty key");
278 #if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) && !defined(Q_OS_WASM)
286 #if !defined(Q_OS_WIN)
297 if (slashPos == -1) {
303 key.truncate(slashPos);
338 #ifndef QT_NO_QOBJECT
352 for (;
it !=
l.constEnd(); ++
it)
360 for (
int i = 0;
i < outStringList.count(); ++
i) {
365 outStringList[
i].remove(0, 1);
368 const int stringCount =
l.count();
369 variantList.
reserve(stringCount);
370 for (
int j = 0;
j < stringCount; ++
j)
376 return outStringList;
383 switch (
v.metaType().id()) {
396 #if QT_CONFIG(shortcut)
397 case QMetaType::QKeySequence:
400 case QMetaType::LongLong:
401 case QMetaType::ULongLong:
414 #ifndef QT_NO_GEOM_VARIANT
415 case QMetaType::QRect: {
416 QRect r = qvariant_cast<QRect>(
v);
420 case QMetaType::QSize: {
421 QSize s = qvariant_cast<QSize>(
v);
425 case QMetaType::QPoint: {
426 QPoint p = qvariant_cast<QPoint>(
v);
433 #ifndef QT_NO_DATASTREAM
435 const char *typeSpec;
436 if (
v.userType() == QMetaType::QDateTime) {
438 typeSpec =
"@DateTime(";
441 typeSpec =
"@Variant(";
454 Q_ASSERT(!
"QSettings: Cannot save custom types without QDataStream support");
474 #ifndef QT_NO_DATASTREAM
491 Q_ASSERT(!
"QSettings: Cannot load custom types without QDataStream support");
493 #ifndef QT_NO_GEOM_VARIANT
496 if (
args.size() == 4)
500 if (
args.size() == 2)
504 if (
args.size() == 2)
522 for (
int i = 0;
i <
key.size(); ++
i) {
527 }
else if ((
ch >=
'a' &&
ch <=
'z') || (
ch >=
'A' &&
ch <=
'Z') || (
ch >=
'0' &&
ch <=
'9')
528 ||
ch ==
'_' ||
ch ==
'-' ||
ch ==
'.') {
530 }
else if (
ch <= 0xFF) {
537 for (
int i = 0;
i < 4; ++
i) {
548 bool lowercaseOnly =
true;
560 if (
ch !=
'%' ||
i == to - 1) {
561 if (
uint(
ch -
'A') <=
'Z' -
'A')
562 lowercaseOnly =
false;
569 int firstDigitPos =
i + 1;
577 if (firstDigitPos + numDigits > to) {
585 ch =
key.mid(firstDigitPos, numDigits).toUShort(&
ok, 16);
595 lowercaseOnly =
false;
597 i = firstDigitPos + numDigits;
599 return lowercaseOnly;
604 bool needsQuotes =
false;
605 bool escapeNextIfDigit =
false;
611 int startPos =
result.size();
619 if (
ch ==
';' ||
ch ==
',' ||
ch ==
'=')
622 if (escapeNextIfDigit
623 && ((
ch >=
'0' &&
ch <=
'9')
624 || (
ch >=
'a' &&
ch <=
'f')
625 || (
ch >=
'A' &&
ch <=
'F'))) {
630 escapeNextIfDigit =
false;
635 escapeNextIfDigit =
true;
664 if (
ch <= 0x1F || (
ch >= 0x7F && !useCodec)) {
666 escapeNextIfDigit =
true;
667 }
else if (useCodec) {
677 || (startPos <
result.size() && (
result.at(startPos) ==
' '
679 result.insert(startPos,
'"');
694 if (strs.isEmpty()) {
705 for (
int i = 0;
i < strs.size(); ++
i) {
716 static const char escapeCodes[][2] =
731 bool isStringList =
false;
732 bool inQuotedString =
false;
733 bool currentValueIsQuoted =
false;
734 char16_t escapeVal = 0;
740 while (
i < to && ((
ch =
str.
at(
i)) ==
' ' ||
ch ==
'\t'))
745 int chopLimit = stringResult.
length();
754 for (
const auto &escapeCode : escapeCodes) {
755 if (
ch == escapeCode[0]) {
768 if ((
ch >=
'0' &&
ch <=
'9') || (
ch >=
'A' &&
ch <=
'F') || (
ch >=
'a' &&
ch <=
'f'))
770 }
else if (
ch >=
'0' &&
ch <=
'7') {
771 escapeVal =
ch -
'0';
773 }
else if (
ch ==
'\n' ||
ch ==
'\r') {
777 if ((ch2 ==
'\n' || ch2 ==
'\r') && ch2 !=
ch)
783 chopLimit = stringResult.
length();
787 currentValueIsQuoted =
true;
788 inQuotedString = !inQuotedString;
793 if (!inQuotedString) {
794 if (!currentValueIsQuoted)
795 iniChopTrailingSpaces(stringResult, chopLimit);
798 stringListResult.clear();
801 stringListResult.append(stringResult);
802 stringResult.
clear();
803 currentValueIsQuoted =
false;
812 if (
ch ==
'\\' ||
ch ==
'"' ||
ch ==
',')
822 if (!currentValueIsQuoted)
823 iniChopTrailingSpaces(stringResult, chopLimit);
828 stringResult += escapeVal;
835 if ((
ch >=
'0' &&
ch <=
'9') || (
ch >=
'A' &&
ch <=
'F')) {
841 stringResult += escapeVal;
847 stringResult += escapeVal;
852 if (
ch >=
'0' &&
ch <=
'7') {
854 escapeVal +=
ch -
'0';
858 stringResult += escapeVal;
864 stringListResult.append(stringResult);
897 void QConfFileSettingsPrivate::initFormat()
902 #if defined(Q_OS_MAC)
905 caseSensitivity = IniCaseSensitivity;
913 if (
i >= 0 && i < customFormatVector->
size()) {
915 extension =
info.extension;
916 readFunc =
info.readFunc;
917 writeFunc =
info.writeFunc;
918 caseSensitivity =
info.caseSensitivity;
923 void QConfFileSettingsPrivate::initAccess()
935 #if defined(Q_OS_WIN)
936 static QString windowsConfigPath(
const KNOWNFOLDERID &
type)
940 PWSTR
path =
nullptr;
941 if (SHGetKnownFolderPath(
type, KF_FLAG_DONT_VERIFY,
NULL, &
path) == S_OK) {
947 if (
type == FOLDERID_ProgramData) {
949 }
else if (
type == FOLDERID_RoamingAppData) {
964 static QString make_user_path()
967 #ifndef QSETTINGS_USE_QSTANDARDPATHS
987 static std::unique_lock<QBasicMutex> initDefaultPaths(std::unique_lock<QBasicMutex> locker)
989 PathHash *pathHash = pathHashFunc();
1009 const QString roamingAppDataFolder = windowsConfigPath(FOLDERID_RoamingAppData);
1010 const QString programDataFolder = windowsConfigPath(FOLDERID_ProgramData);
1016 const QString userPath = make_user_path();
1035 PathHash *pathHash = pathHashFunc();
1037 locker = initDefaultPaths(std::move(locker));
1040 if (!
result.path.isEmpty())
1047 #if defined(QT_BUILD_INTERNAL) && defined(Q_XDG_PLATFORM) && !defined(QT_NO_STANDARDPATHS)
1052 pathHashFunc()->clear();
1061 nextPosition(0x40000000)
1072 QString orgFile = org + extension;
1082 #if defined(Q_XDG_PLATFORM) && !defined(QT_NO_STANDARDPATHS)
1084 if (!systemPath.userDefined) {
1090 if (!dirs.isEmpty())
1094 paths.reserve(dirs.size() * 2);
1095 for (
const auto &
dir : qAsConst(dirs))
1098 paths.reserve(dirs.size());
1100 for (
const auto &
dir : qAsConst(dirs))
1104 for (
const auto &
path : qAsConst(
paths))
1122 nextPosition(0x40000000)
1137 for (
auto conf_file : qAsConst(confFiles)) {
1138 if (!conf_file->ref.deref()) {
1139 if (conf_file->size == 0) {
1143 usedHash->
remove(conf_file->name);
1147 unusedCache->
insert(conf_file->name, conf_file,
1148 10 + (conf_file->originalKeys.size() / 4));
1174 ensureSectionParsed(confFile, theKey);
1175 ensureSectionParsed(confFile, prefix);
1178 while (
i != confFile->
addedKeys.
end() &&
i.key().startsWith(prefix))
1211 for (
auto confFile : qAsConst(confFiles)) {
1214 if (!confFile->addedKeys.isEmpty()) {
1215 j = confFile->addedKeys.constFind(theKey);
1216 found = (
j != confFile->addedKeys.constEnd());
1219 ensureSectionParsed(confFile, theKey);
1220 j = confFile->originalKeys.constFind(theKey);
1221 found = (
j != confFile->originalKeys.constEnd()
1222 && !confFile->removedKeys.contains(theKey));
1230 return std::nullopt;
1239 int startPos = prefix.
size();
1241 for (
auto confFile : qAsConst(confFiles)) {
1245 ensureAllSectionsParsed(confFile);
1247 ensureSectionParsed(confFile, thePrefix);
1250 &confFile->originalKeys)->
lowerBound( thePrefix);
1251 while (
j != confFile->originalKeys.constEnd() &&
j.key().startsWith(thePrefix)) {
1252 if (!confFile->removedKeys.contains(
j.key()))
1258 &confFile->addedKeys)->
lowerBound(thePrefix);
1259 while (
j != confFile->addedKeys.constEnd() &&
j.key().startsWith(thePrefix)) {
1282 ensureAllSectionsParsed(confFile);
1292 for (
auto confFile : qAsConst(confFiles)) {
1294 syncConfFile(confFile);
1309 return confFiles.
at(0)->
name;
1323 void QConfFileSettingsPrivate::syncConfFile(
QConfFile *confFile)
1331 if (readOnly && confFile->
size > 0) {
1333 if (confFile->
size == fileInfo.size() && confFile->
timeStamp == fileInfo.lastModified())
1342 #ifndef QT_BOOTSTRAPPED
1362 bool mustReadFile =
true;
1363 bool createFile = !fileInfo.exists();
1366 mustReadFile = (confFile->
size != fileInfo.size()
1367 || (confFile->
size != 0 && confFile->
timeStamp != fileInfo.lastModified()));
1394 }
else if (readFunc) {
1396 ok = readFunc(
file, tempNewKeys);
1412 confFile->
size = fileInfo.size();
1413 confFile->
timeStamp = fileInfo.lastModified();
1422 ensureAllSectionsParsed(confFile);
1425 #if !defined(QT_BOOTSTRAPPED) && QT_CONFIG(temporaryfile)
1438 ok = writePlistFile(sf, mergedKeys);
1442 ok = writeIniFile(sf, mergedKeys);
1443 }
else if (writeFunc) {
1448 tempOriginalKeys.
insert(
i.key(),
i.value());
1451 ok = writeFunc(sf, tempOriginalKeys);
1454 #if !defined(QT_BOOTSTRAPPED) && QT_CONFIG(temporaryfile)
1466 confFile->
size = fileInfo.size();
1467 confFile->
timeStamp = fileInfo.lastModified();
1484 static const char charTraits[256] =
1489 0, 0, 0, 0, 0, 0, 0, 0, 0,
Space,
Space |
Special, 0, 0,
Space |
Special, 0, 0,
1490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1491 Space, 0,
Special, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Special, 0,
Special, 0, 0,
1493 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Special, 0, 0, 0,
1495 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1498 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1499 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1500 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1503 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1505 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1509 int &lineStart,
int &lineLen,
int &equalsPos)
1511 int dataLen =
data.length();
1512 bool inQuotes =
false;
1516 lineStart = dataPos;
1521 while (
i < dataLen) {
1525 goto break_out_of_outer_loop;
1531 if (!inQuotes && equalsPos == -1)
1533 }
else if (
ch ==
'\n' ||
ch ==
'\r') {
1534 if (
i == lineStart + 1) {
1536 }
else if (!inQuotes) {
1538 goto break_out_of_outer_loop;
1540 }
else if (
ch ==
'\\') {
1544 char ch2 =
data.at(
i);
1546 if ((
ch ==
'\n' && ch2 ==
'\r') || (
ch ==
'\r' && ch2 ==
'\n'))
1550 }
else if (
ch ==
'"') {
1551 inQuotes = !inQuotes;
1555 if (
i == lineStart + 1) {
1556 while (
i < dataLen && (((
ch =
data.at(
i)) !=
'\n') &&
ch !=
'\r'))
1561 }
else if (!inQuotes) {
1563 goto break_out_of_outer_loop;
1568 break_out_of_outer_loop:
1570 lineLen =
i - lineStart;
1582 #define FLUSH_CURRENT_SECTION() \
1584 QByteArray §ionData = (*unparsedIniSections)[QSettingsKey(currentSection, \
1585 IniCaseSensitivity, \
1586 sectionPosition)]; \
1587 if (!sectionData.isEmpty()) \
1588 sectionData.append('\n'); \
1589 sectionData += data.mid(currentSectionStart, lineStart - currentSectionStart); \
1590 sectionPosition = ++position; \
1594 int currentSectionStart = 0;
1600 int sectionPosition = 0;
1605 if (
data.size() >= 3 && dd[0] == 0xef && dd[1] == 0xbb && dd[2] == 0xbf)
1609 char ch =
data.at(lineStart);
1615 int idx =
data.indexOf(
']', lineStart);
1616 if (
idx == -1 ||
idx >= lineStart + lineLen) {
1618 iniSection =
data.
mid(lineStart + 1, lineLen - 1);
1620 iniSection =
data.
mid(lineStart + 1,
idx - lineStart - 1);
1623 iniSection = iniSection.
trimmed();
1626 currentSection.
clear();
1631 currentSection.
clear();
1636 currentSectionStart = dataPos;
1646 #undef FLUSH_CURRENT_SECTION
1663 char ch =
data.at(lineStart);
1666 if (equalsPos == -1) {
1672 int keyEnd = equalsPos;
1673 while (keyEnd > lineStart && ((
ch =
data.at(keyEnd - 1)) ==
' ' ||
ch ==
'\t'))
1675 int valueStart = equalsPos + 1;
1681 strValue.
reserve(lineLen - (valueStart - lineStart));
1683 strValue, strListValue);
1697 : IniCaseSensitivity,
1720 return static_cast<const QString &
>(
k1) <
static_cast<const QString &
>(k2);
1747 const char *
const eol =
"\r\n";
1749 const char eol =
'\n';
1770 const int sectionCount = iniMap.
size();
1772 sections.
reserve(sectionCount);
1775 std::sort(sections.
begin(), sections.
end());
1777 bool writeError =
false;
1778 for (
int j = 0; !writeError &&
j < sectionCount; ++
j) {
1787 realSection =
"[General]";
1789 realSection =
"[%General]";
1799 device.write(realSection);
1830 void QConfFileSettingsPrivate::ensureAllSectionsParsed(
QConfFile *confFile)
const
1835 for (;
i !=
end; ++
i) {
1842 void QConfFileSettingsPrivate::ensureSectionParsed(
QConfFile *confFile,
1851 if (indexOfSlash != -1) {
1856 if (
i.key().isEmpty() || !
key.startsWith(
i.key()))
2467 #ifndef QT_NO_QOBJECT
2691 if (
d->pendingChanges) {
2734 d->pendingChanges =
false;
2749 return d->fileName();
2788 return d->organizationName;
2801 return d->applicationName;
2834 return d->atomicSyncOnly;
2909 if (
d->groupStack.isEmpty()) {
2910 qWarning(
"QSettings::endGroup: No matching beginGroup()");
2917 d->groupPrefix.truncate(
d->groupPrefix.size() - (
len + 1));
2919 if (
group.isArray())
2920 qWarning(
"QSettings::endGroup: Expected endArray() instead");
2931 return d->groupPrefix.left(
d->groupPrefix.size() - 1);
3002 if (
d->groupStack.isEmpty()) {
3003 qWarning(
"QSettings::endArray: No matching beginArray()");
3009 d->groupStack.pop();
3011 d->groupPrefix.truncate(
d->groupPrefix.size() - (
len + 1));
3013 if (
group.arraySizeGuess() != -1)
3016 if (!
group.isArray())
3017 qWarning(
"QSettings::endArray: Expected endGroup() instead");
3031 if (
d->groupStack.isEmpty() || !
d->groupStack.top().isArray()) {
3032 qWarning(
"QSettings::setArrayIndex: Missing beginArray()");
3037 int len =
top.toString().size();
3038 top.setArrayIndex(qMax(
i, 0));
3039 d->groupPrefix.replace(
d->groupPrefix.size() -
len - 1,
len,
top.toString());
3126 return d->isWritable();
3148 if (
key.isEmpty()) {
3149 qWarning(
"QSettings::setValue: Empty key passed");
3217 return d->get(
d->actualKey(
key)) != std::nullopt;
3243 return d->fallbacks;
3246 #ifndef QT_NO_QOBJECT
3285 return d->value(
key,
nullptr);
3291 return d->value(
key, &defaultValue);
3296 if (
key.isEmpty()) {
3297 qWarning(
"QSettings::value: Empty key passed");
3301 return std::move(*
r);
3303 return *defaultValue;
3321 globalDefaultFormat =
format;
3334 return globalDefaultFormat;
3374 PathHash *pathHash = pathHashFunc();
3376 locker = initDefaultPaths(std::move(locker));
3449 WriteFunc writeFunc,
3452 #ifdef QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
3464 info.readFunc = readFunc;
3465 info.writeFunc = writeFunc;
3466 info.caseSensitivity = caseSensitivity;
3474 #ifndef QT_BOOTSTRAPPED
3475 #include "moc_qsettings.cpp"
small capitals from c petite p scientific i
[1]
The QByteArray class provides an array of bytes.
QByteArray trimmed() const &
QByteArray & prepend(char c)
qsizetype size() const noexcept
const char * constData() const noexcept
bool startsWith(QByteArrayView bv) const
bool isEmpty() const noexcept
static QByteArray number(int, int base=10)
int compare(QByteArrayView a, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QByteArray & append(char c)
QByteArray mid(qsizetype index, qsizetype len=-1) const
bool insert(const Key &key, T *object, qsizetype cost=1)
T * take(const Key &key) noexcept(std::is_nothrow_destructible_v< Key >)
The QChar class provides a 16-bit Unicode character.
constexpr char16_t unicode() const noexcept
constexpr bool isUpper() const noexcept
UnparsedSettingsMap unparsedIniSections
ParsedSettingsMap originalKeys
ParsedSettingsMap removedKeys
ParsedSettingsMap mergedKeyMap() const
static QConfFile * fromName(const QString &name, bool _userPerms)
ParsedSettingsMap addedKeys
static bool readIniSection(const QSettingsKey §ion, const QByteArray &data, ParsedSettingsMap *settingsMap)
void set(const QString &key, const QVariant &value) override
~QConfFileSettingsPrivate()
static bool readIniLine(const QByteArray &data, int &dataPos, int &lineStart, int &lineLen, int &equalsPos)
bool isWritable() const override
QString fileName() const override
QConfFileSettingsPrivate(QSettings::Format format, QSettings::Scope scope, const QString &organization, const QString &application)
void remove(const QString &key) override
bool readIniFile(const QByteArray &data, UnparsedSettingsMap *unparsedIniSections)
std::optional< QVariant > get(const QString &key) const override
The QCoreApplication class provides an event loop for Qt applications without UI.
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
The QDataStream class provides serialization of binary data to a QIODevice.
The QDir class provides access to directory structures and their contents.
static QString homePath()
bool operator<(const QElapsedTimer &lhs, const QElapsedTimer &rhs) noexcept
The QEvent class is the base class of all event classes. Event objects contain event parameters.
The QFile class provides an interface for reading from and writing to files.
bool open(OpenMode flags) override
bool setPermissions(Permissions permissionSpec) override
static QString decodeName(const QByteArray &localFileName)
qint64 size() const override
The QFileInfo class provides system-independent file information.
QString absoluteFilePath() const
QString absolutePath() const
The QHash class is a template class that provides a hash-table-based dictionary.
bool remove(const Key &key)
T value(const Key &key) const noexcept
bool isEmpty() const noexcept
iterator insert(const Key &key, const T &value)
The QIODevice class is the base interface class of all I/O devices in Qt.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
static QString path(LibraryPath p)
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
void reserve(qsizetype size)
void append(parameter_type t)
QList< T > toList() const noexcept
The QLockFile class provides locking between processes using a file.
iterator insert(const Key &key, const T &value)
iterator erase(const_iterator it)
bool contains(const Key &key) const
size_type remove(const Key &key)
const_iterator constFind(const Key &key) const
iterator lowerBound(const Key &key)
iterator upperBound(const Key &key)
const_iterator constBegin() const
const_iterator constEnd() const
The QMutex class provides access serialization between threads.
The QObject class is the base class of all Qt objects.
virtual bool event(QEvent *event)
QScopedPointer< QObjectData > d_ptr
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
The QSaveFile class provides an interface for safely writing to files.
The QSettings class provides persistent platform-independent application settings.
static void setDefaultFormat(Format format)
QSettings(const QString &organization, const QString &application=QString(), QObject *parent=nullptr)
static Format defaultFormat()
void setValue(const QString &key, const QVariant &value)
void setAtomicSyncRequired(bool enable)
bool event(QEvent *event) override
QVariant value(const QString &key, const QVariant &defaultValue) const
void remove(const QString &key)
QString organizationName() const
QStringList childKeys() const
bool(* WriteFunc)(QIODevice &device, const SettingsMap &map)
static Format registerFormat(const QString &extension, ReadFunc readFunc, WriteFunc writeFunc, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
QString applicationName() const
void beginGroup(const QString &prefix)
bool contains(const QString &key) const
QStringList allKeys() const
int beginReadArray(const QString &prefix)
bool(* ReadFunc)(QIODevice &device, SettingsMap &map)
static void setPath(Format format, Scope scope, const QString &path)
bool isAtomicSyncRequired() const
QStringList childGroups() const
void beginWriteArray(const QString &prefix, int size=-1)
void setArrayIndex(int i)
bool fallbacksEnabled() const
void setFallbacksEnabled(bool b)
QSettingsIniKey(const QString &str, int pos=-1)
QString originalCaseKey() const
int originalKeyPosition() const
static void iniEscapedKey(const QString &key, QByteArray &result)
virtual QString fileName() const =0
QSettingsPrivate(QSettings::Format format)
static QStringList variantListToStringList(const QVariantList &l)
static QSettingsPrivate * create(QSettings::Format format, QSettings::Scope scope, const QString &organization, const QString &application)
static QStringList splitArgs(const QString &s, int idx)
static void iniEscapedString(const QString &str, QByteArray &result)
void beginGroupOrArray(const QSettingsGroup &group)
static bool iniUnescapedKey(const QByteArray &key, int from, int to, QString &result)
void setStatus(QSettings::Status status) const
static QVariant stringListToVariantList(const QStringList &l)
static QString normalizedKey(const QString &key)
static QVariant stringToVariant(const QString &s)
QString actualKey(const QString &key) const
virtual ~QSettingsPrivate()
static void iniEscapedStringList(const QStringList &strs, QByteArray &result)
static bool iniUnescapedStringList(const QByteArray &str, int from, int to, QString &stringResult, QStringList &stringListResult)
static QString variantToString(const QVariant &v)
virtual std::optional< QVariant > get(const QString &key) const =0
QStack< QSettingsGroup > groupStack
QVariant value(const QString &key, const QVariant *defaultValue) const
static void processChild(QStringView key, ChildSpec spec, QStringList &result)
The QSize class defines the size of a two-dimensional object using integer point precision.
static QStringList standardLocations(StandardLocation type)
static QString writableLocation(StandardLocation type)
The QStringDecoder class provides a state-based decoder for text. \reentrant.
The QStringEncoder class provides a state-based encoder for text. \reentrant.
The QString class provides a Unicode character string.
QString & prepend(QChar c)
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
void reserve(qsizetype size)
void truncate(qsizetype pos)
const QChar at(qsizetype i) const
static QString fromWCharArray(const wchar_t *string, qsizetype size=-1)
QString left(qsizetype n) const
QString & remove(qsizetype i, qsizetype len)
static QString static QString asprintf(const char *format,...) Q_ATTRIBUTE_FORMAT_PRINTF(1
const QChar * unicode() const
The QStringList class provides a list of strings.
The QStringView class provides a unified view on UTF-16 strings with a read-only subset of the QStrin...
QByteArray toLatin1() const
constexpr QStringView mid(qsizetype pos, qsizetype n=-1) const noexcept
The QTemporaryFile class is an I/O device that operates on temporary files.
The QVariant class acts like a union for the most common Qt data types.
int toInt(bool *ok=nullptr) const
QMap< QString, QString > map
[6]
backing_store_ptr info
[4]
typename C::const_iterator const_iterator
typename C::iterator iterator
QHighDpiScaling::Point position(T, QHighDpiScaling::Point::Kind)
Lock qt_scoped_lock(Mutex &mutex)
Lock qt_unique_lock(Mutex &mutex)
qsizetype fromUtf8(uchar b, OutputPtr &dst, InputPtr &src, InputPtr end)
int toUtf8(char16_t u, OutputPtr &dst, InputPtr &src, InputPtr end)
constexpr char toHexUpper(uint value) noexcept
constexpr int fromHex(uint c) noexcept
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if
QList< QString > QStringList
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
EGLOutputLayerEXT EGLint EGLAttrib value
QT_BEGIN_INCLUDE_NAMESPACE typedef unsigned char uchar
#define Q_AUTOTEST_EXPORT
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
QList< QVariant > QVariantList
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble top
GLsizei const GLuint * paths
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
GLdouble GLdouble GLdouble GLdouble q
GLsizei const GLchar *const * path
#define Q_ASSERT_X(cond, x, msg)
QHash< int, Path > PathHash
QList< QConfFileCustomFormat > CustomFormatVector
Q_DECLARE_TYPEINFO(QConfFileCustomFormat, Q_RELOCATABLE_TYPE)
QMap< QSettingsIniKey, QVariant > IniKeyMap
QHash< QString, QConfFile * > ConfFileHash
#define FLUSH_CURRENT_SECTION()
QMap< QString, QSettingsIniSection > IniMap
QCache< QString, QConfFile > ConfFileCache
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent