use QVersionNumber and switch to "list of int" standard

This commit is contained in:
Remi Collet
2023-01-12 13:27:55 +01:00
committed by Laurent Trinques
parent 19d867f6a4
commit 038d2d7033
4 changed files with 17 additions and 13 deletions

View File

@@ -156,9 +156,9 @@ bool ElementPictureFactory::build(const ElementsLocation &location,
//Check if the current version can read the xml description
if (dom.hasAttribute("version"))
{
bool conv_ok;
qreal element_version = dom.attribute("version").toDouble(&conv_ok);
if (conv_ok && QET::version.toDouble() < element_version)
QVersionNumber qet_version = QVersionNumber::fromString(QET::version);
QVersionNumber element_version = QVersionNumber::fromString(dom.attribute("version"));
if (qet_version < element_version)
{
std::cerr << qPrintable(
QObject::tr("Avertissement : l'élément "