Make sure QTextToSpeech is deleted at the right time

This commit is contained in:
Hannah von Reth 2017-08-03 08:37:41 +02:00
parent ad4eb3d502
commit e8d83d205b
1 changed files with 2 additions and 1 deletions

View File

@ -1,11 +1,12 @@
#include "speech.h"
#include <QCoreApplication>
#include <QtTextToSpeech/QTextToSpeech>
#include <snore.h>
Speech::Speech()
: Snore::SnoreSecondaryBackend()
, m_speech(new QTextToSpeech(this))
, m_speech(new QTextToSpeech(qApp))
{
connect(m_speech, &QTextToSpeech::stateChanged, this, [this](QTextToSpeech::State state) {
qCDebug(SNORE) << state;