36 // Don't take the changes done here as actual edits to the document |
36 // Don't take the changes done here as actual edits to the document |
37 setIgnoring (true); |
37 setIgnoring (true); |
38 const Changeset& set = changesetAt (position()); |
38 const Changeset& set = changesetAt (position()); |
39 |
39 |
40 // Iterate the list in reverse and undo all actions |
40 // Iterate the list in reverse and undo all actions |
41 for (int i = length(set) - 1; i >= 0; --i) |
41 for (int i = countof(set) - 1; i >= 0; --i) |
42 { |
42 { |
43 AbstractHistoryEntry* change = set[i]; |
43 AbstractHistoryEntry* change = set[i]; |
44 change->undo(); |
44 change->undo(); |
45 } |
45 } |
46 |
46 |
108 m_currentChangeset << entry; |
108 m_currentChangeset << entry; |
109 } |
109 } |
110 |
110 |
111 int EditHistory::size() const |
111 int EditHistory::size() const |
112 { |
112 { |
113 return length(m_changesets); |
113 return countof(m_changesets); |
114 } |
114 } |
115 |
115 |
116 const EditHistory::Changeset& EditHistory::changesetAt (int pos) const |
116 const EditHistory::Changeset& EditHistory::changesetAt (int pos) const |
117 { |
117 { |
118 return m_changesets[pos]; |
118 return m_changesets[pos]; |