Skip to content

Commit c34e97b

Browse files
committed
Fix project flags enum
1 parent b830a70 commit c34e97b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libqfieldsync/offline_converter.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,13 @@ def _convert(self, project: QgsProject) -> None: # noqa: PLR0912, PLR0915
221221

222222
# Set flags that usually significantly speed-up project file read
223223
read_flags = QgsProject.ReadFlags()
224-
read_flags |= QgsProject.ReadFlag.FlagDontResolveLayers
225-
read_flags |= QgsProject.ReadFlag.FlagDontLoadLayouts
226224
if Qgis.versionInt() >= 32600: # noqa: PLR2004
227-
read_flags |= QgsProject.ReadFlag.FlagDontLoad3DViews
225+
read_flags |= Qgis.ProjectReadFlag.DontResolveLayers
226+
read_flags |= Qgis.ProjectReadFlag.DontLoadLayouts
227+
read_flags |= Qgis.ProjectReadFlag.DontLoad3DViews
228+
else:
229+
read_flags |= QgsProject.ReadFlag.FlagDontResolveLayers
230+
read_flags |= QgsProject.ReadFlag.FlagDontLoadLayouts
228231

229232
# Make a new function object that we can connect and disconnect easily
230233
on_original_project_read = self._on_original_project_read_wrapper(

0 commit comments

Comments
 (0)