qtlite: Fix build the source code with -no-feature-shortcut
Change-Id: If47149466a5da901e3eb6e6f2dcfb0a7816bc60b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This commit is contained in:
parent
b56cfce732
commit
1be070a2be
@ -185,11 +185,13 @@ QIconEngine * QXdgDesktopPortalTheme::createIconEngine(const QString &iconName)
|
|||||||
return d->baseTheme->createIconEngine(iconName);
|
return d->baseTheme->createIconEngine(iconName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(shortcut)
|
||||||
QList<QKeySequence> QXdgDesktopPortalTheme::keyBindings(QKeySequence::StandardKey key) const
|
QList<QKeySequence> QXdgDesktopPortalTheme::keyBindings(QKeySequence::StandardKey key) const
|
||||||
{
|
{
|
||||||
Q_D(const QXdgDesktopPortalTheme);
|
Q_D(const QXdgDesktopPortalTheme);
|
||||||
return d->baseTheme->keyBindings(key);
|
return d->baseTheme->keyBindings(key);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QString QXdgDesktopPortalTheme::standardButtonText(int button) const
|
QString QXdgDesktopPortalTheme::standardButtonText(int button) const
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,9 @@ public:
|
|||||||
|
|
||||||
QIconEngine *createIconEngine(const QString &iconName) const override;
|
QIconEngine *createIconEngine(const QString &iconName) const override;
|
||||||
|
|
||||||
|
#if QT_CONFIG(shortcut)
|
||||||
QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const override;
|
QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const override;
|
||||||
|
#endif
|
||||||
|
|
||||||
QString standardButtonText(int button) const override;
|
QString standardButtonText(int button) const override;
|
||||||
|
|
||||||
|
@ -166,6 +166,7 @@ namespace QTest
|
|||||||
Q_DECL_UNUSED inline static void keyPress(QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
|
Q_DECL_UNUSED inline static void keyPress(QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
|
||||||
{ keyEvent(Press, window, key, modifier, delay); }
|
{ keyEvent(Press, window, key, modifier, delay); }
|
||||||
|
|
||||||
|
#if QT_CONFIG(shortcut)
|
||||||
Q_DECL_UNUSED inline static void keySequence(QWindow *window, const QKeySequence &keySequence)
|
Q_DECL_UNUSED inline static void keySequence(QWindow *window, const QKeySequence &keySequence)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < keySequence.count(); ++i) {
|
for (int i = 0; i < keySequence.count(); ++i) {
|
||||||
@ -174,6 +175,7 @@ namespace QTest
|
|||||||
keyClick(window, key, modifiers);
|
keyClick(window, key, modifiers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef QT_WIDGETS_LIB
|
#ifdef QT_WIDGETS_LIB
|
||||||
static void simulateEvent(QWidget *widget, bool press, int code,
|
static void simulateEvent(QWidget *widget, bool press, int code,
|
||||||
@ -305,6 +307,7 @@ namespace QTest
|
|||||||
inline static void keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
|
inline static void keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1)
|
||||||
{ keyEvent(Click, widget, key, modifier, delay); }
|
{ keyEvent(Click, widget, key, modifier, delay); }
|
||||||
|
|
||||||
|
#if QT_CONFIG(shortcut)
|
||||||
inline static void keySequence(QWidget *widget, const QKeySequence &keySequence)
|
inline static void keySequence(QWidget *widget, const QKeySequence &keySequence)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < keySequence.count(); ++i) {
|
for (int i = 0; i < keySequence.count(); ++i) {
|
||||||
@ -313,6 +316,7 @@ namespace QTest
|
|||||||
keyClick(widget, key, modifiers);
|
keyClick(widget, key, modifiers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // QT_WIDGETS_LIB
|
#endif // QT_WIDGETS_LIB
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user