-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix saving of multiple TempoSyncKnobModels #3281
Conversation
src/core/DataFile.cpp
Outdated
@@ -901,6 +901,15 @@ void DataFile::upgrade_1_1_91() | |||
} | |||
|
|||
|
|||
|
|||
void DataFile::upgrade_1_2_0_rc2() |
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 should this be? DataFile::upgrade_1_2_0_rc3()
?
f5758c3
to
276fc35
Compare
Fixed. I put the upgrade path in |
I'll merge this in a day or so if there are no objections. |
What do you mean? |
I was a bit tired and got lost in translation. I meant that using Monstro save file, lmms-1.1.3
Monstro save file, lmms-1.2.0-temposyncknobmodel branch
|
All the ones that have a meter specification. The upgrade step would add a name |
276fc35
to
d386d4b
Compare
Thanks! Getting there slowly... 🐌 |
src/core/DataFile.cpp
Outdated
QDomNode node; | ||
|
||
// syncmode for multiple tempo sync knobs | ||
list = elementsByTagName( "syncmode" ); |
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.
So, this isn't working. The function I'm looking for would look something like:
list = elementThatHasAttribute( "syncmode" );
include/DataFile.h
Outdated
@@ -125,6 +125,7 @@ class EXPORT DataFile : public QDomDocument | |||
void upgrade_1_0_99(); | |||
void upgrade_1_1_0(); | |||
void upgrade_1_1_91(); | |||
void upgrade_1_2_0_rc2_23(); |
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's a better name for the next upgrade function?
src/core/DataFile.cpp
Outdated
{ | ||
name = name.remove( "_numerator" ); | ||
name = name.append( "_syncmode" ); | ||
el.setAttribute( name, syncmode ); |
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.
This should rather set only the last attribute "syncmode" in every element as only the last one get's saved currently. The other attributes wouldn't get written over as they are today.
d386d4b
to
873d6c4
Compare
@LMMS/developers I revert to my original working commit and leave the best attempts at upgrade paths (incomplete) as gists. I think probably attempt 2 is the way to go... |
Upgrade methods should be run until the build version they were introduced. Pull requests can only estimate this version. A maintenance task should take care of this problem; I know how it should work. |
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.
I've tested this and it works very well.
Please no. |
Why not? We can easily allow upgrades from development versions, without implying official support. |
It's overkill. We only need to upgrade with RCs at the most granular of levels. We don't release any more granular than RCs, it's plenty. |
94e077c
to
bce2b5e
Compare
This still works. I will merge in some hours. |
* Save multiple TempSyncKnobModel syncmodes * Add upgrade path for approximate version 1.2.0-rc2.42
Fixes #3280