Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QLockFilePrivate Class Reference

#include <qlockfile_p.h>

Collaboration diagram for QLockFilePrivate:

Public Member Functions

 QLockFilePrivate (const QString &fn)
 ~QLockFilePrivate ()
QLockFile::LockError tryLock_sys ()
bool removeStaleLock ()
QByteArray lockFileContents () const
bool isApparentlyStale () const

Static Public Member Functions

static Q_CORE_EXPORT QString processNameByPid (qint64 pid)
static bool isProcessRunning (qint64 pid, const QString &appname)
static auto getLockFileHandle (QLockFile *f)

Public Attributes

QString fileName
int fileHandle
std::chrono::milliseconds staleLockTime = std::chrono::seconds{30}
QLockFile::LockError lockError = QLockFile::NoError
bool isLocked = false

Detailed Description

Definition at line 25 of file qlockfile_p.h.

Constructor & Destructor Documentation

◆ QLockFilePrivate()

QLockFilePrivate::QLockFilePrivate ( const QString & fn)
explicit

Definition at line 379 of file qlockfile.cpp.

References QLockFilePrivate(), and fileHandle.

Referenced by QLockFilePrivate().

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

◆ ~QLockFilePrivate()

QLockFilePrivate::~QLockFilePrivate ( )
default

Member Function Documentation

◆ getLockFileHandle()

auto QLockFilePrivate::getLockFileHandle ( QLockFile * f)
inlinestatic

Definition at line 55 of file qlockfile_p.h.

◆ isApparentlyStale()

bool QLockFilePrivate::isApparentlyStale ( ) const

Definition at line 432 of file qlockfile.cpp.

◆ isProcessRunning()

bool QLockFilePrivate::isProcessRunning ( qint64 pid,
const QString & appname )
static

Definition at line 187 of file qlockfile_unix.cpp.

◆ lockFileContents()

QByteArray QLockFilePrivate::lockFileContents ( ) const

Definition at line 392 of file qlockfile.cpp.

◆ processNameByPid()

QString QLockFilePrivate::processNameByPid ( qint64 pid)
static

Definition at line 204 of file qlockfile_unix.cpp.

◆ removeStaleLock()

bool QLockFilePrivate::removeStaleLock ( )

Definition at line 176 of file qlockfile_unix.cpp.

◆ tryLock_sys()

QLockFile::LockError QLockFilePrivate::tryLock_sys ( )

Definition at line 133 of file qlockfile_unix.cpp.

Member Data Documentation

◆ fileHandle

int QLockFilePrivate::fileHandle

Definition at line 47 of file qlockfile_p.h.

Referenced by QLockFilePrivate().

◆ fileName

QString QLockFilePrivate::fileName

Definition at line 42 of file qlockfile_p.h.

◆ isLocked

bool QLockFilePrivate::isLocked = false

Definition at line 52 of file qlockfile_p.h.

◆ lockError

QLockFile::LockError QLockFilePrivate::lockError = QLockFile::NoError

Definition at line 51 of file qlockfile_p.h.

◆ staleLockTime

std::chrono::milliseconds QLockFilePrivate::staleLockTime = std::chrono::seconds{30}

Definition at line 50 of file qlockfile_p.h.


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