summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp2
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h2
-rw-r--r--src/testlib/qtestkeyboard.h4
3 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
index f07ca3f098..fb65f6d909 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
@@ -185,11 +185,13 @@ QIconEngine * QXdgDesktopPortalTheme::createIconEngine(const QString &iconName)
return d->baseTheme->createIconEngine(iconName);
}
+#if QT_CONFIG(shortcut)
QList<QKeySequence> QXdgDesktopPortalTheme::keyBindings(QKeySequence::StandardKey key) const
{
Q_D(const QXdgDesktopPortalTheme);
return d->baseTheme->keyBindings(key);
}
+#endif
QString QXdgDesktopPortalTheme::standardButtonText(int button) const
{
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
index b72e676419..4c5f474595 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
@@ -76,7 +76,9 @@ public:
QIconEngine *createIconEngine(const QString &iconName) const override;
+#if QT_CONFIG(shortcut)
QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const override;
+#endif
QString standardButtonText(int button) const override;
diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h
index 63501ffb1e..e8a7e0d5f5 100644
--- a/src/testlib/qtestkeyboard.h
+++ b/src/testlib/qtestkeyboard.h
@@ -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)
{ keyEvent(Press, window, key, modifier, delay); }
+#if QT_CONFIG(shortcut)
Q_DECL_UNUSED inline static void keySequence(QWindow *window, const QKeySequence &keySequence)
{
for (int i = 0; i < keySequence.count(); ++i) {
@@ -174,6 +175,7 @@ namespace QTest
keyClick(window, key, modifiers);
}
}
+#endif
#ifdef QT_WIDGETS_LIB
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)
{ keyEvent(Click, widget, key, modifier, delay); }
+#if QT_CONFIG(shortcut)
inline static void keySequence(QWidget *widget, const QKeySequence &keySequence)
{
for (int i = 0; i < keySequence.count(); ++i) {
@@ -313,6 +316,7 @@ namespace QTest
keyClick(widget, key, modifiers);
}
}
+#endif
#endif // QT_WIDGETS_LIB