aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2022-10-18 13:08:58 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-10-25 13:23:05 +0200
commit7d9fc16a398a8d86cb9a6e67f63ab9237e568894 (patch)
tree1adb0eeb30ac90a27181dfc6966cab33ed7b0569
parent89c9778c87e9bdb030fc7bb0945a96929c7d3d13 (diff)
Project tool: fix attribute error
- there was no setter for self.main_file. This is now added. Change-Id: Iebb131e36f5bdc29dc7eff44b98e3defceda4416 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit e49f545dc6f44f9297998379543a7b706953f58a)
-rw-r--r--sources/pyside-tools/project.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/pyside-tools/project.py b/sources/pyside-tools/project.py
index 3a1d96605..93d607811 100644
--- a/sources/pyside-tools/project.py
+++ b/sources/pyside-tools/project.py
@@ -294,9 +294,9 @@ class Project:
self._qml_files.append(file)
elif file.suffix == ".py":
if file.name == "main.py":
- self._main_file = file
+ self.main_file = file
self._python_files.append(file)
- if not self._main_file:
+ if not self.main_file:
self._find_main_file()
self._qml_module_check()
@@ -312,6 +312,10 @@ class Project:
def main_file(self):
return self._main_file
+ @main_file.setter
+ def main_file(self, main_file):
+ self._main_file = main_file
+
@property
def python_files(self):
return self._python_files