Qt 4.8
Public Functions | Properties | List of all members
RegistryKey Class Reference

Public Functions

void close ()
 
HKEY handle () const
 
QString key () const
 
HKEY parentHandle () const
 
bool readOnly () const
 
 RegistryKey (HKEY parent_handle=0, const QString &key=QString(), bool read_only=true)
 

Properties

HKEY m_handle
 
QString m_key
 
HKEY m_parent_handle
 
bool m_read_only
 

Detailed Description

Definition at line 313 of file qsettings_win.cpp.

Constructors and Destructors

◆ RegistryKey()

RegistryKey::RegistryKey ( HKEY  parent_handle = 0,
const QString key = QString(),
bool  read_only = true 
)

Definition at line 329 of file qsettings_win.cpp.

330 {
331  m_parent_handle = parent_handle;
332  m_handle = 0;
333  m_read_only = read_only;
334  m_key = key;
335 }
QString key() const

Functions

◆ close()

void RegistryKey::close ( )

Definition at line 365 of file qsettings_win.cpp.

366 {
367  if (m_handle != 0)
368  RegCloseKey(m_handle);
369  m_handle = 0;
370 }

◆ handle()

HKEY RegistryKey::handle ( ) const

Definition at line 342 of file qsettings_win.cpp.

Referenced by QWinSettingsPrivate::children(), QWinSettingsPrivate::get(), and QWinSettingsPrivate::writeHandle().

343 {
344  if (m_handle != 0)
345  return m_handle;
346 
347  if (m_read_only)
348  m_handle = openKey(m_parent_handle, KEY_READ, m_key);
349  else
351 
352  return m_handle;
353 }
static HKEY createOrOpenKey(HKEY parentHandle, REGSAM perms, const QString &rSubKey)
static HKEY openKey(HKEY parentHandle, REGSAM perms, const QString &rSubKey)

◆ key()

QString RegistryKey::key ( ) const

Definition at line 337 of file qsettings_win.cpp.

Referenced by QWinSettingsPrivate::fileName(), RegistryKey(), and QWinSettingsPrivate::~QWinSettingsPrivate().

338 {
339  return m_key;
340 }

◆ parentHandle()

HKEY RegistryKey::parentHandle ( ) const

Definition at line 355 of file qsettings_win.cpp.

Referenced by QWinSettingsPrivate::fileName().

356 {
357  return m_parent_handle;
358 }

◆ readOnly()

bool RegistryKey::readOnly ( ) const

Definition at line 360 of file qsettings_win.cpp.

Referenced by QWinSettingsPrivate::writeHandle().

361 {
362  return m_read_only;
363 }

Properties

◆ m_handle

HKEY RegistryKey::m_handle
mutableprivate

Definition at line 324 of file qsettings_win.cpp.

Referenced by close(), handle(), and RegistryKey().

◆ m_key

QString RegistryKey::m_key
private

Definition at line 325 of file qsettings_win.cpp.

Referenced by handle(), key(), and RegistryKey().

◆ m_parent_handle

HKEY RegistryKey::m_parent_handle
private

Definition at line 323 of file qsettings_win.cpp.

Referenced by handle(), parentHandle(), and RegistryKey().

◆ m_read_only

bool RegistryKey::m_read_only
mutableprivate

Definition at line 326 of file qsettings_win.cpp.

Referenced by handle(), readOnly(), and RegistryKey().


The documentation for this class was generated from the following file: