Skip to content
Permalink
Browse files

Settings: Add method to delete a targeted child

  • Loading branch information...
natanojl committed Mar 25, 2015
1 parent 11008ca commit bdeed99317d446d1cce9fd5994dbf991f8e7bd3c
Showing with 11 additions and 0 deletions.
  1. +10 −0 mythtv/libs/libmyth/standardsettings.cpp
  2. +1 −0 mythtv/libs/libmyth/standardsettings.h
@@ -113,6 +113,16 @@ void StandardSetting::addTargetedChild(const QString &value,
setting->setParent(this);
}

void StandardSetting::removeTargetedChild(const QString &value,
StandardSetting *child)
{
if (m_targets.contains(value))
{
m_targets[value].removeAll(child);
delete child;
}
}

void StandardSetting::clearTargetedSettings(const QString &value)
{
if (m_targets.contains(value))
@@ -75,6 +75,7 @@ class MPUBLIC StandardSetting : public QObject, public StorageUser
Storage *GetStorage(void) const { return m_storage; }

void addTargetedChild(const QString &value, StandardSetting *setting);
void removeTargetedChild(const QString &value, StandardSetting *child);

//not sure I want to do that yet
virtual bool keyPressEvent(QKeyEvent *);

0 comments on commit bdeed99

Please sign in to comment.
You can’t perform that action at this time.