summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qundostack_p.h
diff options
context:
space:
mode:
authorAlexander Potashev <aspotashev@gmail.com>2011-05-09 10:39:18 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-10 12:54:56 +0200
commit342d2a253ca14d9d8dff843f682661d4933d1dd3 (patch)
tree939a60581f49a553b375d935c85419059a75a325 /src/gui/util/qundostack_p.h
parentec4d346f95de4933b660d5ce005751abdced4c7d (diff)
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)
Diffstat (limited to 'src/gui/util/qundostack_p.h')
-rw-r--r--src/gui/util/qundostack_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/util/qundostack_p.h b/src/gui/util/qundostack_p.h
index 2906fd8564..a10076366a 100644
--- a/src/gui/util/qundostack_p.h
+++ b/src/gui/util/qundostack_p.h
@@ -70,6 +70,7 @@ public:
QUndoCommandPrivate() : id(-1) {}
QList<QUndoCommand*> child_list;
QString text;
+ QString actionText;
int id;
};