Commit a12e323a authored by Laurent Montel's avatar Laurent Montel 😁

Port deprecated QMapped signal

parent 87131b41
......@@ -70,7 +70,11 @@ LearningGoalModel::LearningGoalModel(QObject *parent)
: QAbstractListModel(parent)
, d(new LearningGoalModelPrivate)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(d->m_signalMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped), this, &LearningGoalModel::emitLearningGoalChanged);
#else
connect(d->m_signalMapper, &QSignalMapper::mappedInt, this, &LearningGoalModel::emitLearningGoalChanged);
#endif
}
LearningGoalModel::~LearningGoalModel()
......
......@@ -19,8 +19,16 @@ PhraseModel::PhraseModel(QObject *parent)
, m_unitSignalMapper(new QSignalMapper)
, m_phraseSignalMapper(new QSignalMapper)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_unitSignalMapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped), this, &PhraseModel::onUnitChanged);
#else
connect(m_unitSignalMapper, &QSignalMapper::mappedInt, this, &PhraseModel::onUnitChanged);
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
connect(m_phraseSignalMapper, static_cast<void (QSignalMapper::*)(QObject *)>(&QSignalMapper::mapped), this, &PhraseModel::onPhraseChanged);
#else
connect(m_phraseSignalMapper, &QSignalMapper::mappedObject, this, &PhraseModel::onPhraseChanged);
#endif
}
QHash<int, QByteArray> PhraseModel::roleNames() const
......
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