refs #144 , improved file deleter , no dependency of QObject anymore, now using single deleter object

This commit is contained in:
Klaus Basan
2014-02-20 15:08:48 +01:00
parent 7177d53552
commit 59ff750b4a
4 changed files with 24 additions and 15 deletions

View File

@@ -19,7 +19,6 @@ using namespace BlackMisc::Voice;
namespace BlackSound
{
QDateTime CSoundGenerator::s_selcalStarted = QDateTime::currentDateTimeUtc();
BlackMisc::CFileDeleter CSoundGenerator::s_fileDeleter = BlackMisc::CFileDeleter();
CSoundGenerator::CSoundGenerator(const QAudioDeviceInfo &device, const QAudioFormat &format, const QList<Tone> &tones, PlayMode mode, QObject *parent)
: QIODevice(parent),
@@ -459,6 +458,6 @@ namespace BlackSound
mediaPlayer->setVolume(volume); // 0-100
mediaPlayer->play();
// I cannot delete the file here, only after it has been played
if (removeFileAfterPlaying) CSoundGenerator::s_fileDeleter.addFileForDeletion(file);
if (removeFileAfterPlaying) BlackMisc::CFileDeleter::addFileForDeletion(file);
}
} // namespace