Commit d31ec707 authored by Simone Gaiarin's avatar Simone Gaiarin Committed by Albert Astals Cid
Browse files

Test enabled/disabled state of actions after a config reparsing

parent 20b298cf
......@@ -279,6 +279,24 @@ void AnnotationToolBarTest::testAnnotationToolBarActionsEnabledState()
QCOMPARE(aFreehandLine->isEnabled(), aFreehandLineEnabled);
QCOMPARE(aGeomShapes->isEnabled(), aGeomShapesEnabled);
QCOMPARE(aStamp->isEnabled(), aStampEnabled);
// trigger a reparsing of the tools to ensure that the enabled/disabled state is not changed (bug: 424296)
QAction *aMouseSelect = ac->action(QStringLiteral("mouse_select"));
QAction *aMouseNormal = ac->action(QStringLiteral("mouse_drag"));
aMouseSelect->trigger();
aMouseNormal->trigger();
QCOMPARE(aQuickTools->isEnabled(), aQuickToolsEnabled);
QCOMPARE(aHighlighter->isEnabled(), aHighlighterEnabled);
QCOMPARE(aUnderline->isEnabled(), aUnderlineEnabled);
QCOMPARE(aSquiggle->isEnabled(), aSquiggleEnabled);
QCOMPARE(aStrikeout->isEnabled(), aStrikeoutEnabled);
QCOMPARE(aTypewriter->isEnabled(), aTypewriterEnabled);
QCOMPARE(aInlineNote->isEnabled(), aInlineNoteEnabled);
QCOMPARE(aPopupNote->isEnabled(), aPopupNoteEnabled);
QCOMPARE(aFreehandLine->isEnabled(), aFreehandLineEnabled);
QCOMPARE(aGeomShapes->isEnabled(), aGeomShapesEnabled);
QCOMPARE(aStamp->isEnabled(), aStampEnabled);
}
void AnnotationToolBarTest::testAnnotationToolBarActionsEnabledState_data()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment