diff options
Diffstat (limited to 'autotests')
| -rw-r--r-- | autotests/kstandardshortcuttest.cpp | 7 | ||||
| -rw-r--r-- | autotests/kstandardshortcuttest.h | 1 | 
2 files changed, 8 insertions, 0 deletions
| diff --git a/autotests/kstandardshortcuttest.cpp b/autotests/kstandardshortcuttest.cpp index 53a724f9..8c4df027 100644 --- a/autotests/kstandardshortcuttest.cpp +++ b/autotests/kstandardshortcuttest.cpp @@ -44,3 +44,10 @@ void KStandardShortcutTest::testFindStdAccel()      QCOMPARE(KStandardShortcut::find(QString("Ctrl+Shift+Alt+G")), KStandardShortcut::AccelNone);  } +void KStandardShortcutTest::testFindByName() +{ +    for (int i = KStandardShortcut::AccelNone + 1; i < KStandardShortcut::StandardShortcutCount; ++i) { +        const auto id = static_cast<KStandardShortcut::StandardShortcut>(i); +        QCOMPARE(id, KStandardShortcut::findByName(KStandardShortcut::name(id))); +    } +} diff --git a/autotests/kstandardshortcuttest.h b/autotests/kstandardshortcuttest.h index 3d186226..ae484458 100644 --- a/autotests/kstandardshortcuttest.h +++ b/autotests/kstandardshortcuttest.h @@ -19,6 +19,7 @@ private Q_SLOTS:      void testLabel();      void testShortcut();      void testFindStdAccel(); +    void testFindByName();  };  #endif | 
