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>.
|
#include "qcoreapplication.h"
#include "qcoreapplication_p.h"
#include "qabstracteventdispatcher.h"
#include "qcoreevent.h"
#include "qcoreevent_p.h"
#include "qeventloop.h"
#include "qmetaobject.h"
#include <private/qproperty_p.h>
#include "qcorecmdlineargs_p.h"
#include <qdatastream.h>
#include <qdebug.h>
#include <qdir.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qmutex.h>
#include <private/qloggingregistry_p.h>
#include <qscopeguard.h>
#include <qstandardpaths.h>
#include <qthread.h>
#include <qthreadstorage.h>
#include <private/qthread_p.h>
#include <qlibraryinfo.h>
#include <qpointer.h>
#include <qvarlengtharray.h>
#include <private/qfactoryloader_p.h>
#include <private/qfunctions_p.h>
#include <private/qlocale_p.h>
#include <private/qlocking_p.h>
#include <private/qhooks_p.h>
#include <stdlib.h>
#include <qtcore_tracepoints_p.h>
#include <algorithm>
#include <memory>
#include <string>
#include "moc_qcoreapplication.cpp"
Go to the source code of this file.
Classes | |
struct | QCoreApplicationData |
Typedefs | |
typedef QList< QtStartUpFunction > | QStartUpFuncList |
typedef QList< QtCleanUpFunction > | QVFuncList |
Functions | |
Q_TRACE_PREFIX (qtcore, "#include <qcoreevent.h>") | |
Q_TRACE_METADATA (qtcore, "ENUM { AUTO, RANGE User ... MaxUser } QEvent::Type;") | |
Q_TRACE_POINT (qtcore, QCoreApplication_postEvent_entry, QObject *receiver, QEvent *event, QEvent::Type type) | |
Q_TRACE_POINT (qtcore, QCoreApplication_postEvent_exit) | |
Q_TRACE_POINT (qtcore, QCoreApplication_postEvent_event_compressed, QObject *receiver, QEvent *event) | |
Q_TRACE_POINT (qtcore, QCoreApplication_postEvent_event_posted, QObject *receiver, QEvent *event, QEvent::Type type) | |
Q_TRACE_POINT (qtcore, QCoreApplication_sendEvent, QObject *receiver, QEvent *event, QEvent::Type type) | |
Q_TRACE_POINT (qtcore, QCoreApplication_sendSpontaneousEvent, QObject *receiver, QEvent *event, QEvent::Type type) | |
Q_TRACE_POINT (qtcore, QCoreApplication_notify_entry, QObject *receiver, QEvent *event, QEvent::Type type) | |
Q_TRACE_POINT (qtcore, QCoreApplication_notify_exit, bool consumed, bool filtered) | |
void | qt_startup_hook () |
void | qAddPreRoutine (QtStartUpFunction p) |
void | qAddPostRoutine (QtCleanUpFunction p) |
void | qRemovePostRoutine (QtCleanUpFunction p) |
static void | qt_call_pre_routines () |
void Q_CORE_EXPORT | qt_call_post_routines () |
qsizetype | qGlobalPostedEventsCount () |
QString | qAppName () |
void | Q_TRACE_INSTRUMENT (qtcore) QCoreApplicationPrivate |
static bool | doNotify (QObject *, QEvent *) |
static void | replacePercentN (QString *result, int n) |
QString | qtTrId (const char *id, int n) |
static QString | qAppFileName () |
Variables | |
static Q_CONSTINIT QBasicMutex | globalRoutinesMutex |
static Q_CONSTINIT bool | preRoutinesCalled = false |
static Q_CONSTINIT bool | quitLockEnabled = true |
typedef QList<QtStartUpFunction> QStartUpFuncList |
Definition at line 252 of file qcoreapplication.cpp.
typedef QList<QtCleanUpFunction> QVFuncList |
Definition at line 254 of file qcoreapplication.cpp.
Definition at line 1241 of file qcoreapplication.cpp.
References QCoreApplicationPrivate::checkReceiverThread(), false, QObject::isWidgetType(), QCoreApplicationPrivate::notify_helper(), Q_ASSERT, and qWarning.
Referenced by QQmlPropertyCapture::captureProperty(), QQmlPropertyCapture::captureProperty(), QQmlNotifierEndpoint::connect(), and QCoreApplication::notify().
void Q_TRACE_INSTRUMENT | ( | qtcore | ) |
Definition at line 834 of file qcoreapplication.cpp.
References QCoreApplicationPrivate::appName(), QCoreApplicationPrivate::appVersion(), QCoreApplicationPrivate::createEventDispatcher(), QCoreApplicationPrivate::eventDispatcher, QCoreApplicationPrivate::eventDispatcherReady(), i, QtPrivate::initBindingStatusThreadId(), QCoreApplicationPrivate::initConsole(), QCoreApplicationPrivate::initLocale(), QLoggingRegistry::instance(), QCoreApplicationPrivate::is_app_running, j, QBasicAtomicPointer< X >::loadRelaxed(), pool, QCoreApplicationPrivate::processCommandLineArguments(), Q_ASSERT, Q_ASSERT_X, Q_TRACE_SCOPE, Q_UNLIKELY, qt_call_pre_routines(), qt_noop(), qt_startup_hook(), qtHookData, QHooks::Startup, and QObjectPrivate::threadData.
Q_TRACE_METADATA | ( | qtcore | , |
"ENUM { AUTO, RANGE User ... MaxUser } QEvent::Type;" | ) |
Q_TRACE_POINT | ( | qtcore | , |
QCoreApplication_notify_entry | , | ||
QObject * | receiver, | ||
QEvent * | event, | ||
QEvent::Type | type ) |
Q_TRACE_POINT | ( | qtcore | , |
QCoreApplication_notify_exit | , | ||
bool | consumed, | ||
bool | filtered ) |
Q_TRACE_POINT | ( | qtcore | , |
QCoreApplication_postEvent_entry | , | ||
QObject * | receiver, | ||
QEvent * | event, | ||
QEvent::Type | type ) |
Q_TRACE_POINT | ( | qtcore | , |
QCoreApplication_postEvent_event_compressed | , | ||
QObject * | receiver, | ||
QEvent * | event ) |
Q_TRACE_POINT | ( | qtcore | , |
QCoreApplication_postEvent_event_posted | , | ||
QObject * | receiver, | ||
QEvent * | event, | ||
QEvent::Type | type ) |
Q_TRACE_POINT | ( | qtcore | , |
QCoreApplication_postEvent_exit | ) |
Q_TRACE_POINT | ( | qtcore | , |
QCoreApplication_sendEvent | , | ||
QObject * | receiver, | ||
QEvent * | event, | ||
QEvent::Type | type ) |
Q_TRACE_POINT | ( | qtcore | , |
QCoreApplication_sendSpontaneousEvent | , | ||
QObject * | receiver, | ||
QEvent * | event, | ||
QEvent::Type | type ) |
Q_TRACE_PREFIX | ( | qtcore | , |
"#include <qcoreevent.h>" | ) |
|
related |
Definition at line 282 of file qcoreapplication.cpp.
Referenced by QFontLoaderFonts::QFontLoaderFonts(), QNetworkInformationPrivate::QNetworkInformationPrivate(), QQmlDebugServerImpl::QQmlDebugServerImpl(), QQuickRenderControlPrivate::QQuickRenderControlPrivate(), QWindowsClipboard::QWindowsClipboard(), QXcbEventQueue::QXcbEventQueue(), build_scale_table(), createTemporaryItemCopy(), QQuickShapeGenericRenderer::endSync(), QPlatformPrinterSupportPlugin::get(), QBrushPatternImageCache::init(), init_ptr(), QtQuickControls2NativeStylePlugin::initializeEngine(), install_instance_cleanuper(), QSGRenderLoop::instance(), q_QFontLoaderFontsAddReset(), qLibraryInit(), and QErrorMessage::qtHandler().
void qAddPreRoutine | ( | QtStartUpFunction | p | ) |
Adds a global routine that will be called from the QCoreApplication constructor. The public API is Q_COREAPP_STARTUP_FUNCTION.
Definition at line 265 of file qcoreapplication.cpp.
References globalRoutinesMutex, QCoreApplication::instance(), list, QList< T >::prepend(), preRoutinesCalled, and Q_ASSERT.
Referenced by QFontLoaderFonts::QFontLoaderFonts().
|
static |
Definition at line 2464 of file qcoreapplication.cpp.
References QFile::decodeName(), QByteArray::fromRawData(), PATH_MAX, qstrlen(), and qt_readlink().
QString qAppName | ( | ) |
Definition at line 574 of file qcoreapplication.cpp.
Referenced by WindowCreationData::create(), qRequireVersion(), and sm_performSaveYourself().
qsizetype qGlobalPostedEventsCount | ( | ) |
Definition at line 348 of file qcoreapplication.cpp.
References QThreadData::current(), QList< T >::size(), and QPostEventList::startOffset.
|
related |
Definition at line 291 of file qcoreapplication.cpp.
Referenced by QFontLoaderFonts::~QFontLoaderFonts(), and QtQuickControls2NativeStylePlugin::~QtQuickControls2NativeStylePlugin().
void Q_CORE_EXPORT qt_call_post_routines | ( | ) |
Definition at line 320 of file qcoreapplication.cpp.
References forever, globalRoutinesMutex, QList< T >::isEmpty(), list, and qSwap().
Referenced by QApplication::~QApplication(), QCoreApplication::~QCoreApplication(), QGuiApplication::~QGuiApplication(), QCommandLineParser::process(), QCommandLineParserPrivate::showHelp(), and QCommandLineParser::showVersion().
|
static |
Definition at line 300 of file qcoreapplication.cpp.
References globalRoutinesMutex, list, and preRoutinesCalled.
Referenced by Q_TRACE_INSTRUMENT().
void qt_startup_hook | ( | ) |
Definition at line 248 of file qcoreapplication.cpp.
Referenced by Q_TRACE_INSTRUMENT().
QString qtTrId | ( | const char * | id, |
int | n ) |
Definition at line 2388 of file qcoreapplication.cpp.
References QCoreApplication::translate().
Referenced by QQmlTranslation::QsTrIdData::translate(), and QV4::ExecutableCompilationUnit::translateFrom().
Definition at line 2296 of file qcoreapplication.cpp.
References QString::arg(), fmt, QString::replace(), and QString::size().
Referenced by QCoreApplication::translate().
|
static |
Definition at line 256 of file qcoreapplication.cpp.
Referenced by QCoreApplication::qAddPostRoutine(), qAddPreRoutine(), QCoreApplication::qRemovePostRoutine(), qt_call_post_routines(), and qt_call_pre_routines().
|
static |
Definition at line 257 of file qcoreapplication.cpp.
Referenced by QCoreApplication::~QCoreApplication(), qAddPreRoutine(), and qt_call_pre_routines().
|
static |
Definition at line 394 of file qcoreapplication.cpp.