| 53 | } |
| 54 | |
| 55 | void MacroManager::stopRecording() |
| 56 | { |
| 57 | qInfo(Q_FUNC_INFO); |
| 58 | Q_ASSERT(_isRecording == true); |
| 59 | |
| 60 | _isRecording = false; |
| 61 | |
| 62 | Macro *m = recorder.stopRecording(); |
| 63 | |
| 64 | if (m->size() == 0) { |
| 65 | // If there were no actions recorded, delete it |
| 66 | delete m; |
| 67 | } |
| 68 | else { |
| 69 | if (isCurrentMacroSaved == false) { |
| 70 | // The previous current macro wasn't saved and we are getting ready to point to something else, delete it |
| 71 | delete currentMacro; |
| 72 | } |
| 73 | |
| 74 | isCurrentMacroSaved = false; |
| 75 | currentMacro = m; |
| 76 | } |
| 77 | |
| 78 | emit recordingStopped(); |
| 79 | } |
| 80 | |
| 81 | void MacroManager::loadSettings() |
| 82 | { |