-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[needs-doc] Add stable id, save id, save count to project spec #6527
Closed
Closed
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,6 +120,33 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera | |
*/ | ||
QString title() const; | ||
|
||
/** | ||
* Returns the project's stable id. | ||
*/ | ||
QString id() const; | ||
|
||
/** | ||
* Returns the project's current save id. This value is changed on after each save. | ||
* Use \see id() if you need a stable id for the project. | ||
*/ | ||
QString saveId() const; | ||
|
||
/** | ||
* Returns the save counter for the project. Like a car odometer but better because it's QGIS. | ||
* This will change with each save like \see saveId() | ||
*/ | ||
int saveCounter() const; | ||
|
||
/** | ||
* Returns the user name that did the last save. | ||
*/ | ||
QString saveUser() const; | ||
|
||
/** | ||
* Returns the full user name that did the last save. | ||
*/ | ||
QString saveUserFullname() const; | ||
|
||
/** | ||
* Returns true if the project has been modified since the last write() | ||
*/ | ||
|
@@ -1207,6 +1234,11 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera | |
QFile mFile; // current physical project file | ||
mutable QgsProjectPropertyKey mProperties; // property hierarchy, TODO: this shouldn't be mutable | ||
QString mTitle; // project title | ||
QString mId; // project id | ||
QString mSaveId; // changing id for each save. | ||
QString mSaveUser; // last saved user. | ||
QString mSaveUserFull; // last saved user. | ||
int mSaveCounter; // increasing save counter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. initialize to 0 here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
bool mAutoTransaction = false; // transaction grouped editing | ||
bool mEvaluateDefaultValues = false; // evaluate default values immediately | ||
QgsCoordinateReferenceSystem mCrs; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
off topic - but wow it annoys me the format QUuid uses.
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.
You and be both. Never once have I thought "man I wish this guid had { } around it". Silly.