> > ---------------------------
> >
> > void VerticalJournal::createDelegateModel()
> > {
> > #if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
> > m_delegateModel = new QQuickVisualDataModel(qmlContext(this), this);
> > connect(m_delegateModel, SIGNAL(createdItem(int,QQuickItem*)), this,
> > SLOT(itemCreated(int,QQuickItem*)));
> > #else
> > m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
> > connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this,
> > SLOT(itemCreated(int,QObject*)));
> > #endif
> >
> >
> > Could we use the QObject::connect version that checks signal-slot
> > compatibility at compile time (as opposed to runtime)? Since we're not
> > checking the connect() results here, which can fail with this runtime-check
> > version, we are making room for sneaky bugs to slip through.
>
> Don't worry, if the creation of items fails that is something that the unit
> test will quickly see.
Still, there's no benefit in having the code that way.
> > ------- ------- ------- ------ ::createDelegat eModel( ) aModel( qmlContext( this), this); m_delegateModel , SIGNAL( createdItem( int,QQuickItem* )), this, d(int,QQuickIte m*))); el(qmlContext( this), this); m_delegateModel , SIGNAL( createdItem( int,QObject* )), this, d(int,QObject* )));
> >
> > void VerticalJournal
> > {
> > #if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
> > m_delegateModel = new QQuickVisualDat
> > connect(
> > SLOT(itemCreate
> > #else
> > m_delegateModel = new QQmlDelegateMod
> > connect(
> > SLOT(itemCreate
> > #endif
> >
> >
> > Could we use the QObject::connect version that checks signal-slot
> > compatibility at compile time (as opposed to runtime)? Since we're not
> > checking the connect() results here, which can fail with this runtime-check
> > version, we are making room for sneaky bugs to slip through.
>
> Don't worry, if the creation of items fails that is something that the unit
> test will quickly see.
Still, there's no benefit in having the code that way.