Delete tts objects after use.

Author: Delyan Kratunov
Flyspray: FS#11155 part1

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25401 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2010-03-30 17:43:49 +00:00
parent 4c7a16b43c
commit a79fee019e

View file

@ -403,6 +403,9 @@ void Config::updateTtsState(int index)
ui.configTTSstatus->setText(tr("Configuration INVALID")); ui.configTTSstatus->setText(tr("Configuration INVALID"));
ui.configTTSstatusimg->setPixmap(QPixmap(QString::fromUtf8(":/icons/dialog-error.png"))); ui.configTTSstatusimg->setPixmap(QPixmap(QString::fromUtf8(":/icons/dialog-error.png")));
} }
delete tts; /* Config objects are never deleted (in fact, they are leaked..), so we can't rely on QObject,
since that would delete the TTSBase instance on application exit*/
} }
void Config::updateEncState() void Config::updateEncState()
@ -699,6 +702,8 @@ void Config::configTts()
EncTtsCfgGui gui(this,tts,TTSBase::getTTSName(ui.comboTts->itemData(index).toString())); EncTtsCfgGui gui(this,tts,TTSBase::getTTSName(ui.comboTts->itemData(index).toString()));
gui.exec(); gui.exec();
updateTtsState(ui.comboTts->currentIndex()); updateTtsState(ui.comboTts->currentIndex());
delete tts; /* Config objects are never deleted (in fact, they are leaked..), so we can't rely on QObject,
since that would delete the TTSBase instance on application exit*/
} }
void Config::testTts() void Config::testTts()
@ -745,6 +750,9 @@ void Config::testTts()
#else #else
QSound::play(filename); QSound::play(filename);
#endif #endif
delete tts; /* Config objects are never deleted (in fact, they are leaked..), so we can't rely on QObject,
since that would delete the TTSBase instance on application exit*/
} }
void Config::configEnc() void Config::configEnc()