-rw-r--r-- | kaddressbook/undo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/undo.cpp b/kaddressbook/undo.cpp index 4442087..a6c1580 100644 --- a/kaddressbook/undo.cpp +++ b/kaddressbook/undo.cpp | |||
@@ -69,51 +69,51 @@ UndoStack::UndoStack() | |||
69 | } | 69 | } |
70 | 70 | ||
71 | UndoStack* UndoStack::instance() | 71 | UndoStack* UndoStack::instance() |
72 | { | 72 | { |
73 | if (!instance_) | 73 | if (!instance_) |
74 | instance_ = new UndoStack(); | 74 | instance_ = new UndoStack(); |
75 | return instance_; | 75 | return instance_; |
76 | } | 76 | } |
77 | 77 | ||
78 | void UndoStack::undo() | 78 | void UndoStack::undo() |
79 | { | 79 | { |
80 | if (isEmpty()) | 80 | if (isEmpty()) |
81 | return; | 81 | return; |
82 | 82 | ||
83 | Command *command = pop(); | 83 | Command *command = pop(); |
84 | command->undo(); | 84 | command->undo(); |
85 | 85 | ||
86 | RedoStack::instance()->push( command ); | 86 | RedoStack::instance()->push( command ); |
87 | } | 87 | } |
88 | 88 | ||
89 | //////////////////// | 89 | //////////////////// |
90 | // RedoStack | 90 | // RedoStack |
91 | 91 | ||
92 | RedoStack* RedoStack::instance_ = 0; | 92 | RedoStack* RedoStack::instance_ = 0; |
93 | 93 | ||
94 | RedoStack::RedoStack() | 94 | RedoStack::RedoStack() |
95 | { | 95 | { |
96 | mCommandStack.setAutoDelete( true ); | 96 | mCommandStack.setAutoDelete( true ); |
97 | } | 97 | } |
98 | 98 | ||
99 | RedoStack* RedoStack::instance() | 99 | RedoStack* RedoStack::instance() |
100 | { | 100 | { |
101 | if (!instance_) | 101 | if (!instance_) |
102 | instance_ = new RedoStack(); | 102 | instance_ = new RedoStack(); |
103 | return instance_; | 103 | return instance_; |
104 | } | 104 | } |
105 | 105 | ||
106 | void RedoStack::redo() | 106 | void RedoStack::redo() |
107 | { | 107 | { |
108 | Command *command; | 108 | Command *command; |
109 | if (isEmpty()) | 109 | if (isEmpty()) |
110 | return; | 110 | return; |
111 | 111 | ||
112 | command = pop(); | 112 | command = pop(); |
113 | command->redo(); | 113 | command->redo(); |
114 | UndoStack::instance()->push( command ); | 114 | UndoStack::instance()->push( command ); |
115 | } | 115 | } |
116 | 116 | ||
117 | #ifndef KAB_EMBEDDED | 117 | #ifndef KAB_EMBEDDED_ |
118 | #include "undo.moc" | 118 | #include "moc_undo.cpp" |
119 | #endif //KAB_EMBEDDED | 119 | #endif //KAB_EMBEDDED |