Fix build with GCC 4.8

...which cannot infer a proper conversion [1], unlike GCC 4.9 and clang
3.4. This got introduced by commit a0e309b4 (Add a property indicating
whether the models form a connected chain., 2016-02-03)'.

Reviewed-By: Stephen Kelly <ske@ableton.com>

[1] http://ci-logs.kde.flaska.net/64/649cf75bc5b725155742eed6b3bdb906d26aea4d/rebuilddep/rebuilddep-kf5-qt56-gcc-el7/b22dc24/shell_output.log
wilder
Jan Kundrát 10 years ago
parent 649cf75bc5
commit 760665e06f
  1. 4
      src/kmodelindexproxymapper.cpp

@ -116,7 +116,7 @@ void KModelIndexProxyMapperPrivate::createProxyChain()
QPointer<const QAbstractProxyModel> selectionTargetProxyModel = qobject_cast<const QAbstractProxyModel *>(targetModel);
while (selectionTargetProxyModel) {
proxyChainDown.prepend(selectionTargetProxyModel);
QObject::connect(selectionTargetProxyModel, &QAbstractProxyModel::sourceModelChanged, q_ptr,
QObject::connect(selectionTargetProxyModel.data(), &QAbstractProxyModel::sourceModelChanged, q_ptr,
[this]{ createProxyChain(); });
selectionTargetProxyModel = qobject_cast<const QAbstractProxyModel *>(selectionTargetProxyModel->sourceModel());
@ -133,7 +133,7 @@ void KModelIndexProxyMapperPrivate::createProxyChain()
while (sourceProxyModel) {
m_proxyChainUp.append(sourceProxyModel);
QObject::connect(sourceProxyModel, &QAbstractProxyModel::sourceModelChanged, q_ptr,
QObject::connect(sourceProxyModel.data(), &QAbstractProxyModel::sourceModelChanged, q_ptr,
[this]{ createProxyChain(); });
sourceProxyModel = qobject_cast<const QAbstractProxyModel *>(sourceProxyModel->sourceModel());

Loading…
Cancel
Save