Commit c11e07bd authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Port deprecated foreach and Q_FOREACH -> for

BUG:419455
parent 558cada5
......@@ -392,9 +392,9 @@ void KMixWindow::saveViewConfig()
// The following loop is necessary for the case that the user has hidden all views for a Mixer instance.
// Otherwise we would not save the Meta information (step -2- below for that mixer.
// We also do not save dynamic mixers (e.g. PulseAudio)
foreach ( Mixer* mixer, Mixer::mixers() )
for (const Mixer *mixer : qAsConst(Mixer::mixers()))
{
mixerViews[mixer->id()]; // just insert a map entry
mixerViews[mixer->id()]; // just insert a map entry
}
// -1- Save the views themselves
......@@ -576,7 +576,7 @@ void KMixWindow::recreateGUI(bool saveConfig, const QString& mixerId, bool force
saveViewConfig(); // save the state before recreating
// -2- RECREATE THE ALREADY EXISTING TABS **********************************
QHash<Mixer*, bool> mixerHasProfile;
QHash<const Mixer *, bool> mixerHasProfile;
// -2a- Build a list of all active profiles in the main window (that means: from all tabs)
QList<GUIProfile*> activeGuiProfiles;
......@@ -589,10 +589,10 @@ void KMixWindow::recreateGUI(bool saveConfig, const QString& mixerId, bool force
}
}
foreach ( GUIProfile* guiprof, activeGuiProfiles)
for (const GUIProfile *guiprof : qAsConst(activeGuiProfiles))
{
Mixer *mixer = Mixer::findMixer( guiprof->getMixerId() );
if ( mixer == 0 )
const Mixer *mixer = Mixer::findMixer(guiprof->getMixerId());
if (mixer==nullptr)
{
qCCritical(KMIX_LOG) << "MixerToolBox::find() hasn't found the Mixer for the profile " << guiprof->getId();
continue;
......@@ -619,7 +619,7 @@ void KMixWindow::recreateGUI(bool saveConfig, const QString& mixerId, bool force
// -3- ADD TABS FOR Mixer instances that have no tab yet **********************************
KConfigGroup pconfig(KSharedConfig::openConfig(), "Profiles");
foreach ( Mixer *mixer, Mixer::mixers())
for (const Mixer *mixer : qAsConst(Mixer::mixers()))
{
if ( mixerHasProfile.contains(mixer))
{
......@@ -659,7 +659,7 @@ void KMixWindow::recreateGUI(bool saveConfig, const QString& mixerId, bool force
{
bool atLeastOneProfileWasAdded = false;
foreach ( QString profileId, profileList)
for (const QString &profileId : qAsConst(profileList))
{
// This handles the profileList form the kmixrc
qCDebug(KMIX_LOG) << "Searching for GUI profile" << profileId;
......@@ -670,9 +670,9 @@ void KMixWindow::recreateGUI(bool saveConfig, const QString& mixerId, bool force
qCWarning(KMIX_LOG) << "Cannot load profile" << profileId;
if (profileId.startsWith(QLatin1String("MPRIS2.")))
{
profileId = "MPRIS2.default";
qCDebug(KMIX_LOG) << "For MPRIS2 falling back to" << profileId;
guiprof = GUIProfile::find(mixer, profileId, true, false);
const QString fallbackProfileId = "MPRIS2.default";
qCDebug(KMIX_LOG) << "For MPRIS2 falling back to" << fallbackProfileId;
guiprof = GUIProfile::find(mixer, fallbackProfileId, true, false);
}
}
......
......@@ -828,7 +828,7 @@ Mixer_ALSA::readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md )
}
else
{
foreach (VolumeChannel vc, volumePlayback.getVolumes() )
for (const VolumeChannel &vc : qAsConst(volumePlayback.getVolumes()))
{
int ret = 0;
switch(vc.chid) {
......@@ -864,8 +864,8 @@ Mixer_ALSA::readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md )
// --- capture volume
if ( snd_mixer_selem_has_capture_volume ( elem ) )
{
foreach (VolumeChannel vc, volumeCapture.getVolumes() )
{
for (const VolumeChannel &vc : qAsConst(volumeCapture.getVolumes()))
{
int ret = 0;
switch(vc.chid) {
case Volume::LEFT : ret = snd_mixer_selem_get_capture_volume( elem, SND_MIXER_SCHN_FRONT_LEFT , &vol); break;
......@@ -895,7 +895,7 @@ Mixer_ALSA::readVolumeFromHW( const QString& id, shared_ptr<MixDevice> md )
// Refresh the capture switch information of *all* controls of this card.
// Doing it for all is necessary, because enabling one record source often
// automatically disables another record source (due to the hardware design)
foreach ( shared_ptr<MixDevice> md, m_mixDevices )
for (const shared_ptr<MixDevice> md : qAsConst(m_mixDevices))
{
bool isRecsrc = isRecsrcHW( md->id() );
// qCDebug(KMIX_LOG) << "Mixer::setRecordSource(): isRecsrcHW(" << md->id() << ") =" << isRecsrc;
......@@ -944,7 +944,7 @@ Mixer_ALSA::writeVolumeToHW( const QString& id, shared_ptr<MixDevice> md )
}
else
{
foreach (VolumeChannel vc, volumePlayback.getVolumes() )
for (const VolumeChannel &vc : qAsConst(volumePlayback.getVolumes()))
{
int ret = 0;
switch(vc.chid)
......@@ -975,7 +975,7 @@ Mixer_ALSA::writeVolumeToHW( const QString& id, shared_ptr<MixDevice> md )
// --- capture volume
if ( snd_mixer_selem_has_capture_volume ( elem ) )
{
foreach (VolumeChannel vc, volumeCapture.getVolumes() )
for (const VolumeChannel &vc : qAsConst(volumeCapture.getVolumes()))
{
int ret = 0;
switch(vc.chid) {
......
......@@ -76,9 +76,7 @@ Mixer_Backend::~Mixer_Backend()
void Mixer_Backend::freeMixDevices()
{
foreach (shared_ptr<MixDevice> md, m_mixDevices)
md->close();
for (shared_ptr<MixDevice> md : qAsConst(m_mixDevices)) md->close();
m_mixDevices.clear();
}
......@@ -182,7 +180,7 @@ void Mixer_Backend::readSetFromHW()
int ret = Mixer::OK_UNCHANGED;
foreach (shared_ptr<MixDevice> md, m_mixDevices )
for (shared_ptr<MixDevice> md : qAsConst(m_mixDevices))
{
//bool debugMe = (md->id() == "PCM:0" );
bool debugMe = false;
......
......@@ -282,8 +282,8 @@ int Mixer_MPRIS2::addAllRunningPlayersAndInitHotplug()
return 1;
}
QString busDestination;
foreach ( busDestination , repl.value() )
const QStringList &replyValues = repl.value();
for (const QString &busDestination : qAsConst(replyValues))
{
if ( busDestination.startsWith(QLatin1String("org.mpris.MediaPlayer2")) )
{
......
......@@ -376,7 +376,8 @@ int Mixer_OSS::readVolumeFromHW(const QString &id, shared_ptr<MixDevice> md)
// Muted is represented in OSS by value 0. We don't want to write the value 0 as a volume,
// but instead we only mark it muted (see setMuted() above).
foreach (VolumeChannel vc, vol.getVolumes()) {
for (const VolumeChannel &vc : qAsConst(vol.getVolumes()))
{
long volOld = 0;
long volNew = 0;
switch (vc.chid) {
......@@ -399,7 +400,7 @@ int Mixer_OSS::readVolumeFromHW(const QString &id, shared_ptr<MixDevice> md)
controlChanged = true;
// if ( md->id() == "0" ) qCDebug(KMIX_LOG) << "changed";
}
} // foreach
} // for
} // muted
}
}
......
......@@ -50,11 +50,10 @@ MediaController::MediaController(const QString &controlId) :
Phonon::AudioOutputDevice& dev = devs[0];
QList<QByteArray> props = dev.propertyNames();
const QList<QByteArray> props = dev.propertyNames();
qCDebug(KMIX_LOG) << "desc=" << dev.description() << ", name=" << dev.name() << ", props=";
QByteArray prop;
int i=0;
foreach (prop, props)
for (const QByteArray &prop : props)
{
qCDebug(KMIX_LOG) << "#" << i << ": "<< prop;
++i;
......
......@@ -395,11 +395,11 @@ bool MixDevice::write(KConfig *config, const QString &grp)
void MixDevice::writePlaybackOrCapture(KConfigGroup& config, bool capture)
{
Volume& volume = capture ? captureVolume() : playbackVolume();
foreach (VolumeChannel vc, volume.getVolumes() )
{
config.writeEntry(getVolString(vc.chid,capture), static_cast<int>(vc.volume));
} // for all channels
const QMap<Volume::ChannelID, VolumeChannel> volumes = volume.getVolumes();
for (const VolumeChannel &vc : volumes)
{ // for all channels
config.writeEntry(getVolString(vc.chid, capture), static_cast<int>(vc.volume));
}
}
QString MixDevice::getVolString(Volume::ChannelID chid, bool capture)
......
......@@ -66,7 +66,7 @@ MasterControl Mixer::_globalMasterPreferred;
*/
/* static */ bool Mixer::dynamicBackendsPresent()
{
foreach (const Mixer *mixer, s_mixers)
for (const Mixer *mixer : qAsConst(s_mixers))
{
if (mixer->isDynamic()) return (true);
}
......@@ -75,7 +75,7 @@ MasterControl Mixer::_globalMasterPreferred;
/* static */ bool Mixer::pulseaudioPresent()
{
foreach (const Mixer *mixer, s_mixers)
for (const Mixer *mixer : qAsConst(s_mixers))
{
if (mixer->getDriverName()=="PulseAudio") return (true);
}
......@@ -409,7 +409,7 @@ QString Mixer::getBaseName() const
/* static */ Mixer *Mixer::getGlobalMasterMixerNoFalback()
{
foreach (Mixer *mixer, Mixer::mixers())
for (Mixer *mixer : qAsConst(s_mixers))
{
if (mixer!=nullptr && mixer->id()==_globalMasterCurrent.getCard())
return mixer;
......@@ -468,7 +468,7 @@ QString Mixer::getBaseName() const
return mixer->_mixerBackend->recommendedMaster();
}
foreach (shared_ptr<MixDevice> md, mixer->_mixerBackend->m_mixDevices )
for (const shared_ptr<MixDevice> md : qAsConst(mixer->_mixerBackend->m_mixDevices))
{
if (!md) continue; // invalid
......@@ -513,10 +513,10 @@ void Mixer::setLocalMasterMD(const QString &devPK)
}
shared_ptr<MixDevice> Mixer::find(const QString& mixdeviceID) const
shared_ptr<MixDevice> Mixer::find(const QString &mixdeviceID) const
{
shared_ptr<MixDevice> mdRet;
foreach (shared_ptr<MixDevice> md, _mixerBackend->m_mixDevices)
for (const shared_ptr<MixDevice> md : qAsConst(_mixerBackend->m_mixDevices))
{
if (!md) continue; // invalid
if (md->id()==mixdeviceID)
......
......@@ -45,7 +45,7 @@ bool MixSet::read(const KConfig *config, const QString &grp)
m_name = group.readEntry( "name", m_name );
bool have_success = false, have_fail = false;
foreach ( shared_ptr<MixDevice> md, *this)
for (shared_ptr<MixDevice> md : *this)
{
if ( md->read( config, grp ) )
have_success = true;
......@@ -62,7 +62,7 @@ bool MixSet::write(KConfig *config, const QString &grp) const
conf.writeEntry( "name", m_name );
bool have_success = false, have_fail = false;
foreach ( shared_ptr<MixDevice> md, *this)
for (shared_ptr<MixDevice> md : *this)
{
if ( md->write( config, grp ) )
have_success = true;
......@@ -81,7 +81,7 @@ shared_ptr<MixDevice> MixSet::get(const QString &id) const
{
shared_ptr<MixDevice> mdRet;
foreach ( shared_ptr<MixDevice> md, *this)
for (shared_ptr<MixDevice> md : *this)
{
if ( md->id() == id )
{
......@@ -97,11 +97,11 @@ void MixSet::removeById(const QString &id)
for (int i=0; i < count() ; i++ )
{
shared_ptr<MixDevice> md = operator[](i);
if ( md->id() == id )
{
removeAt(i);
break;
}
if ( md->id() == id )
{
removeAt(i);
break;
}
}
}
......@@ -164,12 +164,7 @@ void Volume::init( Volume::ChannelMask chmask, long maxVolume, long minVolume, b
_switchActivated = true;
}
QMap<Volume::ChannelID, VolumeChannel> Volume::getVolumesWhenActive() const
{
return _volumesL;
}
QMap<Volume::ChannelID, VolumeChannel> Volume::getVolumes() const
const QMap<Volume::ChannelID, VolumeChannel> &Volume::getVolumes() const
{
return _volumesL;
}
......@@ -314,7 +309,7 @@ qreal Volume::getAvgVolume(Volume::ChannelMask chmask) const
{
int avgVolumeCounter = 0;
long long sumOfActiveVolumes = 0;
foreach (VolumeChannel vc, _volumesL )
for (const VolumeChannel &vc : qAsConst(_volumesL))
{
if (channelMask[vc.chid] & chmask )
{
......@@ -368,7 +363,7 @@ std::ostream& operator<<(std::ostream& os, const Volume& vol) {
os << "(";
bool first = true;
foreach ( const VolumeChannel vc, vol.getVolumes() )
for (const VolumeChannel &vc : qAsConst(vol.getVolumes()))
{
if ( !first ) os << ",";
else first = false;
......@@ -385,7 +380,7 @@ std::ostream& operator<<(std::ostream& os, const Volume& vol) {
QDebug operator<<(QDebug os, const Volume& vol) {
os << "(";
bool first = true;
foreach ( VolumeChannel vc, vol.getVolumes() )
for (const VolumeChannel &vc : qAsConst(vol.getVolumes()))
{
if ( !first ) os << ",";
else first = false;
......
......@@ -157,8 +157,7 @@ public:
// _channelMaskEnum[] and the following elements moved to public section. operator<<() could not
// access it, when private. Strange, as operator<<() is declared friend.
QMap<Volume::ChannelID, VolumeChannel> getVolumes() const;
QMap<Volume::ChannelID, VolumeChannel> getVolumesWhenActive() const;
const QMap<Volume::ChannelID, VolumeChannel> &getVolumes() const;
long volumeStep(bool decrease) const;
// Sets the value from the GUI configuration. This affects all volume
......
......@@ -84,7 +84,7 @@ QString DBusMixerWrapper::driverName()
QStringList DBusMixerWrapper::controls()
{
QStringList result;
foreach ( shared_ptr<MixDevice> md, m_mixer->getMixSet() )
for (const shared_ptr<MixDevice> md : qAsConst(m_mixer->getMixSet()))
{
result.append( md->dbusPath() );
}
......
......@@ -65,8 +65,7 @@ void DBusMixSetWrapper::controlsChange(ControlManager::ChangeType changeType)
QStringList DBusMixSetWrapper::mixers() const
{
QStringList result;
Q_FOREACH(Mixer* mixer, Mixer::mixers())
result.append( mixer->dbusPath() );
for (Mixer *mixer : qAsConst(Mixer::mixers())) result.append(mixer->dbusPath());
return result;
}
......
......@@ -82,8 +82,11 @@ void DialogChooseBackends::createPage(const QSet<QString> &mixerIds)
#endif
bool hasMixerFilter = !mixerIds.isEmpty();
qCDebug(KMIX_LOG) << "MixerIds=" << mixerIds;
for (const Mixer *mixer : Mixer::mixers())
for (const Mixer *mixer : qAsConst(Mixer::mixers()))
{
// TODO: No point in showing mixers which do not have any volume controls.
// See checks done in ViewDockAreaPopup::initLayout()
QListWidgetItem *item = new QListWidgetItem(m_mixerList);
item->setText(mixer->readableName(true));
item->setSizeHint(QSize(1, 16));
......
......@@ -177,7 +177,7 @@ void DialogViewConfiguration::moveSelection(DialogViewConfigurationWidget *from,
const QList<QListWidgetItem *> sel = from->selectedItems();
from->selectionModel()->clearSelection();
foreach (QListWidgetItem *item, sel)
for (QListWidgetItem *item : qAsConst(sel))
{
from->takeItem(from->row(item));
to->addItem(item);
......@@ -301,7 +301,7 @@ void DialogViewConfiguration::apply()
prepareControls(model, false, oldControlset, newControlset);
// -2- Copy all mandatory "catch-all" controls form the old to the new ControlSet *******
foreach ( ProfControl* pctl, oldControlset)
for (const ProfControl *pctl : qAsConst(oldControlset))
{
if ( pctl->isMandatory() ) {
ProfControl* newCtl = new ProfControl(*pctl);
......@@ -349,7 +349,7 @@ void DialogViewConfiguration::prepareControls(QAbstractItemModel* model, bool is
// -3- Insert it in the new ControlSet **************************
// qCDebug(KMIX_LOG) << "Should add to new ControlSet: " << ctlId;
foreach ( ProfControl* control, oldCtlSet)
for (const ProfControl *control : qAsConst(oldCtlSet))
{
//qCDebug(KMIX_LOG) << " checking " << control->id;
QRegExp idRegexp(control->id());
......
......@@ -416,7 +416,7 @@ bool GUIProfile::writeProfile()
// />
writer.writeEndElement();
foreach (const ProfProduct *prd, qAsConst(_products))
for (const ProfProduct *prd : qAsConst(_products))
{
// <product
writer.writeStartElement("product");
......@@ -432,7 +432,7 @@ bool GUIProfile::writeProfile()
writer.writeEndElement();
} // for all products
foreach (const ProfControl *profControl, qAsConst(getControls()))
for (const ProfControl *profControl : qAsConst(getControls()))
{
// <control
writer.writeStartElement("control");
......
......@@ -61,11 +61,8 @@ KMixerWidget::KMixerWidget(Mixer *mixer,
KMixerWidget::~KMixerWidget()
{
foreach (ViewBase *view, _views)
{
delete view;
}
_views.clear();
qDeleteAll(_views);
_views.clear();
}
/**
......
......@@ -153,7 +153,7 @@ void ViewBase::createDeviceWidgets()
qCDebug(KMIX_LOG) << id() << "orientation" << _orientation;
initLayout();
foreach (const shared_ptr<MixDevice> md, _mixSet)
for (const shared_ptr<MixDevice> md : qAsConst(_mixSet))
{
QWidget *mdw = add(md); // a) Let the implementation do its work
_mdws.append(mdw); // b) Add it to the local list
......@@ -182,8 +182,8 @@ void ViewBase::guiVisibilitySlot(MixDeviceWidget* mdw, bool enable)
{
MixDevice* md = mdw->mixDevice().get();
qCDebug(KMIX_LOG) << "Change " << md->id() << " to visible=" << enable;
ProfControl* pctl = findMdw(md->id());
if (pctl == 0)
ProfControl *pctl = findMdw(md->id());
if (pctl==nullptr)
{
qCWarning(KMIX_LOG) << "MixDevice not found, and cannot be hidden, id=" << md->id();
return; // Ignore
......@@ -256,23 +256,21 @@ void ViewBase::refreshVolumeLevels()
*/
bool ViewBase::isDynamic() const
{
foreach (Mixer* mixer , _mixers )
{
if ( mixer->isDynamic() )
return true;
}
return false;
for (const Mixer *mixer : qAsConst(_mixers))
{
if (mixer->isDynamic()) return true;
}
return false;
}
bool ViewBase::pulseaudioPresent() const
{
// We do not use Mixer::pulseaudioPresent(), as we are only interested in Mixer instances contained in this View.
foreach (Mixer* mixer , _mixers )
{
if ( mixer->getDriverName() == "PulseAudio" )
return true;
}
return false;
for (const Mixer *mixer : qAsConst(_mixers))
{
if ( mixer->getDriverName() == "PulseAudio" ) return true;
}
return false;
}
......@@ -292,7 +290,7 @@ void ViewBase::resetMdws()
int ViewBase::visibleControls() const
{
int visibleCount = 0;
foreach (QWidget* qw, _mdws)
for (const QWidget *qw : qAsConst(_mdws))
{
if (qw->isVisible())
++ visibleCount;
......@@ -348,7 +346,7 @@ void ViewBase::load(const KConfig *config)
{
const GuiVisibility guiCompl = guiVisibilities[i];
bool atLeastOneControlIsShown = false;
foreach(QWidget *qmdw, view->_mdws)
for (QWidget *qmdw : qAsConst(view->_mdws))
{
MixDeviceWidget *mdw = qobject_cast<MixDeviceWidget *>(qmdw);
if (mdw!=nullptr)
......@@ -407,7 +405,7 @@ void ViewBase::setGuiLevel(GuiVisibility guiLevel)
*/
ProfControl *ViewBase::findMdw(const QString& mdwId, GuiVisibility visibility) const
{
foreach ( ProfControl* pControl, guiProfile()->getControls() )
for (ProfControl *pControl : qAsConst(guiProfile()->getControls()))
{
QRegExp idRegExp(pControl->id());
if ( mdwId.contains(idRegExp) )
......
......@@ -223,7 +223,7 @@ void ViewSliders::initLayout()
{
const MixSet &mixset = mixer->getMixSet();
foreach (ProfControl *control, guiprof->getControls())
for (ProfControl *control : qAsConst(guiprof->getControls()))
{
// The TabName of the control matches this View name (!! attention: Better use some ID, due to i18n() )
QRegExp idRegexp(control->id());
......@@ -335,7 +335,7 @@ void ViewSliders::configurationUpdate()
if (mdw==nullptr) continue;
// The GUI level has been set earlier, by inspecting the controls
ProfControl *matchingControl = findMdw(mdw->mixDevice()->id());
const ProfControl *matchingControl = findMdw(mdw->mixDevice()->id());
mdw->setVisible(matchingControl!=nullptr);
}
......
......@@ -117,11 +117,14 @@ void MixerEngine::getInternalData()
"org.kde.KMix.MixSet", "masterChanged",
this, SLOT(slotMasterChanged()) );
}
Q_FOREACH( const QString& path, m_kmix->mixers() )
for (const QString &path : m_kmix->mixers())
{
MixerInfo* curmi = createMixerInfo( path );
Q_FOREACH( const QString& controlPath, curmi->iface->controls() )
const MixerInfo *curmi = createMixerInfo( path );
for (const QString &controlPath : curmi->iface->controls())
{
createControlInfo( curmi->id, controlPath );
}
}
// Update "Mixers" source
getMixersData();
......@@ -129,7 +132,7 @@ void MixerEngine::getInternalData()
void MixerEngine::clearInternalData(bool removeSources)
{
Q_FOREACH( MixerInfo* mi, m_mixers )
for (MixerInfo *mi : qAsConst(m_mixers))
{
if ( removeSources )
removeSource( mi->id );
......@@ -137,7 +140,8 @@ void MixerEngine::clearInternalData(bool removeSources)
delete mi;
}
m_mixers.clear();
Q_FOREACH( ControlInfo* ci, m_controls )
for (ControlInfo *ci : qAsConst(m_controls))
{
if ( removeSources )
removeSource( ci->mixerId + '/' + ci->id );
......@@ -169,8 +173,7 @@ bool MixerEngine::getMixersData()
QStringList mixerIds;
if ( interface->isServiceRegistered( KMIX_DBUS_SERVICE ) && m_kmix )
{
Q_FOREACH( MixerInfo* mi, m_mixers )
mixerIds.append( mi->id );
for (const MixerInfo *mi : qAsConst(m_mixers)) mixerIds.append(mi->id);
/* FIXME: this is used to know whether kmix isn't running or
* it can't find any audio device; also it works as a strange
* workaround: without it there is no dataUpdated() call sometimes
......@@ -194,12 +197,15 @@ bool MixerEngine::getMixerData( const QString& source )
{
// Trying to find this mixer
MixerInfo *curmi = 0;
Q_FOREACH( MixerInfo* mi, m_mixers )
for (MixerInfo *mi : qAsConst(m_mixers))
{
if ( mi->id == source )
{
curmi = mi;
break;
}
}
if ( !curmi || !curmi->iface->connection().isConnected() )
return false;
// Setting data
......@@ -207,13 +213,16 @@ bool MixerEngine::getMixerData( const QString& source )
QStringList controlIds;
QStringList controlReadableNames;
QStringList controlIcons;
Q_FOREACH( ControlInfo* ci, m_controls.values( curmi->id ) )
for (const ControlInfo *ci : m_controls.values(curmi->id))
{
if ( ci->iface->connection().isConnected() )
{
controlIds.append( ci->id );
controlReadableNames.append( ci->iface->readableName() );
controlIcons.append( ci->iface->iconName() );
}
}
setData( source, "Opened", curmi->iface->opened() );
setData( source, "Readable Name", curmi->iface->readableName() );