diff --git a/sources/ElementsCollection/elementscollectionwidget.cpp b/sources/ElementsCollection/elementscollectionwidget.cpp index f59c3a1bf..f691b358b 100644 --- a/sources/ElementsCollection/elementscollectionwidget.cpp +++ b/sources/ElementsCollection/elementscollectionwidget.cpp @@ -638,7 +638,11 @@ void ElementsCollectionWidget::search() } hideCollection(true); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove QStringList text_list = text.split("+", QString::SkipEmptyParts); +#else + QStringList text_list = text.split("+", Qt::SkipEmptyParts); +#endif QModelIndexList match_index; foreach (QString txt, text_list) { match_index << m_model->match(m_showed_index.isValid() ? m_model->index(0,0,m_showed_index) : m_model->index(0,0), diff --git a/sources/conductorproperties.cpp b/sources/conductorproperties.cpp index 035287d63..90f187019 100644 --- a/sources/conductorproperties.cpp +++ b/sources/conductorproperties.cpp @@ -730,7 +730,11 @@ void ConductorProperties::readStyle(const QString &style_string) { if (style_string.isEmpty()) return; // recupere la liste des couples style / valeur +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove QStringList styles = style_string.split(";", QString::SkipEmptyParts); +#else + QStringList styles = style_string.split(";", Qt::SkipEmptyParts); +#endif QRegExp rx("^\\s*([a-z-]+)\\s*:\\s*([a-z-]+)\\s*$"); foreach (QString style_str, styles) { diff --git a/sources/editor/graphicspart/customelementgraphicpart.cpp b/sources/editor/graphicspart/customelementgraphicpart.cpp index 3cb6f2e2f..fe4461a39 100644 --- a/sources/editor/graphicspart/customelementgraphicpart.cpp +++ b/sources/editor/graphicspart/customelementgraphicpart.cpp @@ -495,7 +495,11 @@ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde) resetStyles(); //Get the list of pair style/value +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove QStringList styles = qde.attribute("style").split(";", QString::SkipEmptyParts); +#else + QStringList styles = qde.attribute("style").split(";", Qt::SkipEmptyParts); +#endif //Check each pair of style QRegExp rx("^\\s*([a-z-]+)\\s*:\\s*([a-zA-Z-]+)\\s*$"); diff --git a/sources/factory/elementpicturefactory.cpp b/sources/factory/elementpicturefactory.cpp index 9e86d2019..5400ac46e 100644 --- a/sources/factory/elementpicturefactory.cpp +++ b/sources/factory/elementpicturefactory.cpp @@ -556,8 +556,11 @@ void ElementPictureFactory::setPainterStyle(const QDomElement &dom, QPainter &pa pen.setCapStyle(Qt::SquareCap); //Get the couples style/value +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove const QStringList styles = dom.attribute("style").split(";", QString::SkipEmptyParts); - +#else + const QStringList styles = dom.attribute("style").split(";", Qt::SkipEmptyParts); +#endif QRegExp rx("^\\s*([a-z-]+)\\s*:\\s*([a-zA-Z-]+)\\s*$"); for (QString style : styles) { if (rx.exactMatch(style)) { diff --git a/sources/qet.cpp b/sources/qet.cpp index 0b5c68a71..7f71bea1b 100644 --- a/sources/qet.cpp +++ b/sources/qet.cpp @@ -447,8 +447,12 @@ QString QET::joinWithSpaces(const QStringList &string_list) { */ QStringList QET::splitWithSpaces(const QString &string) { // les chaines sont separees par des espaces non echappes = avec un nombre nul ou pair de backslashes devant +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove QStringList escaped_strings = string.split(QRegExp("[^\\]?(?:\\\\)* "), QString::SkipEmptyParts); - +#else + QStringList escaped_strings = string.split(QRegExp("[^\\]?(?:\\\\)* "), Qt::SkipEmptyParts); +#endif + QStringList returned_list; foreach(QString escaped_string, escaped_strings) { returned_list << QET::unescapeSpaces(escaped_string); diff --git a/sources/titleblocktemplate.cpp b/sources/titleblocktemplate.cpp index 2d45c20c1..bc786d846 100644 --- a/sources/titleblocktemplate.cpp +++ b/sources/titleblocktemplate.cpp @@ -334,8 +334,12 @@ void TitleBlockTemplate::parseRows(const QString &rows_string) { // parse the rows attribute: we expect a serie of absolute heights QRegExp row_size_format("^([0-9]+)(?:px)?$", Qt::CaseInsensitive); bool conv_ok; - + +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove QStringList rows_descriptions = rows_string.split(QChar(';'), QString::SkipEmptyParts); +#else + QStringList rows_descriptions = rows_string.split(QChar(';'), Qt::SkipEmptyParts); +#endif foreach (QString rows_description, rows_descriptions) { if (row_size_format.exactMatch(rows_description)) { int row_size = row_size_format.capturedTexts().at(1).toInt(&conv_ok); @@ -357,8 +361,12 @@ void TitleBlockTemplate::parseColumns(const QString &cols_string) { QRegExp abs_col_size_format("^([0-9]+)(?:px)?$", Qt::CaseInsensitive); QRegExp rel_col_size_format("^([rt])([0-9]+)%$", Qt::CaseInsensitive); bool conv_ok; - + +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove QStringList cols_descriptions = cols_string.split(QChar(';'), QString::SkipEmptyParts); +#else + QStringList cols_descriptions = cols_string.split(QChar(';'), Qt::SkipEmptyParts); +#endif foreach (QString cols_description, cols_descriptions) { if (abs_col_size_format.exactMatch(cols_description)) { int col_size = abs_col_size_format.capturedTexts().at(1).toInt(&conv_ok);