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
QCoreApplicationPrivate Class Reference

#include <qcoreapplication_p.h>

Inheritance diagram for QCoreApplicationPrivate:
Collaboration diagram for QCoreApplicationPrivate:

Classes

struct  QPostEventListLocker

Public Types

enum  Type : quint8 { Tty , Gui }
Public Types inherited from QObjectPrivate
typedef void(*) StaticMetaCallFunction(QObject *, QMetaObject::Call, int, void **)
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>

Public Member Functions

 QCoreApplicationPrivate (int &aargc, char **aargv)
 ~QCoreApplicationPrivate ()
void init ()
QString appName () const
QString appVersion () const
bool sendThroughApplicationEventFilters (QObject *, QEvent *)
virtual void createEventDispatcher ()
virtual void eventDispatcherReady ()
virtual bool compressEvent (QEvent *eventevent, QObject *receiver, QPostEventList *postedEvents)
void ref ()
void deref ()
virtual bool canQuitAutomatically ()
void quitAutomatically ()
virtual void quit ()
virtual bool handleQuitEvent ()
void cleanupThreadData ()
void execCleanup ()
void processCommandLineArguments ()
Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
void setObjectNameWithoutBindings (const QString &namename)
 QObjectPrivate (decltype(QObjectPrivateVersion) version=QObjectPrivateVersion)
virtual ~QObjectPrivate ()
void deleteChildren ()
void clearBindingStorage ()
void setParent_helper (QObject *)
void moveToThread_helper ()
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
QObjectList receiverList (const char *signal) const
void ensureConnectionData ()
void addConnection (int signal, Connection *cc)
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
bool maybeSignalConnected (uint signalIndex) const
bool isDeclarativeSignalConnected (uint signalIdx) const
void connectNotify (const QMetaMethod &signal)
void disconnectNotify (const QMetaMethod &signal)
void reinitBindingStorageAfterThreadMove ()
virtual std::string flagsForDumping () const
virtual void writeToDebugStream (QDebug &) const
QtPrivate::QPropertyAdaptorSlotObject * getPropertyAdaptorSlotObject (const QMetaProperty &property)
Public Member Functions inherited from QObjectData
 QObjectData ()=default
virtual ~QObjectData ()=0
const QMetaObject * dynamicMetaObject () const

Static Public Member Functions

static void initLocale ()
static bool checkInstance (const char *method)
static bool sendThroughObjectEventFilters (QObject *, QEvent *)
static bool notify_helper (QObject *, QEvent *)
static void setEventSpontaneous (QEvent *e, bool spontaneous)
static void removePostedEvent (QEvent *)
 Removes event from the queue of posted events, and emits a warning message if appropriate.
static QThread * mainThread ()
static void sendPostedEvents (QObject *receiver, int event_type, QThreadData *datadata)
static void checkReceiverThread (QObject *receiver, const char *caller)
static QPostEventListLocker lockThreadPostEventList (QObject *objectobject)
static void destroyEventDispatcher ()
static bool isTranslatorInstalled (QTranslator *translator)
static bool testAttribute (uint flag)
Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *cc)
static QObjectPrivate * get (QObject *o)
static const QObjectPrivate * get (const QObject *o)
static void deleteInOwnThread (QObject *objectobject)
template<typename Func1, typename Func2>
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType typetype=Qt::AutoConnection)
template<typename Func1, typename Func2>
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int typetype, const int *typestypes, const QMetaObject *senderMetaObject)
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType typetype)
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType typetype)
static bool disconnect (const QObject *sender, int signal_index, void **slot)
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)

Public Attributes

QAtomicInt quitLockRef
int & argc
char ** argv
Type application_type = Tty
bool in_exec = false
bool aboutToQuitEmitted = false
bool threadData_clean = false
bool handlingQuitEvent = false
QTranslatorList translators
QReadWriteLock translateMutex
QString cachedApplicationFilePath
QString qmljs_debug_arguments
Public Attributes inherited from QObjectPrivate
ExtraData * extraData
QAtomicPointer< QThreadData > threadData
QAtomicPointer< ConnectionData > connections
union  
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
Public Attributes inherited from QObjectData
QObject * q_ptr
QObject * parent
QObjectList children
uint isWidget: 1
uint blockSig: 1
uint wasDeleted: 1
uint isDeletingChildren: 1
uint sendChildEvents: 1
uint receiveChildEvents: 1
uint isWindow: 1
uint deleteLaterCalled: 1
uint isQuickItem: 1
uint willBeWidget: 1
uint wasWidget: 1
uint receiveParentEvents: 1
uint unused: 20
QAtomicInt postedEvents
QDynamicMetaObjectData * metaObject
QBindingStorage bindingStorage

Static Public Attributes

static QBasicAtomicPointer< QThread > theMainThread = Q_BASIC_ATOMIC_INITIALIZER(nullptr)
static QBasicAtomicPointer< void > theMainThreadId = Q_BASIC_ATOMIC_INITIALIZER(nullptr)
static QAbstractEventDispatcher * eventDispatcher = nullptr
static bool is_app_running = false
static bool is_app_closing = false
static bool setuidAllowed = false
static uint attribs

Detailed Description

Definition at line 45 of file qcoreapplication_p.h.

Member Enumeration Documentation

◆ Type

Enumerator
Tty 
Gui 

Definition at line 53 of file qcoreapplication_p.h.

Constructor & Destructor Documentation

◆ QCoreApplicationPrivate()

QCoreApplicationPrivate::QCoreApplicationPrivate ( int & aargc,
char ** aargv )

Definition at line 475 of file qcoreapplication.cpp.

◆ ~QCoreApplicationPrivate()

QCoreApplicationPrivate::~QCoreApplicationPrivate ( )

Definition at line 505 of file qcoreapplication.cpp.

Member Function Documentation

◆ appName()

QString QCoreApplicationPrivate::appName ( ) const

Definition at line 191 of file qcoreapplication.cpp.

◆ appVersion()

QString QCoreApplicationPrivate::appVersion ( ) const

Definition at line 218 of file qcoreapplication.cpp.

◆ canQuitAutomatically()

bool QCoreApplicationPrivate::canQuitAutomatically ( )
virtual

Reimplemented in QGuiApplicationPrivate.

Definition at line 2077 of file qcoreapplication.cpp.

◆ checkInstance()

bool QCoreApplicationPrivate::checkInstance ( const char * method)
static

Definition at line 248 of file qcoreapplication.cpp.

◆ checkReceiverThread()

void QCoreApplicationPrivate::checkReceiverThread ( QObject * receiver,
const char * caller )
inlinestatic

Definition at line 115 of file qcoreapplication_p.h.

◆ cleanupThreadData()

void QCoreApplicationPrivate::cleanupThreadData ( )

Definition at line 517 of file qcoreapplication.cpp.

◆ compressEvent()

bool QCoreApplicationPrivate::compressEvent ( QEvent * event,
QObject * receiver,
QPostEventList * postedEvents )
virtual

Returns true if event was compressed away (possibly deleted) and should not be added to the list.

Reimplemented in QApplicationPrivate.

Definition at line 1708 of file qcoreapplication.cpp.

◆ createEventDispatcher()

void QCoreApplicationPrivate::createEventDispatcher ( )
virtual

Reimplemented in QApplicationPrivate, and QGuiApplicationPrivate.

Definition at line 533 of file qcoreapplication.cpp.

◆ deref()

void QCoreApplicationPrivate::deref ( )

Definition at line 2069 of file qcoreapplication.cpp.

◆ destroyEventDispatcher()

void QCoreApplicationPrivate::destroyEventDispatcher ( )
static

Definition at line 3310 of file qcoreapplication.cpp.

◆ eventDispatcherReady()

void QCoreApplicationPrivate::eventDispatcherReady ( )
virtual

Reimplemented in QGuiApplicationPrivate.

Definition at line 542 of file qcoreapplication.cpp.

◆ execCleanup()

void QCoreApplicationPrivate::execCleanup ( )

Definition at line 1475 of file qcoreapplication.cpp.

◆ handleQuitEvent()

bool QCoreApplicationPrivate::handleQuitEvent ( )
virtual

Handles a QEvent::Quit sent to the application.

Subclasses can override this to perform additional work, such as closing windows, before calling the base implementation, which exits the event loop.

Returns true if the quit was accepted, or false to reject it, in which case the event will be ignored.

Reimplemented in QApplicationPrivate, and QGuiApplicationPrivate.

Definition at line 2179 of file qcoreapplication.cpp.

◆ init()

void QCoreApplicationPrivate::init ( )

◆ initLocale()

void QCoreApplicationPrivate::initLocale ( )
static

Definition at line 563 of file qcoreapplication.cpp.

◆ isTranslatorInstalled()

bool QCoreApplicationPrivate::isTranslatorInstalled ( QTranslator * translator)
static

Definition at line 2393 of file qcoreapplication.cpp.

◆ lockThreadPostEventList()

QCoreApplicationPrivate::QPostEventListLocker QCoreApplicationPrivate::lockThreadPostEventList ( QObject * object)
static

Definition at line 1581 of file qcoreapplication.cpp.

◆ mainThread()

QThread * QCoreApplicationPrivate::mainThread ( )
static

Definition at line 548 of file qcoreapplication.cpp.

◆ notify_helper()

bool QCoreApplicationPrivate::notify_helper ( QObject * receiver,
QEvent * event )
static

Helper function called by QCoreApplicationPrivate::notify() and qapplication.cpp

Definition at line 1266 of file qcoreapplication.cpp.

◆ processCommandLineArguments()

void QCoreApplicationPrivate::processCommandLineArguments ( )

Definition at line 265 of file qcoreapplication.cpp.

◆ quit()

void QCoreApplicationPrivate::quit ( )
virtual

Reimplemented in QGuiApplicationPrivate.

Definition at line 2155 of file qcoreapplication.cpp.

◆ quitAutomatically()

void QCoreApplicationPrivate::quitAutomatically ( )

Definition at line 2094 of file qcoreapplication.cpp.

◆ ref()

void QCoreApplicationPrivate::ref ( )

Definition at line 2064 of file qcoreapplication.cpp.

◆ removePostedEvent()

void QCoreApplicationPrivate::removePostedEvent ( QEvent * event)
static

Removes event from the queue of posted events, and emits a warning message if appropriate.

Warning
This function can be really slow. Avoid using it, if possible.

\threadsafe

Definition at line 2011 of file qcoreapplication.cpp.

◆ sendPostedEvents()

void QCoreApplicationPrivate::sendPostedEvents ( QObject * receiver,
int event_type,
QThreadData * data )
static

Definition at line 1778 of file qcoreapplication.cpp.

◆ sendThroughApplicationEventFilters()

bool QCoreApplicationPrivate::sendThroughApplicationEventFilters ( QObject * receiver,
QEvent * event )

Definition at line 1221 of file qcoreapplication.cpp.

◆ sendThroughObjectEventFilters()

bool QCoreApplicationPrivate::sendThroughObjectEventFilters ( QObject * receiver,
QEvent * event )
static

Definition at line 1243 of file qcoreapplication.cpp.

◆ setEventSpontaneous()

void QCoreApplicationPrivate::setEventSpontaneous ( QEvent * e,
bool spontaneous )
inlinestatic

Definition at line 91 of file qcoreapplication_p.h.

◆ testAttribute()

bool QCoreApplicationPrivate::testAttribute ( uint flag)
inlinestatic

Definition at line 177 of file qcoreapplication_p.h.

Member Data Documentation

◆ aboutToQuitEmitted

bool QCoreApplicationPrivate::aboutToQuitEmitted = false

Definition at line 160 of file qcoreapplication_p.h.

◆ application_type

Type QCoreApplicationPrivate::application_type = Tty

Definition at line 154 of file qcoreapplication_p.h.

◆ argc

int& QCoreApplicationPrivate::argc

Definition at line 143 of file qcoreapplication_p.h.

◆ argv

char** QCoreApplicationPrivate::argv

Definition at line 144 of file qcoreapplication_p.h.

◆ attribs

Q_CONSTINIT uint QCoreApplicationPrivate::attribs
static
Initial value:

Definition at line 176 of file qcoreapplication_p.h.

◆ cachedApplicationFilePath

QString QCoreApplicationPrivate::cachedApplicationFilePath

Definition at line 180 of file qcoreapplication_p.h.

◆ eventDispatcher

Q_CONSTINIT QAbstractEventDispatcher * QCoreApplicationPrivate::eventDispatcher = nullptr
static

Definition at line 165 of file qcoreapplication_p.h.

◆ handlingQuitEvent

bool QCoreApplicationPrivate::handlingQuitEvent = false

Definition at line 162 of file qcoreapplication_p.h.

◆ in_exec

bool QCoreApplicationPrivate::in_exec = false

Definition at line 159 of file qcoreapplication_p.h.

◆ is_app_closing

Q_CONSTINIT bool QCoreApplicationPrivate::is_app_closing = false
static

Definition at line 167 of file qcoreapplication_p.h.

◆ is_app_running

Q_CONSTINIT bool QCoreApplicationPrivate::is_app_running = false
static

Definition at line 166 of file qcoreapplication_p.h.

◆ qmljs_debug_arguments

QString QCoreApplicationPrivate::qmljs_debug_arguments

Definition at line 181 of file qcoreapplication_p.h.

◆ quitLockRef

QAtomicInt QCoreApplicationPrivate::quitLockRef

Definition at line 101 of file qcoreapplication_p.h.

◆ setuidAllowed

Q_CONSTINIT bool QCoreApplicationPrivate::setuidAllowed = false
static

Definition at line 175 of file qcoreapplication_p.h.

◆ theMainThread

Q_CONSTINIT QBasicAtomicPointer< QThread > QCoreApplicationPrivate::theMainThread = Q_BASIC_ATOMIC_INITIALIZER(nullptr)
static

Definition at line 109 of file qcoreapplication_p.h.

◆ theMainThreadId

Q_CONSTINIT QBasicAtomicPointer< void > QCoreApplicationPrivate::theMainThreadId = Q_BASIC_ATOMIC_INITIALIZER(nullptr)
static

Definition at line 110 of file qcoreapplication_p.h.

◆ threadData_clean

bool QCoreApplicationPrivate::threadData_clean = false

Definition at line 161 of file qcoreapplication_p.h.

◆ translateMutex

QReadWriteLock QCoreApplicationPrivate::translateMutex

Definition at line 171 of file qcoreapplication_p.h.

◆ translators

QTranslatorList QCoreApplicationPrivate::translators

Definition at line 170 of file qcoreapplication_p.h.


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