1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

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
This commit is contained in:
Juraj Oravec 2018-07-19 17:38:24 +02:00 committed by David Rosca
parent 6556ade5c9
commit 6357e98313
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -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)