| 1141 | */ |
| 1142 | |
| 1143 | QAction *KUndo2QStack::createUndoAction(QObject *parent) const |
| 1144 | { |
| 1145 | KUndo2Action *result = new KUndo2Action(i18n("Undo %1"), i18nc("Default text for undo action", "Undo"), parent); |
| 1146 | result->setEnabled(canUndo()); |
| 1147 | result->setPrefixedText(undoText()); |
| 1148 | connect(this, SIGNAL(canUndoChanged(bool)), |
| 1149 | result, SLOT(setEnabled(bool))); |
| 1150 | connect(this, SIGNAL(undoTextChanged(QString)), |
| 1151 | result, SLOT(setPrefixedText(QString))); |
| 1152 | connect(result, SIGNAL(triggered()), this, SLOT(undo())); |
| 1153 | return result; |
| 1154 | } |
| 1155 | |
| 1156 | /*! |
| 1157 | Creates an redo QAction object with the given \a parent. |
nothing calls this directly
no test coverage detected