Skip to content

Commit

Permalink
Removing a few references to make sure reference counts are incremented
Browse files Browse the repository at this point in the history
in the hopes that it fixes issue #276
  • Loading branch information
eteran committed Jan 15, 2021
1 parent 504bc4a commit 4ae6a40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/DocumentWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5388,7 +5388,7 @@ DocumentWidget::MacroContinuationCode DocumentWidget::continueWorkProc() {
*/
void DocumentWidget::resumeMacroExecution() {

if (const std::shared_ptr<MacroCommandData> &cmdData = macroCmdData_) {
if (const std::shared_ptr<MacroCommandData> cmdData = macroCmdData_) {

// create a background task that will run so long as the function returns false
connect(&cmdData->continuationTimer, &QTimer::timeout, this, [cmdData, this]() {
Expand Down Expand Up @@ -6501,7 +6501,7 @@ std::unique_ptr<Regex> DocumentWidget::compileRegexAndWarn(const QString &re) {
** process close the window when the macro is finished executing.
*/
bool DocumentWidget::macroWindowCloseActions() {
const std::shared_ptr<MacroCommandData> &cmdData = macroCmdData_;
const std::shared_ptr<MacroCommandData> cmdData = macroCmdData_;

CommandRecorder *recorder = CommandRecorder::instance();

Expand All @@ -6515,7 +6515,7 @@ bool DocumentWidget::macroWindowCloseActions() {
if (!cmdData) {
for (DocumentWidget *document : DocumentWidget::allDocuments()) {

const std::shared_ptr<MacroCommandData> &mcd = document->macroCmdData_;
const std::shared_ptr<MacroCommandData> mcd = document->macroCmdData_;

if (document == MacroRunDocument() && MacroFocusDocument() == this) {
SetMacroFocusDocument(MacroRunDocument());
Expand Down
2 changes: 1 addition & 1 deletion src/macro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5003,7 +5003,7 @@ void RegisterMacroSubroutines() {
*/
void returnShellCommandOutput(DocumentWidget *document, const QString &outText, int status) {

if (const std::shared_ptr<MacroCommandData> &cmdData = document->macroCmdData_) {
if (const std::shared_ptr<MacroCommandData> cmdData = document->macroCmdData_) {

DataValue retVal = make_value(outText);

Expand Down

0 comments on commit 4ae6a40

Please sign in to comment.