Commit 5016c057 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Ensure Cpp Ownership for Phrases

Having null-parent leads to QQmlEngine assuming ownership.
parent 4551f0f6
......@@ -27,6 +27,7 @@
#include "artikulate_debug.h"
#include <QTemporaryFile>
#include <QQmlEngine>
Phrase::Phrase(QObject *parent)
: QObject(parent)
......@@ -37,6 +38,8 @@ Phrase::Phrase(QObject *parent)
, m_skipCounter(0)
, m_excludedFromUnit(false)
{
QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
connect(this, &Phrase::idChanged, this, &Phrase::modified);
connect(this, &Phrase::typeChanged, this, &Phrase::modified);
connect(this, &Phrase::textChanged, this, &Phrase::modified);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment