From 07a0ced9474e1b2911e705808df913f99b6b57cd Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 9 Jan 2024 09:58:27 +0100 Subject: [PATCH] TreeModel: Remove unused function overload 9124833a63e9b933587a4df2aff9b5a7066568d2 introduced an optional parameter to removeChildren to suppress signal emitting, and a61f9162f10e54f31dcc5b0221e11b5ca81f186b reimplemented that in a ABI compatible way with a new removeChildrenSilently method instead. The code now uses removeChildrenSilently, so the parameter to removeChildren is no longer needed. Change-Id: I8411d80f90e83b8746c2553dddb41c3f40a2bfc7 Reviewed-by: David Faure Reviewed-by: David Schulz Reviewed-by: --- src/libs/utils/treemodel.cpp | 8 +++----- src/libs/utils/treemodel.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libs/utils/treemodel.cpp b/src/libs/utils/treemodel.cpp index 6ebf1703ad3..4649bb43c86 100644 --- a/src/libs/utils/treemodel.cpp +++ b/src/libs/utils/treemodel.cpp @@ -700,17 +700,15 @@ void TreeItem::removeChildAt(int pos) } } -void TreeItem::removeChildren(bool emitSignals) +void TreeItem::removeChildren() { if (childCount() == 0) return; if (m_model) { QModelIndex idx = index(); - if (emitSignals) - m_model->beginRemoveRows(idx, 0, childCount() - 1); + m_model->beginRemoveRows(idx, 0, childCount() - 1); clear(); - if (emitSignals) - m_model->endRemoveRows(); + m_model->endRemoveRows(); } else { clear(); } diff --git a/src/libs/utils/treemodel.h b/src/libs/utils/treemodel.h index d1e22f907fc..fa960698b67 100644 --- a/src/libs/utils/treemodel.h +++ b/src/libs/utils/treemodel.h @@ -38,7 +38,7 @@ public: const std::function &cmp); void removeChildAt(int pos); - void removeChildren(bool emitSignals = true); + void removeChildren(); void removeChildrenSilently(); void sortChildren(const std::function &cmp); void update();