Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qshortcut.cpp File Reference
#include "qshortcut.h"
#include "qshortcut_p.h"
#include <qevent.h>
#include <qguiapplication.h>
#include <qwindow.h>
#include <private/qguiapplication_p.h>
#include <qpa/qplatformmenu.h>
#include "moc_qshortcut.cpp"
+ Include dependency graph for qshortcut.cpp:

Go to the source code of this file.

Macros

#define QAPP_CHECK(functionName)
 

Functions

static bool simpleContextMatcher (QObject *object, Qt::ShortcutContext context)
 

Macro Definition Documentation

◆ QAPP_CHECK

#define QAPP_CHECK (   functionName)
Value:
if (Q_UNLIKELY(!qApp)) { \
qWarning("QShortcut: Initialize QGuiApplication before calling '" functionName "'."); \
return; \
}
#define Q_UNLIKELY(x)
#define qApp

Definition at line 15 of file qshortcut.cpp.

Function Documentation

◆ simpleContextMatcher()

static bool simpleContextMatcher ( QObject object,
Qt::ShortcutContext  context 
)
static

Definition at line 99 of file qshortcut.cpp.

References Qt::ApplicationActive, Qt::ApplicationShortcut, QGuiApplication::applicationState(), context, QGuiApplication::focusWindow(), qobject_cast< const QWindow * >(), Qt::WidgetWithChildrenShortcut, window(), and Qt::WindowShortcut.

Referenced by QShortcutPrivate::contextMatcher().

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