mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: testing build fix
tests pass to no surprise Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
39998ee94e
commit
a8906fbcf5
2 changed files with 6 additions and 11 deletions
|
@ -278,13 +278,8 @@ public:
|
|||
/**
|
||||
* Get the shortcut for this action.
|
||||
*
|
||||
* This is preferred over QAction::shortcut(), as it allows for multiple shortcuts
|
||||
* per action. The first and second shortcut as reported by shortcuts() will be the
|
||||
* primary and alternate shortcut of the shortcut returned.
|
||||
*
|
||||
* \param types the type of shortcut to return. Should both be specified, only the
|
||||
* active shortcut will be returned. Defaults to the active shortcut, if one exists.
|
||||
* \sa shortcuts()
|
||||
*/
|
||||
KShortcut shortcut(ShortcutTypes types = ActiveShortcut) const;
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ void tst_KActionCollection::writeSettings()
|
|||
|
||||
collection->writeSettings(&cfg);
|
||||
|
||||
QCOMPARE(cfg.readEntry("actionWithDifferentShortcut", QString()), KShortcut(actionWithDifferentShortcut->shortcuts()).toString());
|
||||
QCOMPARE(cfg.readEntry("actionWithDifferentShortcut", QString()), KShortcut(actionWithDifferentShortcut->shortcut()).toString());
|
||||
QCOMPARE(cfg.readEntry("immutableAction", QString()), QString());
|
||||
QCOMPARE(cfg.readEntry("actionWithSameShortcut", QString()), QString());
|
||||
QCOMPARE(cfg.readEntry("actionToDelete", QString()), QString());
|
||||
|
@ -154,14 +154,14 @@ void tst_KActionCollection::readSettings()
|
|||
collection->addAction("empty", empty);
|
||||
empty->setShortcut(temporaryShortcut, KAction::ActiveShortcut);
|
||||
empty->setShortcut(defaultShortcut, KAction::DefaultShortcut);
|
||||
QCOMPARE(KShortcut(empty->shortcuts()).toString(), temporaryShortcut.toString());
|
||||
QCOMPARE(KShortcut(empty->shortcut()).toString(), temporaryShortcut.toString());
|
||||
|
||||
collection->readSettings(&cfg);
|
||||
|
||||
QCOMPARE(KShortcut(normal->shortcuts()).toString(), defaultShortcut.toString());
|
||||
QCOMPARE(KShortcut(empty->shortcuts()).toString(), defaultShortcut.toString());
|
||||
QCOMPARE(KShortcut(normal->shortcut()).toString(), defaultShortcut.toString());
|
||||
QCOMPARE(KShortcut(empty->shortcut()).toString(), defaultShortcut.toString());
|
||||
|
||||
QCOMPARE(KShortcut(immutable->shortcuts()).toString(), temporaryShortcut.toString());
|
||||
QCOMPARE(KShortcut(immutable->shortcut()).toString(), temporaryShortcut.toString());
|
||||
|
||||
qDeleteAll(collection->actions());
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ void tst_KActionCollection::testSetShortcuts()
|
|||
KAction *action = new KAction(i18n("Next Unread &Folder"), this);
|
||||
collection->addAction("go_next_unread_folder", action);
|
||||
action->setShortcut(QKeySequence(Qt::ALT+Qt::Key_Plus));
|
||||
KShortcut shortcut = KShortcut(action->shortcuts());
|
||||
KShortcut shortcut = KShortcut(action->shortcut());
|
||||
shortcut.setAlternate( QKeySequence( Qt::CTRL+Qt::Key_Plus ) );
|
||||
action->setShortcut( shortcut );
|
||||
QCOMPARE(action->shortcut().toString(), QString("Alt++; Ctrl++"));
|
||||
|
|
Loading…
Add table
Reference in a new issue