本文整理汇总了C++中MetaData::constEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ MetaData::constEnd方法的具体用法?C++ MetaData::constEnd怎么用?C++ MetaData::constEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MetaData
的用法示例。
在下文中一共展示了MetaData::constEnd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rebuildConfig
// Reconstructs configGroup from configData and mIncomingMetaData
void rebuildConfig()
{
configGroup->deleteGroup(KConfigGroup::WriteConfigFlags());
// mIncomingMetaData cascades over config, so we write config first,
// to let it be overwritten
MetaData::ConstIterator end = configData.constEnd();
for (MetaData::ConstIterator it = configData.constBegin(); it != end; ++it)
configGroup->writeEntry(it.key(), it->toUtf8(), KConfigGroup::WriteConfigFlags());
end = q->mIncomingMetaData.constEnd();
for (MetaData::ConstIterator it = q->mIncomingMetaData.constBegin(); it != end; ++it)
configGroup->writeEntry(it.key(), it->toUtf8(), KConfigGroup::WriteConfigFlags());
}
示例2: dispatch
//.........这里部分代码省略.........
}
case INF_POSITION: {
KIO::filesize_t pos = readFilesize_t(stream);
emit position(pos);
break;
}
case INF_SPEED:
stream >> ul;
d->slave_calcs_speed = true;
d->speed_timer.stop();
emit speed( ul );
break;
case INF_GETTING_FILE:
break;
case INF_ERROR_PAGE:
emit errorPage();
break;
case INF_REDIRECTION: {
KUrl url;
stream >> url;
emit redirection( url );
break;
}
case INF_MIME_TYPE:
stream >> str1;
emit mimeType(str1);
if (!d->connection->suspended())
d->connection->sendnow(CMD_NONE, QByteArray());
break;
case INF_WARNING:
stream >> str1;
emit warning(str1);
break;
case INF_MESSAGEBOX: {
kDebug(7007) << "needs a msg box";
QString text, caption, buttonYes, buttonNo, dontAskAgainName;
int type;
stream >> type >> text >> caption >> buttonYes >> buttonNo;
if (stream.atEnd()) {
messageBox(type, text, caption, buttonYes, buttonNo);
} else {
stream >> dontAskAgainName;
messageBox(type, text, caption, buttonYes, buttonNo, dontAskAgainName);
}
break;
}
case INF_INFOMESSAGE: {
QString msg;
stream >> msg;
emit infoMessage(msg);
break;
}
case INF_META_DATA: {
MetaData m;
stream >> m;
if (m.contains(QLatin1String("ssl_in_use"))) {
const QLatin1String ssl_("ssl_");
const MetaData constM = m;
for (MetaData::ConstIterator it = constM.lowerBound(ssl_); it != constM.constEnd(); ++it) {
if (it.key().startsWith(ssl_)) {
d->sslMetaData.insert(it.key(), it.value());
} else {
// we're past the ssl_* entries; remember that QMap is ordered.
break;
}
}
}
emit metaData(m);
break;
}
case MSG_NET_REQUEST: {
QString host;
QString slaveid;
stream >> host >> slaveid;
requestNetwork(host, slaveid);
break;
}
case MSG_NET_DROP: {
QString host;
QString slaveid;
stream >> host >> slaveid;
dropNetwork(host, slaveid);
break;
}
case MSG_NEED_SUBURL_DATA: {
emit needSubUrlData();
break;
}
case MSG_HOST_INFO_REQ: {
QString hostName;
stream >> hostName;
HostInfo::lookupHost(hostName, this, SLOT(slotHostInfo(QHostInfo)));
break;
}
default:
kWarning(7007) << "Slave sends unknown command (" << _cmd << "), dropping slave";
return false;
}
return true;
}