! \since 4.4 Returns a const pointer to the command at \a index. This function returns a const pointer, because modifying a command, once it has been pushed onto the stack and executed, almost always causes corruption of the state of the document, if the command is later undone or redone. \sa KUndo2Command::child() */
| 1272 | \sa KUndo2Command::child() |
| 1273 | */ |
| 1274 | const KUndo2Command *KUndo2QStack::command(int index) const |
| 1275 | { |
| 1276 | if (index < 0 || index >= m_command_list.count()) |
| 1277 | return 0; |
| 1278 | return m_command_list.at(index); |
| 1279 | } |
| 1280 | |
| 1281 | /*! |
| 1282 | Returns the text of the command at index \a idx. |