Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsettings_win.cpp File Reference

(05fc3aef53348fb58be6308076e000825b704e58)

#include "qsettings.h"
#include "qsettings_p.h"
#include "qlist.h"
#include "qmap.h"
#include "qdebug.h"
#include "qscopeguard.h"
#include <qt_windows.h>
+ Include dependency graph for qsettings_win.cpp:

Go to the source code of this file.

Classes

class  RegistryKey
 
class  QWinSettingsPrivate
 

Macros

#define KEY_WOW64_64KEY   0x0100
 
#define KEY_WOW64_32KEY   0x0200
 

Typedefs

typedef QMap< QString, QStringNameSet
 
typedef QList< RegistryKeyRegistryKeyList
 

Functions

static QString keyPath (const QString &rKey)
 
static QString keyName (const QString &rKey)
 
static QString escapedKey (QString uKey)
 
static QString unescapedKey (QString rKey)
 
static void mergeKeySets (NameSet *dest, const NameSet &src)
 
static void mergeKeySets (NameSet *dest, const QStringList &src)
 
static HKEY openKey (HKEY parentHandle, REGSAM perms, const QString &rSubKey, REGSAM access=0)
 
static HKEY createOrOpenKey (HKEY parentHandle, REGSAM perms, const QString &rSubKey, REGSAM access=0)
 
static HKEY createOrOpenKey (HKEY parentHandle, const QString &rSubKey, bool *readOnly, REGSAM access=0)
 
static QStringList childKeysOrGroups (HKEY parentHandle, QSettingsPrivate::ChildSpec spec)
 
static void allKeys (HKEY parentHandle, const QString &rSubKey, NameSet *result, REGSAM access=0)
 
static void deleteChildGroups (HKEY parentHandle, REGSAM access=0)
 

Variables

static const REGSAM registryPermissions = KEY_READ | KEY_WRITE
 

Macro Definition Documentation

◆ KEY_WOW64_32KEY

#define KEY_WOW64_32KEY   0x0200

Definition at line 22 of file qsettings_win.cpp.

◆ KEY_WOW64_64KEY

#define KEY_WOW64_64KEY   0x0100

Definition at line 17 of file qsettings_win.cpp.

Typedef Documentation

◆ NameSet

Definition at line 86 of file qsettings_win.cpp.

◆ RegistryKeyList

Definition at line 339 of file qsettings_win.cpp.

Function Documentation

◆ allKeys()

static void allKeys ( HKEY parentHandle,
const QString & rSubKey,
NameSet * result,
REGSAM access = 0 )
static

Definition at line 223 of file qsettings_win.cpp.

References allKeys(), QSettingsPrivate::ChildGroups, QSettingsPrivate::ChildKeys, childKeysOrGroups(), i, and openKey().

Referenced by allKeys(), QWinSettingsPrivate::children(), displayName(), fontKeys(), QShortcutMap::removeShortcut(), QShortcutMap::setShortcutAutoRepeat(), and QShortcutMap::setShortcutEnabled().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ childKeysOrGroups()

static QStringList childKeysOrGroups ( HKEY parentHandle,
QSettingsPrivate::ChildSpec spec )
static

Definition at line 166 of file qsettings_win.cpp.

References QSettingsPrivate::ChildKeys, QByteArray::constData(), QByteArray::data(), QString::fromWCharArray(), i, item, qErrnoWarning(), and QByteArray::size().

Referenced by allKeys(), QWinSettingsPrivate::children(), deleteChildGroups(), and QWinSettingsPrivate::remove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createOrOpenKey() [1/2]

static HKEY createOrOpenKey ( HKEY parentHandle,
const QString & rSubKey,
bool * readOnly,
REGSAM access = 0 )
static

Definition at line 146 of file qsettings_win.cpp.

References createOrOpenKey(), and registryPermissions.

+ Here is the call graph for this function:

◆ createOrOpenKey() [2/2]

static HKEY createOrOpenKey ( HKEY parentHandle,
REGSAM perms,
const QString & rSubKey,
REGSAM access = 0 )
static

Definition at line 124 of file qsettings_win.cpp.

References openKey().

Referenced by createOrOpenKey(), RegistryKey::handle(), and QWinSettingsPrivate::set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteChildGroups()

static void deleteChildGroups ( HKEY parentHandle,
REGSAM access = 0 )
static

Definition at line 250 of file qsettings_win.cpp.

References QSettingsPrivate::ChildGroups, childKeysOrGroups(), deleteChildGroups(), i, openKey(), qErrnoWarning(), qUtf16Printable, and registryPermissions.

Referenced by deleteChildGroups(), and QWinSettingsPrivate::remove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ escapedKey()

static QString escapedKey ( QString uKey)
static

Definition at line 67 of file qsettings_win.cpp.

References i.

Referenced by QWinSettingsPrivate::children(), QWinSettingsPrivate::get(), QWinSettingsPrivate::remove(), QWinSettingsPrivate::set(), and unescapedKey().

+ Here is the caller graph for this function:

◆ keyName()

static QString keyName ( const QString & rKey)
static

Definition at line 51 of file qsettings_win.cpp.

References QString::mid().

Referenced by QWinSettingsPrivate::QWinSettingsPrivate(), QDBusMenuItem::convertKeySequence(), QKeySequencePrivate::decodeString(), mailCommand(), readInputFileDirectory(), QWinSettingsPrivate::readKey(), QWinSettingsPrivate::remove(), and QWinSettingsPrivate::set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ keyPath()

static QString keyPath ( const QString & rKey)
static

Definition at line 43 of file qsettings_win.cpp.

Referenced by QWinSettingsPrivate::readKey(), QWinSettingsPrivate::remove(), QWinSettingsPrivate::set(), and QMacKeyValueObserver::swap().

+ Here is the caller graph for this function:

◆ mergeKeySets() [1/2]

static void mergeKeySets ( NameSet * dest,
const NameSet & src )
static

Definition at line 88 of file qsettings_win.cpp.

References QSet< T >::constBegin(), QSet< T >::constEnd(), QMap< Key, T >::insert(), it, and unescapedKey().

Referenced by QWinSettingsPrivate::children().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mergeKeySets() [2/2]

static void mergeKeySets ( NameSet * dest,
const QStringList & src )
static

Definition at line 95 of file qsettings_win.cpp.

References QSet< T >::constBegin(), QSet< T >::constEnd(), QMap< Key, T >::insert(), it, and unescapedKey().

+ Here is the call graph for this function:

◆ openKey()

static HKEY openKey ( HKEY parentHandle,
REGSAM perms,
const QString & rSubKey,
REGSAM access = 0 )
static

Definition at line 110 of file qsettings_win.cpp.

Referenced by allKeys(), QWinSettingsPrivate::children(), createOrOpenKey(), deleteChildGroups(), RegistryKey::handle(), QWinSettingsPrivate::readKey(), and QWinSettingsPrivate::remove().

+ Here is the caller graph for this function:

◆ unescapedKey()

static QString unescapedKey ( QString rKey)
static

Definition at line 81 of file qsettings_win.cpp.

References escapedKey().

Referenced by mergeKeySets(), and mergeKeySets().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ registryPermissions

const REGSAM registryPermissions = KEY_READ | KEY_WRITE
static