-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the option for specify the project title on packaged project #615
base: master
Are you sure you want to change the base?
Adding the option for specify the project title on packaged project #615
Conversation
…ged QField project
Co-authored-by: Ivan Ivanov <[email protected]>
Co-authored-by: Ivan Ivanov <[email protected]>
…onization of packaged projects
qfieldsync/gui/package_dialog.py
Outdated
self.project_lbl.setText(get_project_title(self.project)) | ||
self.original_project_title = project.title() | ||
self.packaged_project_title.setText(self.original_project_title) | ||
self.packaged_project_name.setText(self.project.baseName()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the project we are trying to package is not saved yet? Imagine you open a new blank project, set all the layers, config etc and then press "package project" without ever saving it to the disk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of complicating the code in the caller (in this case QFieldSync), we should add this functionality within the OfflineConverter itself. Why? Because the converter already does the copy of the file.
For example here we have hardcoded the name of the output file: https://github.com/opengisch/libqfieldsync/blob/master/libqfieldsync/offline_converter.py#L276
What we can do is to pass the output name to be a parameter when we construct the OfflineConverter
class. We can even replace the export_dir
param with export_filename
param, and then derive the export_dir
to be the path to export_filename
.
Co-authored-by: Ivan Ivanov <[email protected]>
Co-authored-by: Ivan Ivanov <[email protected]>
Co-authored-by: Ivan Ivanov <[email protected]>
Co-authored-by: Ivan Ivanov <[email protected]>
Co-authored-by: Ivan Ivanov <[email protected]>
Please note that most of the suggestion here need code-wide changes, the suggestions are only pointing to the highlights. |
@suricactus The changes and suggestions were addressed in this PR |
This adds the option to specify a new project name and title in the exported project when packaging.