Fix script engine memory leak

This commit is contained in:
GriffinR
2024-08-11 03:11:46 -04:00
parent 019a23b870
commit bb0071e8ca
3 changed files with 33 additions and 13 deletions

View File

@@ -10,7 +10,8 @@ class ScriptUtility : public QObject
public:
ScriptUtility(MainWindow *mainWindow);
void clearActions();
~ScriptUtility();
QString getActionFunctionName(int actionIndex);
Q_INVOKABLE bool registerAction(QString functionName, QString actionName, QString shortcut = "");
Q_INVOKABLE bool registerToggleAction(QString functionName, QString actionName, QString shortcut = "", bool checked = false);
@@ -59,6 +60,7 @@ private:
MainWindow *window;
QList<QAction *> registeredActions;
QSet<QTimer *> activeTimers;
QHash<int, QString> actionMap;
};