aboutsummaryrefslogtreecommitdiff
path: root/autotests/kstandardshortcuttest.cpp
diff options
context:
space:
mode:
authorDavid Redondo <kde@david-redondo.de>2020-07-03 09:20:28 +0200
committerDavid Redondo <kde@david-redondo.de>2020-07-14 07:03:08 +0000
commitf0cf93864bd7b72377aebead108dd0da8749ba93 (patch)
treeeed7b1deef249c8ca9094921b11c14cef3c46d30 /autotests/kstandardshortcuttest.cpp
parent538cf784734434e5478f7b3dab8af131304dd656 (diff)
downloadkconfig-f0cf93864bd7b72377aebead108dd0da8749ba93.tar.gz
kconfig-f0cf93864bd7b72377aebead108dd0da8749ba93.tar.bz2
Fix test when build with EXCLUDE_DEPRECATED_BEFORE_AND_AT=CURRENT
Diffstat (limited to 'autotests/kstandardshortcuttest.cpp')
-rw-r--r--autotests/kstandardshortcuttest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/autotests/kstandardshortcuttest.cpp b/autotests/kstandardshortcuttest.cpp
index 8c4df027..e2447037 100644
--- a/autotests/kstandardshortcuttest.cpp
+++ b/autotests/kstandardshortcuttest.cpp
@@ -47,6 +47,12 @@ void KStandardShortcutTest::testFindStdAccel()
void KStandardShortcutTest::testFindByName()
{
for (int i = KStandardShortcut::AccelNone + 1; i < KStandardShortcut::StandardShortcutCount; ++i) {
+#if !KCONFIGGUI_BUILD_DEPRECATED_SINCE(5, 39)
+ // building without deprecated enumerator, so have to skip hole in values list
+ if (i == KStandardShortcut::SaveOptions_DEPRECATED_DO_NOT_USE) {
+ continue;
+ }
+#endif
const auto id = static_cast<KStandardShortcut::StandardShortcut>(i);
QCOMPARE(id, KStandardShortcut::findByName(KStandardShortcut::name(id)));
}