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 <mavridisf@gmail.com>
pull/300/head
Mavridis Philippe 2 months ago
parent 53e7aa7eaf
commit 8166c26c7a
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -227,8 +227,11 @@ TDECModuleInfo::isHiddenByDefault() const
return _isHiddenByDefault; return _isHiddenByDefault;
} }
bool TDECModuleInfo::needsTest() const bool TDECModuleInfo::needsTest() const
{ {
if (!_allLoaded)
const_cast<TDECModuleInfo*>(this)->loadAll();
return d->testModule; return d->testModule;
} }

Loading…
Cancel
Save