MultimediaProject: splitted constructor for loading either file or data
The old constructor treated the string argument either as filename or
as raw XML data, depending on 2nd parameter. This is a mess and quickly
leads to confusion.
Now we have two constructors taking either a filename as string or a
QByteArray with XML data. Loading actual data has been separated into
MultimediaProject::loadData( const QByteArray & ).
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 5a00ebd360)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* mmp.h - class for reading and writing multimedia-project-files
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -52,9 +52,8 @@ public:
|
||||
} ;
|
||||
|
||||
|
||||
multimediaProject( const QString & _in_file_name,
|
||||
bool _is_filename = TRUE,
|
||||
bool _upgrade = TRUE );
|
||||
multimediaProject( const QString & _fileName );
|
||||
multimediaProject( const QByteArray & _data );
|
||||
multimediaProject( ProjectTypes _project_type );
|
||||
virtual ~multimediaProject();
|
||||
|
||||
@@ -76,8 +75,6 @@ public:
|
||||
return( m_type );
|
||||
}
|
||||
|
||||
static ProjectTypes typeOfFile( const QString & _fn );
|
||||
|
||||
|
||||
private:
|
||||
static ProjectTypes type( const QString & _type_name );
|
||||
@@ -87,6 +84,8 @@ private:
|
||||
|
||||
void upgrade( void );
|
||||
|
||||
void loadData( const QByteArray & _data, const QString & _sourceFile );
|
||||
|
||||
|
||||
struct EXPORT typeDescStruct
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user