Skip to content

Commit

Permalink
Silence warnings for expected invalid keys.
Browse files Browse the repository at this point in the history
This fixes lp1942350 a regression from #4229
  • Loading branch information
daschuer committed Sep 1, 2021
1 parent 6f4fc8e commit 70ebab0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/control/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ QSharedPointer<ControlDoublePrivate> ControlDoublePrivate::getControl(
bool bPersist,
double defaultValue) {
if (!key.isValid()) {
qWarning() << "ControlDoublePrivate::getControl returning nullptr"
<< "for invalid ConfigKey" << key;
DEBUG_ASSERT(flags.testFlag(ControlFlag::AllowInvalidKey));
if (!flags.testFlag(ControlFlag::AllowInvalidKey)) {
qWarning() << "ControlDoublePrivate::getControl returning nullptr"
<< "for invalid ConfigKey" << key;
DEBUG_ASSERT(!"Unexpected invalid key");
}
return nullptr;
}

Expand Down

0 comments on commit 70ebab0

Please sign in to comment.