nodes: fix serialized ID typos with backward compatibility

- ChromaKey tolerance inputs are now spelled "upper/lower_tolerance_in";
  old projects with the misspelled "tolerence" IDs keep loading (values
  and connections) via a new Node::GetInputIDForLegacyID() hook applied
  in LoadInput and connection deserialization
- flip/ripple/swirl/tile/wave node IDs moved to the consistent
  org.olivevideoeditor.Olive.* domain; NodeFactory::CreateFromID maps
  the old org.oliveeditor.* IDs so old projects still resolve
- Regression tests: legacy ChromaKey IDs (values + connections) and
  legacy factory IDs
This commit is contained in:
2026-07-17 08:38:25 +08:00
parent 2aa921b215
commit bec52b46b3
13 changed files with 139 additions and 18 deletions
+8
View File
@@ -1094,6 +1094,14 @@ public:
bool LoadInput(QXmlStreamReader *reader, SerializedData *data);
void SaveInput(QXmlStreamWriter *writer, const QString &id) const;
/**
* @brief Maps an input ID read from an old project file to its current ID
*
* Nodes whose input IDs have been renamed override this so old projects
* keep loading. The default implementation returns the ID unchanged.
*/
virtual QString GetInputIDForLegacyID(const QString &id) const;
bool LoadImmediate(QXmlStreamReader *reader, const QString &input,
int element, SerializedData *data);
void SaveImmediate(QXmlStreamWriter *writer, const QString &input,