use "%" for string-concatenation

Qt-Docs says it's less memory-usage...
This commit is contained in:
plc-user
2025-05-22 21:33:32 +02:00
parent 3a8e6b16f5
commit ad29893842
30 changed files with 167 additions and 167 deletions

View File

@@ -140,20 +140,20 @@ void TitleBlockProperties::fromXml(const QDomElement &e) {
*/
void TitleBlockProperties::toSettings(QSettings &settings, const QString &prefix) const
{
settings.setValue(prefix + "title", title);
settings.setValue(prefix + "author", author);
settings.setValue(prefix + "filename", filename);
settings.setValue(prefix + "plant", plant);
settings.setValue(prefix + "locmach", locmach);
settings.setValue(prefix + "indexrev", indexrev);
settings.setValue(prefix + "version", version);
settings.setValue(prefix + "folio", folio);
settings.setValue(prefix + "auto_page_num", auto_page_num);
settings.setValue(prefix + "date", exportDate());
settings.setValue(prefix + "displayAt", (display_at == Qt::BottomEdge? "bottom" : "right"));
settings.setValue(prefix + "titleblocktemplate", template_name.isEmpty()? QString() : template_name);
settings.setValue(prefix + "titleblocktemplateCollection", QET::qetCollectionToString(collection));
context.toSettings(settings, prefix + "properties");
settings.setValue(prefix % "title", title);
settings.setValue(prefix % "author", author);
settings.setValue(prefix % "filename", filename);
settings.setValue(prefix % "plant", plant);
settings.setValue(prefix % "locmach", locmach);
settings.setValue(prefix % "indexrev", indexrev);
settings.setValue(prefix % "version", version);
settings.setValue(prefix % "folio", folio);
settings.setValue(prefix % "auto_page_num", auto_page_num);
settings.setValue(prefix % "date", exportDate());
settings.setValue(prefix % "displayAt", (display_at == Qt::BottomEdge? "bottom" : "right"));
settings.setValue(prefix % "titleblocktemplate", template_name.isEmpty()? QString() : template_name);
settings.setValue(prefix % "titleblocktemplateCollection", QET::qetCollectionToString(collection));
context.toSettings(settings, prefix % "properties");
}
/**
@@ -162,20 +162,20 @@ void TitleBlockProperties::toSettings(QSettings &settings, const QString &prefix
@param prefix prefixe a ajouter devant les noms des parametres
*/
void TitleBlockProperties::fromSettings(QSettings &settings, const QString &prefix) {
title = settings.value(prefix + "title").toString();
author = settings.value(prefix + "author").toString();
filename = settings.value(prefix + "filename").toString();
plant = settings.value(prefix + "plant").toString();
locmach = settings.value(prefix + "locmach").toString();
indexrev = settings.value(prefix + "indexrev").toString();
version = settings.value(prefix + "version").toString();
folio = settings.value(prefix + "folio", "%id/%total").toString();
auto_page_num = settings.value(prefix + "auto_page_num").toString();
setDateFromString(settings.value(prefix + "date").toString());
display_at = (settings.value(prefix + "displayAt", QVariant("bottom")).toString() == "bottom" ? Qt::BottomEdge : Qt::RightEdge);
template_name = settings.value(prefix + "titleblocktemplate").toString();
collection = QET::qetCollectionFromString(settings.value(prefix + "titleblocktemplateCollection").toString());
context.fromSettings(settings, prefix + "properties");
title = settings.value(prefix % "title").toString();
author = settings.value(prefix % "author").toString();
filename = settings.value(prefix % "filename").toString();
plant = settings.value(prefix % "plant").toString();
locmach = settings.value(prefix % "locmach").toString();
indexrev = settings.value(prefix % "indexrev").toString();
version = settings.value(prefix % "version").toString();
folio = settings.value(prefix % "folio", "%id/%total").toString();
auto_page_num = settings.value(prefix % "auto_page_num").toString();
setDateFromString(settings.value(prefix % "date").toString());
display_at = (settings.value(prefix % "displayAt", QVariant("bottom")).toString() == "bottom" ? Qt::BottomEdge : Qt::RightEdge);
template_name = settings.value(prefix % "titleblocktemplate").toString();
collection = QET::qetCollectionFromString(settings.value(prefix % "titleblocktemplateCollection").toString());
context.fromSettings(settings, prefix % "properties");
}
/**