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
qcoreapplication.h File Reference

(762de4f590ad58581c2b40de289b309f95943964)

#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/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 275 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
static const QString context()
Definition java.cpp:398
GLfloat n
#define tr(X)

Definition at line 261 of file qcoreapplication.h.

◆ qApp

#define qApp   QCoreApplication::instance()

Definition at line 37 of file qcoreapplication.h.

Typedef Documentation

◆ QtCleanUpFunction

typedef void(* QtCleanUpFunction) ()

Definition at line 268 of file qcoreapplication.h.

◆ QtStartUpFunction

typedef void(* QtStartUpFunction) ()

Definition at line 267 of file qcoreapplication.h.

Function Documentation

◆ qAddPostRoutine()

void qAddPostRoutine ( QtCleanUpFunction p)
related

Definition at line 305 of file qcoreapplication.cpp.

◆ qAddPreRoutine()

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

References preRoutinesCalled.

◆ qAppName()

QString qAppName ( )

Definition at line 549 of file qcoreapplication.cpp.

◆ qRemovePostRoutine()

void qRemovePostRoutine ( QtCleanUpFunction p)
related

Definition at line 314 of file qcoreapplication.cpp.