From 46402f271247670453e167535c4d1e137450fc65 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 2 Mar 2021 17:07:58 +0100 Subject: [PATCH] Utils: Disable a QTC_CHECK that legitimately can happen Change-Id: I63770766796798a4394a031612762dd5b390ab6b Reviewed-by: Christian Stenger --- src/libs/utils/aspects.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp index fb7b60ea78a..0892a3af0f2 100644 --- a/src/libs/utils/aspects.cpp +++ b/src/libs/utils/aspects.cpp @@ -1238,7 +1238,11 @@ QAction *BoolAspect::action() act->setCheckable(true); act->setChecked(value()); connect(act, &QAction::triggered, this, [this](bool newValue) { - QTC_CHECK(isAutoApply()); + // The check would be nice to have in simple conditions, but if we + // have an action that's used both on a settings page and as action + // in a menu like "Use FakeVim", isAutoApply() is false, and yet this + // here can trigger. + //QTC_CHECK(isAutoApply()); setValue(newValue); }); return act;