Skip to content

Commit

Permalink
Assign bulkTimers a parent
Browse files Browse the repository at this point in the history
The parent/child relationship is not used to manage memory.
It's only used to keep the objects together when moving them between
threads (so that the entire subtree is moved by moveToThread).
That's not the case here, but it's good practice.

Reference: https://www.kdab.com/qobject_ownership_propagate_const/
  • Loading branch information
luis-pereira committed Oct 25, 2023
1 parent 092ce1f commit 4f158c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Emulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ private slots:
private:
bool _usesMouse;
bool _bracketedPasteMode;
QTimer _bulkTimer1;
QTimer _bulkTimer2;
QTimer _bulkTimer1{this};
QTimer _bulkTimer2{this};

};

Expand Down

0 comments on commit 4f158c2

Please sign in to comment.