mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-19 14:38:22 -04:00
Add support for upgrading presets
This is in addition to songs. Simply use multimediaProject. Don't screw around with Song(). Also, needed to move creation of xml preamble (processing instruction) due to duplicate entry when doing a load/save. Conflicts: src/core/main.cpp
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* mmp.cpp - implementation of class multimediaProject
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2012-2013 Paul Giblock <p/at/pgiblock.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -66,6 +67,7 @@ multimediaProject::multimediaProject( ProjectTypes _project_type ) :
|
||||
m_head(),
|
||||
m_type( _project_type )
|
||||
{
|
||||
appendChild( createProcessingInstruction("xml", "version=\"1.0\""));
|
||||
QDomElement root = createElement( "multimedia-project" );
|
||||
root.setAttribute( "version", MMP_VERSION_STRING );
|
||||
root.setAttribute( "type", typeName( _project_type ) );
|
||||
@@ -189,7 +191,7 @@ bool multimediaProject::writeFile( const QString & _fn )
|
||||
).arg( fn ) );
|
||||
return false;
|
||||
}
|
||||
QString xml = "<?xml version=\"1.0\"?>\n" + toString( 2 );
|
||||
QString xml = toString( 2 );
|
||||
if( fn.section( '.', -1 ) == "mmpz" )
|
||||
{
|
||||
outfile.write( qCompress( xml.toUtf8() ) );
|
||||
|
||||
Reference in New Issue
Block a user