Skip to content

Commit

Permalink
Merge pull request #11972 from Holzhaus/warn-on-deprecated-control
Browse files Browse the repository at this point in the history
Log warning if deprecated control is used
  • Loading branch information
daschuer authored Sep 14, 2023
2 parents 42798e9 + fe1b3f7 commit 2975ec5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/control/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ QSharedPointer<ControlDoublePrivate> ControlDoublePrivate::getControl(
if (it != s_qCOHash.end()) {
auto pControl = it.value().lock();
if (pControl) {
auto actualKey = pControl->getKey();
if (actualKey != key) {
qWarning()
<< "ControlObject accessed via deprecated key"
<< key.group << key.item
<< "- use"
<< actualKey.group << actualKey.item
<< "instead";
}

// Control object already exists
if (pCreatorCO) {
qWarning()
Expand Down

0 comments on commit 2975ec5

Please sign in to comment.