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

@@ -196,9 +196,9 @@ QString ElementsLocation::projectCollectionPath() const
return QString();
else
return QString("project"
+ QString::number(QETApp::projectId(m_project))
+ "+"
+ collectionPath());
% QString::number(QETApp::projectId(m_project))
% "+"
% collectionPath());
}
/**
@@ -296,17 +296,17 @@ void ElementsLocation::setPath(const QString &path)
if (path.startsWith("common://"))
{
tmp_path.remove("common://");
p = QETApp::commonElementsDirN() + "/" + tmp_path;
p = QETApp::commonElementsDirN() % "/" % tmp_path;
}
else if (path.startsWith("company://"))
{
tmp_path.remove("company://");
p = QETApp::companyElementsDirN() + "/" + tmp_path;
p = QETApp::companyElementsDirN() % "/" % tmp_path;
}
else
{
tmp_path.remove("custom://");
p = QETApp::customElementsDirN() + "/" + tmp_path;
p = QETApp::customElementsDirN() % "/" % tmp_path;
}
m_file_system_path = p;
@@ -464,7 +464,7 @@ QString ElementsLocation::toString() const
if (m_project) {
int project_id = QETApp::projectId(m_project);
if (project_id != -1) {
result += "project" + QString().setNum(project_id) + "+";
result += "project" % QString().setNum(project_id) % "+";
}
}
result += m_collection_path;
@@ -624,7 +624,7 @@ NamesList ElementsLocation::nameList()
{
//Open the qet_directory file,
// to get the traductions name of this dir
QFile dir_conf(fileSystemPath() + "/qet_directory");
QFile dir_conf(fileSystemPath() % "/qet_directory");
if (dir_conf.exists() && dir_conf.open(
QIODevice::ReadOnly
| QIODevice::Text))