Added Checking of filetypes from the xml. Added a static function fileTypeFromData to the DataFile class. This opens the given file and checks the xml for its file type, as oposed to relying on the file extension

This commit is contained in:
Dave French
2015-02-23 21:16:38 +00:00
parent a4967700fd
commit 7e2bb36104
3 changed files with 46 additions and 1 deletions

View File

@@ -56,6 +56,11 @@ public:
DataFile( const QByteArray& data );
DataFile( Type type );
/// \brief fileTypeFromData
/// Reads the given file and checks the xml for the type
/// returns UnknownType if the file is not reconised
static DataFile::Type fileTypeFromData( const QString fileName);
virtual ~DataFile();
QString nameWithExtension( const QString& fn ) const;