diff --git a/sources/conductorproperties.cpp b/sources/conductorproperties.cpp index 4d368e6b8..bedd970f0 100644 --- a/sources/conductorproperties.cpp +++ b/sources/conductorproperties.cpp @@ -19,6 +19,7 @@ #include #include #include +#include /** Constructeur par defaut */ @@ -789,16 +790,32 @@ void ConductorProperties::readStyle(const QString &style_string) { QStringList styles = style_string.split(";", Qt::SkipEmptyParts); #endif - QRegularExpression Rx("^\\s*([a-z-]+)\\s*:\\s*([a-z-]+)\\s*$"); - foreach (QString style_str, styles) { - if (Rx==QRegularExpression(style_str)) { - - QString style_name = Rx.namedCaptureGroups().at(1); - QString style_value = Rx.namedCaptureGroups().at(2); + QRegularExpression Rx("^(?[a-z-]+): (?[a-z-]+)$"); + if (!Rx.isValid()) + { + qWarning() <<"this is an error in the code" + << Rx.errorString() + << Rx.patternErrorOffset(); + return; + } + foreach (QString style_str, styles) + { + QRegularExpressionMatch match = Rx.match(style_str); + if (!match.hasMatch()) + { + qDebug()<<"no Match" + <