mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Replace foreach function by for, please try and report problem
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4900 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -110,7 +110,7 @@ bool DiagramContext::operator!=(const DiagramContext &dc) const {
|
||||
named \a tag_name (defaults to "property").
|
||||
*/
|
||||
void DiagramContext::toXml(QDomElement &e, const QString &tag_name) const {
|
||||
foreach (QString key, keys()) {
|
||||
for (QString key : keys()) {
|
||||
QDomElement property = e.ownerDocument().createElement(tag_name);
|
||||
property.setAttribute("name", key);
|
||||
property.setAttribute("show",content_show[key]);
|
||||
@@ -125,7 +125,7 @@ void DiagramContext::toXml(QDomElement &e, const QString &tag_name) const {
|
||||
\a tag_name (defaults to "property").
|
||||
*/
|
||||
void DiagramContext::fromXml(const QDomElement &e, const QString &tag_name) {
|
||||
foreach (QDomElement property, QET::findInDomElement(e, tag_name)) {
|
||||
for (QDomElement property : QET::findInDomElement(e, tag_name)) {
|
||||
if (!property.hasAttribute("name")) continue;
|
||||
addValue(property.attribute("name"), QVariant(property.text()));
|
||||
content_show.insert(property.attribute("name"), property.attribute("show", "1").toInt());
|
||||
@@ -139,7 +139,7 @@ void DiagramContext::fromXml(const QDomElement &e, const QString &tag_name) {
|
||||
void DiagramContext::toSettings(QSettings &settings, const QString &array_name) const {
|
||||
settings.beginWriteArray(array_name);
|
||||
int i = 0;
|
||||
foreach (QString key, content_.keys()) {
|
||||
for (QString key : content_.keys()) {
|
||||
settings.setArrayIndex(i);
|
||||
settings.setValue("name", key);
|
||||
settings.setValue("value", content_[key].toString());
|
||||
|
||||
Reference in New Issue
Block a user