From 8166c26c7aae21e6851dc72a5b5148aaabd27236 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Wed, 4 Sep 2024 23:18:56 +0300 Subject: Fix TDECModuleInfo::needsTest() returning always false Properties such as this first make a call to the protected loadAll() method if the modules desktop files have not been processed yet, but such a call was for some reason missing from the needsTest() function, resulting in the method always returning false unless another function called loadAll() first. Signed-off-by: Mavridis Philippe --- tdeutils/tdecmoduleinfo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tdeutils/tdecmoduleinfo.cpp b/tdeutils/tdecmoduleinfo.cpp index 9eeac6585..b94603601 100644 --- a/tdeutils/tdecmoduleinfo.cpp +++ b/tdeutils/tdecmoduleinfo.cpp @@ -227,8 +227,11 @@ TDECModuleInfo::isHiddenByDefault() const return _isHiddenByDefault; } -bool TDECModuleInfo::needsTest() const +bool TDECModuleInfo::needsTest() const { + if (!_allLoaded) + const_cast(this)->loadAll(); + return d->testModule; } -- cgit v1.2.1