mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Crash on quit
This commit is contained in:
parent
778a6abf86
commit
69a968b7af
3 changed files with 10 additions and 2 deletions
|
|
@ -242,8 +242,10 @@ App::App (int &argc, char *argv[]) : SingleApplication(argc, argv, true, Mode::U
|
|||
|
||||
App::~App () {
|
||||
qInfo() << QStringLiteral("Destroying app...");
|
||||
delete mEngine;
|
||||
delete mParser;
|
||||
if( mEngine )
|
||||
mEngine->deleteLater();// Let to Qt the time to delete its data
|
||||
if( mParser)
|
||||
delete mParser;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ TextToSpeech::TextToSpeech (QObject *parent) : QObject(parent) {
|
|||
mQtTextToSpeech = new QTextToSpeech(this);
|
||||
connect(mQtTextToSpeech, &QTextToSpeech::stateChanged, this, &TextToSpeech::onStateChanged);
|
||||
}
|
||||
TextToSpeech::~TextToSpeech(){
|
||||
mQtTextToSpeech->deleteLater();
|
||||
}
|
||||
|
||||
void TextToSpeech::say (const QString &text) {
|
||||
if(mQtTextToSpeech->volume() == 0.0)
|
||||
|
|
@ -56,6 +59,8 @@ void TextToSpeech::onStateChanged(QTextToSpeech::State state){
|
|||
#else
|
||||
TextToSpeech::TextToSpeech (QObject *parent) : QObject(parent) {}
|
||||
|
||||
TextToSpeech::~TextToSpeech(){}
|
||||
|
||||
void TextToSpeech::say (const QString &) {}
|
||||
|
||||
bool TextToSpeech::available () const {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ class TextToSpeech : public QObject {
|
|||
|
||||
public:
|
||||
TextToSpeech (QObject *parent = Q_NULLPTR);
|
||||
~TextToSpeech();
|
||||
|
||||
Q_INVOKABLE void say (const QString &text);
|
||||
#ifdef TEXTTOSPEECH_ENABLED
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue