Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 341:93cf23bfa1cb tonioni
Make session file extension parameterisable, use .ton for Tony
author | Chris Cannam |
---|---|
date | Wed, 02 Apr 2014 18:22:41 +0100 |
parents | 40bcaf772d78 |
children | 4eccff14b4d8 |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Tue Apr 01 13:27:44 2014 +0100 +++ b/framework/MainWindowBase.cpp Wed Apr 02 18:22:41 2014 +0100 @@ -45,6 +45,7 @@ #include "widgets/MIDIFileImportDialog.h" #include "widgets/CSVFormatDialog.h" #include "widgets/ModelDataTableDialog.h" +#include "widgets/InteractiveFileFinder.h" #include "audioio/AudioCallbackPlaySource.h" #include "audioio/AudioCallbackPlayTarget.h" @@ -1635,7 +1636,10 @@ if (!source.isAvailable()) return FileOpenFailed; source.waitForData(); - if (source.getExtension().toLower() != "sv") { + QString sessionExt = + InteractiveFileFinder::getInstance()->getApplicationSessionExtension(); + + if (source.getExtension().toLower() != sessionExt) { RDFImporter::RDFDocumentType rdfType = RDFImporter::identifyDocumentType @@ -1666,7 +1670,7 @@ BZipFileDevice *bzFile = 0; QFile *rawFile = 0; - if (source.getExtension().toLower() == "sv") { + if (source.getExtension().toLower() == sessionExt) { bzFile = new BZipFileDevice(source.getLocalFilename()); if (!bzFile->open(QIODevice::ReadOnly)) { delete bzFile;