![]() |
Qt 6.x
The Qt SDK
|
#include <qcoreapplication_p.h>
Classes | |
struct | QPostEventListLocker |
Public Types | |
enum | Type { Tty , Gui } |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
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 bool | threadRequiresCoreApplication () |
static void | sendPostedEvents (QObject *receiver, int event_type, QThreadData *data) |
static void | checkReceiverThread (QObject *receiver) |
static QPostEventListLocker | lockThreadPostEventList (QObject *object) |
static bool | isTranslatorInstalled (QTranslator *translator) |
static void | setApplicationFilePath (const QString &path) |
static void | clearApplicationFilePath () |
static bool | testAttribute (uint flag) |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
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 type=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 type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
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) |
Static Public Attributes | |
static QBasicAtomicPointer< QThread > | theMainThread = Q_BASIC_ATOMIC_INITIALIZER(nullptr) |
static QString * | cachedApplicationFilePath = nullptr |
static QAbstractEventDispatcher * | eventDispatcher = nullptr |
static bool | is_app_running = false |
static bool | is_app_closing = false |
static bool | setuidAllowed = false |
static uint | attribs |
Definition at line 46 of file qcoreapplication_p.h.
Enumerator | |
---|---|
Tty | |
Gui |
Definition at line 54 of file qcoreapplication_p.h.
QCoreApplicationPrivate::QCoreApplicationPrivate | ( | int & | aargc, |
char ** | aargv | ||
) |
Definition at line 415 of file qcoreapplication.cpp.
References argc, argv, QThread::currentThread(), is_app_closing, QBasicAtomicPointer< X >::loadAcquire(), Q_UNLIKELY, qFatal, QT_MAKE_CHECKED_ARRAY_ITERATOR, qWarning, setuidAllowed, and theMainThread.
QCoreApplicationPrivate::~QCoreApplicationPrivate | ( | ) |
Definition at line 462 of file qcoreapplication.cpp.
References cleanupThreadData(), and clearApplicationFilePath().
Definition at line 548 of file qcoreapplication.cpp.
References QCoreApplication::applicationFilePath(), QDir::canonicalPath(), QFile::exists(), QString::lastIndexOf(), and QString::truncate().
QString QCoreApplicationPrivate::appName | ( | ) | const |
Definition at line 145 of file qcoreapplication.cpp.
References argv, QString::fromLocal8Bit(), QString::isEmpty(), and QStringLiteral.
Referenced by Q_TRACE_INSTRUMENT(), and qt_mac_applicationName().
QString QCoreApplicationPrivate::appVersion | ( | ) | const |
Definition at line 158 of file qcoreapplication.cpp.
References context, and QStringLiteral.
Referenced by Q_TRACE_INSTRUMENT().
|
virtual |
Reimplemented in QGuiApplicationPrivate.
Definition at line 2069 of file qcoreapplication.cpp.
References QCoreApplication::quitLockEnabled.
Referenced by QGuiApplicationPrivate::canQuitAutomatically().
|
static |
Definition at line 189 of file qcoreapplication.cpp.
References function, and qWarning.
Referenced by QCoreApplication::exec(), QCoreApplication::installTranslator(), and QCoreApplication::removeTranslator().
Definition at line 531 of file qcoreapplication.cpp.
References QString::asprintf(), QThread::currentThread(), QByteArray::data(), QObject::objectName, Q_ASSERT_X, Q_UNUSED, qUtf16Printable, QObject::thread(), and QString::toLocal8Bit().
Referenced by doNotify(), and QApplication::notify().
void QCoreApplicationPrivate::cleanupThreadData | ( | ) |
Definition at line 477 of file qcoreapplication.cpp.
References QBasicAtomicPointer< X >::loadRelaxed(), QObjectPrivate::threadData, and threadData_clean.
Referenced by ~QCoreApplicationPrivate(), and QGuiApplicationPrivate::~QGuiApplicationPrivate().
|
inlinestatic |
Definition at line 144 of file qcoreapplication_p.h.
Referenced by ~QCoreApplicationPrivate(), and QCoreApplication::applicationFilePath().
|
virtual |
Reimplemented in QGuiApplicationPrivate, and QApplicationPrivate.
Definition at line 503 of file qcoreapplication.cpp.
References QThreadData::current(), eventDispatcher, Q_ASSERT, and QObject::setParent().
Referenced by Q_TRACE_INSTRUMENT().
void QCoreApplicationPrivate::deref | ( | ) |
Definition at line 2061 of file qcoreapplication.cpp.
References QCoreApplication::quitLockEnabled.
|
virtual |
Reimplemented in QGuiApplicationPrivate.
Definition at line 512 of file qcoreapplication.cpp.
Referenced by Q_TRACE_INSTRUMENT().
void QCoreApplicationPrivate::execCleanup | ( | ) |
Definition at line 1473 of file qcoreapplication.cpp.
References QEvent::DeferredDelete, QThreadData::quitNow, and QCoreApplication::sendPostedEvents().
void QCoreApplicationPrivate::init | ( | ) |
void QCoreApplicationPrivate::initConsole | ( | ) |
Definition at line 569 of file qcoreapplication.cpp.
References Qt::CaseInsensitive, QString::compare(), QString::isEmpty(), out, Q_ASSERT, and qEnvironmentVariable().
Referenced by Q_TRACE_INSTRUMENT().
|
static |
Definition at line 600 of file qcoreapplication.cpp.
References at, QByteArray::constData(), dot(), QByteArray::indexOf(), QByteArray::isEmpty(), Q_LIKELY, qstrcmp(), qstricmp(), qWarning, and QByteArray::truncate().
Referenced by Q_TRACE_INSTRUMENT().
|
static |
Definition at line 2350 of file qcoreapplication.cpp.
References d.
Referenced by QTranslatorPrivate::clear().
|
static |
Definition at line 1574 of file qcoreapplication.cpp.
References QThreadData::current(), QObjectPrivate::get(), QCoreApplicationPrivate::QPostEventListLocker::locker, QPostEventList::mutex, QThreadData::postEventList, Q_ASSERT, QCoreApplicationPrivate::QPostEventListLocker::threadData, and QObjectPrivate::threadData.
Referenced by QCoreApplication::postEvent(), and QCoreApplication::removePostedEvents().
|
static |
Definition at line 517 of file qcoreapplication.cpp.
References QBasicAtomicPointer< X >::loadRelaxed(), Q_ASSERT, and theMainThread.
Referenced by QFactoryLoader::QFactoryLoader(), QThreadPrivate::createEventDispatcher(), QFactoryLoader::instance(), and QApplicationPrivate::notify_helper().
Helper function called by QCoreApplicationPrivate::notify() and qapplication.cpp
Definition at line 1265 of file qcoreapplication.cpp.
References QObject::event(), Q_TRACE, Q_TRACE_EXIT, and QObject::thread().
Referenced by doNotify().
void QCoreApplicationPrivate::processCommandLineArguments | ( | ) |
Definition at line 206 of file qcoreapplication.cpp.
References arg, argc, argv, QString::fromLocal8Bit(), i, j, and qmljs_debug_arguments.
Referenced by Q_TRACE_INSTRUMENT().
|
inline |
Definition at line 164 of file qcoreapplication_p.h.
Referenced by QQmlDebugConnectorParams::QQmlDebugConnectorParams().
|
virtual |
Reimplemented in QGuiApplicationPrivate.
Definition at line 2138 of file qcoreapplication.cpp.
References QThread::currentThread(), QCoreApplication::postEvent(), QEvent::Quit, and QCoreApplication::sendEvent().
Referenced by QGuiApplicationPrivate::quit().
void QCoreApplicationPrivate::quitAutomatically | ( | ) |
Definition at line 2080 of file qcoreapplication.cpp.
References QCoreApplication::postEvent(), and QEvent::Quit.
Referenced by QGuiApplicationPrivate::maybeLastWindowClosed().
void QCoreApplicationPrivate::ref | ( | ) |
Definition at line 2056 of file qcoreapplication.cpp.
Removes event from the queue of posted events, and emits a warning message if appropriate.
\threadsafe
Definition at line 2010 of file qcoreapplication.cpp.
References QThreadData::current(), qDebug, and qWarning.
Referenced by QEvent::~QEvent().
|
static |
Definition at line 1782 of file qcoreapplication.cpp.
References QSet< T >::begin(), QEvent::DeferredDelete, e, QPostEvent::event, i, it, Q_ASSERT, qScopeGuard(), qWarning, QPostEvent::receiver, QCoreApplication::sendEvent(), and QEvent::type().
Referenced by QEventDispatcherUNIX::processEvents(), QEventDispatcherWin32::sendPostedEvents(), and QCoreApplication::sendPostedEvents().
bool QCoreApplicationPrivate::sendThroughApplicationEventFilters | ( | QObject * | receiver, |
QEvent * | event | ||
) |
Definition at line 1220 of file qcoreapplication.cpp.
References i, Q_ASSERT, qWarning, and QObject::thread().
Referenced by QApplicationPrivate::notify_helper().
|
static |
Definition at line 1242 of file qcoreapplication.cpp.
References i, QCoreApplication::instance(), and qWarning.
Referenced by QApplicationPrivate::notify_helper().
Definition at line 2380 of file qcoreapplication.cpp.
References cachedApplicationFilePath.
Referenced by QCoreApplication::applicationFilePath().
|
inlinestatic |
Definition at line 89 of file qcoreapplication_p.h.
References e.
Referenced by QWidgetWindow::handleMouseEvent(), and QApplicationPrivate::notify_helper().
|
inlinestatic |
Definition at line 160 of file qcoreapplication_p.h.
Referenced by QWidget::create(), QApplicationPrivate::handlePaletteChanged(), QApplicationPrivate::setActiveWindow(), and QCoreApplication::testAttribute().
|
static |
Definition at line 523 of file qcoreapplication.cpp.
References QThreadData::current().
Referenced by QEventLoop::QEventLoop(), and QApplicationPrivate::notify_helper().
bool QCoreApplicationPrivate::aboutToQuitEmitted |
Definition at line 150 of file qcoreapplication_p.h.
Referenced by QWindowsContext::windowsProc().
QCoreApplicationPrivate::Type QCoreApplicationPrivate::application_type |
Definition at line 139 of file qcoreapplication_p.h.
Referenced by QApplicationPrivate::QApplicationPrivate(), QGuiApplicationPrivate::QGuiApplicationPrivate(), QApplicationPrivate::init(), and QApplicationPrivate::initialize().
int& QCoreApplicationPrivate::argc |
Definition at line 124 of file qcoreapplication_p.h.
Referenced by QCoreApplicationPrivate(), QGuiApplicationPrivate::createPlatformIntegration(), QApplicationPrivate::process_cmdline(), processCommandLineArguments(), and Q_TRACE_INSTRUMENT().
char** QCoreApplicationPrivate::argv |
Definition at line 125 of file qcoreapplication_p.h.
Referenced by QCoreApplicationPrivate(), appName(), QGuiApplicationPrivate::createPlatformIntegration(), QApplicationPrivate::process_cmdline(), processCommandLineArguments(), and Q_TRACE_INSTRUMENT().
|
static |
Definition at line 159 of file qcoreapplication_p.h.
Referenced by QCoreApplication::setAttribute().
QString QCoreApplicationPrivate::cachedApplicationDirPath |
Definition at line 141 of file qcoreapplication_p.h.
Definition at line 142 of file qcoreapplication_p.h.
Referenced by QCoreApplication::applicationFilePath(), and setApplicationFilePath().
|
static |
Definition at line 153 of file qcoreapplication_p.h.
Referenced by QCoreApplication::QCoreApplication(), QGuiApplication::QGuiApplication(), QCoreApplication::~QCoreApplication(), createEventDispatcher(), QGuiApplicationPrivate::createEventDispatcher(), QApplicationPrivate::init(), QWaylandCompositorPrivate::init(), QtWaylandClient::QWaylandIntegration::initialize(), and Q_TRACE_INSTRUMENT().
bool QCoreApplicationPrivate::in_exec |
Definition at line 149 of file qcoreapplication_p.h.
Referenced by QGuiApplicationPrivate::maybeLastWindowClosed().
|
static |
Definition at line 155 of file qcoreapplication_p.h.
Referenced by QCoreApplicationPrivate(), QApplication::~QApplication(), QCoreApplication::~QCoreApplication(), QGraphicsScene::~QGraphicsScene(), QGuiApplicationPrivate::~QGuiApplicationPrivate(), QWidget::~QWidget(), QCoreApplication::closingDown(), QPlatformClipboard::emitChanged(), QGuiApplicationPrivate::handlePaletteChanged(), QApplicationPrivate::handlePaletteChanged(), QCoreApplication::notify(), QApplication::notify(), QApplication::setFont(), QApplication::setStyle(), and QGuiApplication::setWindowIcon().
|
static |
Definition at line 154 of file qcoreapplication_p.h.
Referenced by QApplication::~QApplication(), QCoreApplication::~QCoreApplication(), QGuiApplicationPrivate::~QGuiApplicationPrivate(), QGuiApplicationPrivate::handlePaletteChanged(), QApplicationPrivate::handlePaletteChanged(), QApplicationPrivate::initialize(), Q_TRACE_INSTRUMENT(), Q_TRACE_INSTRUMENT(), QWindowsContext::registerTouchWindows(), QCoreApplication::setAttribute(), QApplication::setFont(), QApplication::setStyle(), QGuiApplication::setWindowIcon(), and QCoreApplication::startingUp().
QString QCoreApplicationPrivate::qmljs_debug_arguments |
Definition at line 163 of file qcoreapplication_p.h.
Referenced by processCommandLineArguments().
QAtomicInt QCoreApplicationPrivate::quitLockRef |
Definition at line 98 of file qcoreapplication_p.h.
|
static |
Definition at line 158 of file qcoreapplication_p.h.
Referenced by QCoreApplicationPrivate(), QCoreApplication::isSetuidAllowed(), and QCoreApplication::setSetuidAllowed().
|
static |
Definition at line 105 of file qcoreapplication_p.h.
Referenced by QCoreApplicationPrivate(), QCoreApplicationData::~QCoreApplicationData(), QThreadData::~QThreadData(), QThreadData::current(), QCoreApplication::eventDispatcher(), QCoreApplication::installNativeEventFilter(), mainThread(), and QCoreApplication::setEventDispatcher().
bool QCoreApplicationPrivate::threadData_clean |
Definition at line 151 of file qcoreapplication_p.h.
Referenced by cleanupThreadData().
QReadWriteLock QCoreApplicationPrivate::translateMutex |
Definition at line 135 of file qcoreapplication_p.h.
QTranslatorList QCoreApplicationPrivate::translators |
Definition at line 134 of file qcoreapplication_p.h.