From 760665e06f49c22448290a233c4ab7c7316d61cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Thu, 25 Feb 2016 11:54:43 +0100 Subject: [PATCH] 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 [1] http://ci-logs.kde.flaska.net/64/649cf75bc5b725155742eed6b3bdb906d26aea4d/rebuilddep/rebuilddep-kf5-qt56-gcc-el7/b22dc24/shell_output.log --- src/kmodelindexproxymapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kmodelindexproxymapper.cpp b/src/kmodelindexproxymapper.cpp index 2fb1858..4eaecb4 100644 --- a/src/kmodelindexproxymapper.cpp +++ b/src/kmodelindexproxymapper.cpp @@ -116,7 +116,7 @@ void KModelIndexProxyMapperPrivate::createProxyChain() QPointer selectionTargetProxyModel = qobject_cast(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(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(sourceProxyModel->sourceModel());