From 6357e983131ee1d2bc39b2d1b7adeff439107550 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Thu, 19 Jul 2018 17:38:24 +0200 Subject: [PATCH] RunAction: Close UI file after it is loaded Summary: It is good practice to close files which are no longer needed. Reviewers: #falkon, drosca Reviewed By: #falkon, drosca Subscribers: falkon Tags: #falkon Differential Revision: https://phabricator.kde.org/D14197 --- src/scripts/runaction/settingsdialog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scripts/runaction/settingsdialog.py b/src/scripts/runaction/settingsdialog.py index 5bb128207..e600a9529 100644 --- a/src/scripts/runaction/settingsdialog.py +++ b/src/scripts/runaction/settingsdialog.py @@ -29,6 +29,8 @@ class SettingsDialog(QtWidgets.QDialog): file = QtCore.QFile(os.path.join(os.path.dirname(__file__), "settings.ui")) file.open(QtCore.QFile.ReadOnly) self.ui = QtUiTools.QUiLoader().load(file, self) + file.close() + layout = QtWidgets.QVBoxLayout(self) layout.addWidget(self.ui)