Merge branch 'qelectrotech:qt6-cmake' into qt6-cmake

This commit is contained in:
elevatormind
2025-03-03 19:48:57 +01:00
committed by GitHub
2 changed files with 7 additions and 14 deletions

View File

@@ -942,18 +942,11 @@ QString BorderTitleBlock::incrementLetters(const QString &string) {
// separate previous digits from last digit // separate previous digits from last digit
// separe les digits precedents du dernier digit // separe les digits precedents du dernier digit
QString first_digits(string.left(string.length() - 1)); QString first_digits(string.left(string.length() - 1));
QChar last_digit(string.at(string.length() - 1)); char last_digit(string.at(string.length() - 1).unicode());
if (last_digit != 'Z') { if (last_digit != 'Z') {
// increments the last digit // increments the last digit
// incremente le dernier digit // incremente le dernier digit
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove last_digit = (char)(string[string.length()-1].unicode()) + 1;
last_digit = last_digit.toLatin1() + 1;
#else
# if TODO_LIST
# pragma message("@TODO remove code for QT 6 or later")
# endif
qDebug() << "Help code for QT 6 or later";
#endif
return(first_digits + QString(last_digit)); return(first_digits + QString(last_digit));
} else { } else {
return(incrementLetters(first_digits) + "A"); return(incrementLetters(first_digits) + "A");

View File

@@ -765,14 +765,14 @@ bool Element::fromXml(QDomElement &e,
QList <QDomElement> uuid_list = QET::findInDomElement(e, QList <QDomElement> uuid_list = QET::findInDomElement(e,
QStringLiteral("links_uuids"), QStringLiteral("links_uuids"),
QStringLiteral("link_uuid")); QStringLiteral("link_uuid"));
foreach (QDomElement qdo, uuid_list)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
foreach (QDomElement qdo, uuid_list)
tmp_uuids_link << qdo.attribute(QStringLiteral("uuid")); tmp_uuids_link << qdo.attribute(QStringLiteral("uuid"));
#else #else
#if TODO_LIST foreach (QDomElement qdo, uuid_list) {
#pragma message("@TODO remove code for QT 6 or later") tmp_uuids_link << QUuid(qdo.attribute(QStringLiteral("uuid")));
#endif }
qDebug()<<"Help code for QT 6 or later"; qInfo() << "tmp_uuids_link: " << tmp_uuids_link;
#endif #endif
//uuid of this element //uuid of this element
m_uuid = QUuid(e.attribute(QStringLiteral("uuid"), QUuid::createUuid().toString())); m_uuid = QUuid(e.attribute(QStringLiteral("uuid"), QUuid::createUuid().toString()));