qt5base-lts/tests/auto/qundostack
Alexander Potashev 342d2a253c Allow different text for undo actions and items in QUndoView
Now the texts used for undo actions and for items in QUndoView can
be set separately. This introduces an extended format of text that
can be passed to QUndoCommand::setText or QUndoCommand constructor.

The action text can now contain two strings separated by a "\n". The
first string (that goes before "\n") is then returned by
QUndoCommand::text() and used as name of item in QUndoView.
The second string (that goes after "\n") is returned by
QUndoCommand::actionText() and used when the text properties of the
undo and redo actions are updated.

If the text passed to QUndoCommand does not contain "\n", everything
works as before, and both QUndoCommand::text() and
QUndoCommand::actionText() return the same string.

Even though action text in English usually does not need different forms
for undo actions and QUndoView item, translators can employ this new
command text format, for example to adjust the grammatical case used in
command text to match the context of "Undo %1"/"Redo %1".

Merge-request: 2610
Reviewed-by: ossi
(cherry picked from commit 9b784789c75d59b27530bbf1d12676cc44f64f46)
2011-05-10 12:54:56 +02:00
..
testdata Allow using not only prefixes for undo command text 2011-05-10 12:54:56 +02:00
.gitignore Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qundostack.pro Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
tst_qundostack.cpp Allow different text for undo actions and items in QUndoView 2011-05-10 12:54:56 +02:00