Showing the changes to interface/src/ui/ScriptEditorWidget.cpp (1 of 1 file). Show all
Unified · Split
| @@ -39,7 +39,8 @@ ScriptEditorWidget::ScriptEditorWidget() : · 38 unmodified lines | ||
| 39 | 39 | setTitleBarWidget(new QWidget()); |
| 40 | 40 | QFontMetrics fm(_scriptEditorWidgetUI->scriptEdit->font()); |
| 41 | 41 | _scriptEditorWidgetUI->scriptEdit->setTabStopWidth(fm.width('0') * 4); |
| 42 | − ScriptHighlighting* highlighting = new ScriptHighlighting(_scriptEditorWidgetUI->scriptEdit->document()); | |
| 42 | + // We create a new ScriptHighligting QObject and provide it with a parent so this is NOT a memory leak. | |
| 43 | + new ScriptHighlighting(_scriptEditorWidgetUI->scriptEdit->document()); | |
| 43 | 44 | QTimer::singleShot(0, _scriptEditorWidgetUI->scriptEdit, SLOT(setFocus())); |
| 44 | 45 | } |
| 45 | 46 | |