Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qcoreapplication.h File Reference
#include <QtCore/qglobal.h>
#include <QtCore/qstring.h>
#include <QtCore/qcoreevent.h>
#include <QtCore/qdeadlinetimer.h>
#include <QtCore/qeventloop.h>
#include <QtCore/qobject.h>
#include <QtCore/qnativeinterface.h>
#include <QtCore/qdebug.h>
#include <QtCore/qcoreapplication_platform.h>
+ Include dependency graph for qcoreapplication.h:

Go to the source code of this file.

Classes

class  QCoreApplication
 \inmodule QtCore More...
 

Macros

#define qApp   QCoreApplication::instance()
 
#define Q_DECLARE_TR_FUNCTIONS(context)
 
#define Q_COREAPP_STARTUP_FUNCTION(AFUNC)
 

Typedefs

typedef void(* QtStartUpFunction) ()
 
typedef void(* QtCleanUpFunction) ()
 

Functions

Q_CORE_EXPORT void qAddPreRoutine (QtStartUpFunction)
 
Q_CORE_EXPORT void qAddPostRoutine (QtCleanUpFunction)
 
Q_CORE_EXPORT void qRemovePostRoutine (QtCleanUpFunction)
 
Q_CORE_EXPORT QString qAppName ()
 

Macro Definition Documentation

◆ Q_COREAPP_STARTUP_FUNCTION

#define Q_COREAPP_STARTUP_FUNCTION (   AFUNC)
Value:
static void AFUNC ## _ctor_function() { \
qAddPreRoutine(AFUNC); \
} \
Q_CONSTRUCTOR_FUNCTION(AFUNC ## _ctor_function)

Definition at line 250 of file qcoreapplication.h.

◆ Q_DECLARE_TR_FUNCTIONS

#define Q_DECLARE_TR_FUNCTIONS (   context)
Value:
public: \
static inline QString tr(const char *sourceText, const char *disambiguation = nullptr, int n = -1) \
{ return QCoreApplication::translate(#context, sourceText, disambiguation, n); } \
private:
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
static void * context
GLfloat n
#define tr(X)

Definition at line 236 of file qcoreapplication.h.

◆ qApp

#define qApp   QCoreApplication::instance()

Definition at line 42 of file qcoreapplication.h.

Typedef Documentation

◆ QtCleanUpFunction

typedef void(* QtCleanUpFunction) ()

Definition at line 243 of file qcoreapplication.h.

◆ QtStartUpFunction

typedef void(* QtStartUpFunction) ()

Definition at line 242 of file qcoreapplication.h.

Function Documentation

◆ qAddPostRoutine()

◆ qAddPreRoutine()

Q_CORE_EXPORT 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 254 of file qcoreapplication.cpp.

References globalRoutinesMutex, QCoreApplication::instance(), list, QList< T >::prepend(), preRoutinesCalled, and Q_ASSERT.

Referenced by QFontLoaderFonts::QFontLoaderFonts().

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

◆ qAppName()

Q_CORE_EXPORT QString qAppName ( )

Definition at line 232 of file qcoreapplication.cpp.

Referenced by WindowCreationData::create(), qRequireVersion(), and sm_performSaveYourself().

+ Here is the caller graph for this function:

◆ qRemovePostRoutine()

Q_CORE_EXPORT void qRemovePostRoutine ( QtCleanUpFunction  p)
related

Definition at line 280 of file qcoreapplication.cpp.

Referenced by QFontLoaderFonts::~QFontLoaderFonts(), and QtQuickControls2NativeStylePlugin::~QtQuickControls2NativeStylePlugin().

+ Here is the caller graph for this function: