Skip to content

Commit

Permalink
refactor: rename trackKey to trackingKey to differentiate from musica…
Browse files Browse the repository at this point in the history
…l track
  • Loading branch information
Swiftb0y committed Aug 20, 2024
1 parent 3744610 commit ac1744d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/control/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace {
/// configuration object would be arduous.
UserSettingsPointer s_pUserConfig;

const QString statTrackKey = QStringLiteral("control %1,%2"); // CO group,key
const QString statTrackingKey = QStringLiteral("control %1,%2"); // CO group,key

constexpr Stat::StatType kStatType = Stat::UNSPECIFIED;

Expand Down Expand Up @@ -60,7 +60,7 @@ ControlDoublePrivate::ControlDoublePrivate(
m_value(defaultValue),
m_defaultValue(defaultValue),
m_pCreatorCO(pCreatorCO),
m_trackKey(bTrack ? statTrackKey.arg(key.group, key.item) : QString()),
m_trackingKey(bTrack ? statTrackingKey.arg(key.group, key.item) : QString()),
m_confirmRequired(confirmRequired),
m_bPersistInConfiguration(bPersist),
m_bIgnoreNops(bIgnoreNops),
Expand All @@ -74,8 +74,8 @@ ControlDoublePrivate::ControlDoublePrivate(
}
}

if (!m_trackKey.isNull()) {
Stat::track(m_trackKey, kStatType, kComputeFlags, m_value.getValue());
if (!m_trackingKey.isNull()) {
Stat::track(m_trackingKey, kStatType, kComputeFlags, m_value.getValue());
}
}

Expand Down Expand Up @@ -290,8 +290,8 @@ void ControlDoublePrivate::setInner(double value, QObject* pSender) {
m_value.setValue(value);
emit valueChanged(value, pSender);

if (!m_trackKey.isNull()) {
Stat::track(m_trackKey, kStatType, kComputeFlags, value);
if (!m_trackingKey.isNull()) {
Stat::track(m_trackingKey, kStatType, kComputeFlags, value);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/control/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ class ControlDoublePrivate : public QObject {

QAtomicPointer<ControlObject> m_pCreatorCO;

// name of the key to track using stats framework, unless the trackKey isNull().
QString m_trackKey;
// name of the key to track using stats framework, unless the m_trackingKey isNull().
QString m_trackingKey;

// Note: keep the order of the members below to not introduce gaps due to
// memory alignment in this often used class.
Expand Down

0 comments on commit ac1744d

Please sign in to comment.