comparison framework/MainWindowBase.cpp @ 592:1918bf5c9a9e

Some bits and bobs to do with handling memory pressure
author Chris Cannam
date Mon, 06 Mar 2017 17:23:46 +0000
parents 77d33ed8e753
children 72b4870f0e6b
comparison
equal deleted inserted replaced
591:77d33ed8e753 592:1918bf5c9a9e
1407 m_openingAudioFile = false; 1407 m_openingAudioFile = false;
1408 QMessageBox::critical 1408 QMessageBox::critical
1409 (this, tr("Not enough disc space"), 1409 (this, tr("Not enough disc space"),
1410 tr("<b>Not enough disc space</b><p>There doesn't appear to be enough spare disc space to accommodate any necessary temporary files.</p><p>Please clear some space and try again.</p>").arg(e.what())); 1410 tr("<b>Not enough disc space</b><p>There doesn't appear to be enough spare disc space to accommodate any necessary temporary files.</p><p>Please clear some space and try again.</p>").arg(e.what()));
1411 return FileOpenFailed; 1411 return FileOpenFailed;
1412 } catch (const std::bad_alloc &e) { // reader may have rethrown this after cleaning up
1413 emit hideSplash();
1414 m_openingAudioFile = false;
1415 QMessageBox::critical
1416 (this, tr("Not enough memory"),
1417 tr("<b>Not enough memory</b><p>There doesn't appear to be enough memory to accommodate any necessary temporary data.</p>"));
1418 return FileOpenFailed;
1412 } 1419 }
1413 } 1420 }
1414 1421
1415 MainWindowBase::FileOpenStatus 1422 MainWindowBase::FileOpenStatus
1416 MainWindowBase::openAudio(FileSource source, AudioFileOpenMode mode, 1423 MainWindowBase::openAudio(FileSource source, AudioFileOpenMode mode,