Mercurial > hg > svapp
changeset 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 | dd07d48d7d4f |
children | 4eccff14b4d8 |
files | framework/Document.cpp framework/MainWindowBase.cpp |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/Document.cpp Tue Apr 01 13:27:44 2014 +0100 +++ b/framework/Document.cpp Wed Apr 02 18:22:41 2014 +0100 @@ -105,7 +105,6 @@ emit mainModelChanged(0); delete m_mainModel; - } Layer *
--- 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;