diff --git a/src/libs/vtools/undocommands/savepieceoptions.cpp b/src/libs/vtools/undocommands/savepieceoptions.cpp index a0fc4849c..5260961dc 100644 --- a/src/libs/vtools/undocommands/savepieceoptions.cpp +++ b/src/libs/vtools/undocommands/savepieceoptions.cpp @@ -160,12 +160,18 @@ bool SavePieceOptions::mergeWith(const QUndoCommand *command) } else { - const QSet currentSet; - currentSet.fromList(m_newDet.Dependencies()); - const VPiece candidate = saveCommand->NewDet(); - const QSet candidateSet; - candidateSet.fromList(candidate.Dependencies()); + +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + QList currentDependencies = m_newDet.Dependencies(); + QList candidateDependencies = candidate.Dependencies(); + + auto currentSet = QSet(currentDependencies.begin(), currentDependencies.end()); + auto candidateSet = QSet(candidateDependencies.begin(), candidateDependencies.end()); +#else + auto currentSet = QSet::fromList(m_newDet.Dependencies()); + auto candidateSet = QSet::fromList(candidate.Dependencies()); +#endif if (currentSet != candidateSet) { diff --git a/src/libs/vtools/undocommands/savepiecepathoptions.cpp b/src/libs/vtools/undocommands/savepiecepathoptions.cpp index 7c4c57a9b..28e7d0669 100644 --- a/src/libs/vtools/undocommands/savepiecepathoptions.cpp +++ b/src/libs/vtools/undocommands/savepiecepathoptions.cpp @@ -127,12 +127,18 @@ bool SavePiecePathOptions::mergeWith(const QUndoCommand *command) } else { - const QSet currentSet; - currentSet.fromList(m_newPath.Dependencies()); - const VPiecePath candidate = saveCommand->NewPath(); - const QSet candidateSet; - candidateSet.fromList(candidate.Dependencies()); + +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + QList currentDependencies = m_newPath.Dependencies(); + QList candidateDependencies = candidate.Dependencies(); + + auto currentSet = QSet(currentDependencies.begin(), currentDependencies.end()); + auto candidateSet = QSet(candidateDependencies.begin(), candidateDependencies.end()); +#else + auto currentSet = QSet::fromList(m_newPath.Dependencies()); + auto candidateSet = QSet::fromList(candidate.Dependencies()); +#endif if (currentSet != candidateSet) { diff --git a/src/test/TranslationsTest/tst_abstractregexp.cpp b/src/test/TranslationsTest/tst_abstractregexp.cpp index 4e2acf56e..24664ee9a 100644 --- a/src/test/TranslationsTest/tst_abstractregexp.cpp +++ b/src/test/TranslationsTest/tst_abstractregexp.cpp @@ -185,7 +185,11 @@ void TST_AbstractRegExp::CallTestCheckNoOriginalNamesInTranslation() QFETCH(QString, originalName); static const QStringList originalNames = AllNames(); - static const QSet names = QSet::fromList(originalNames); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + static const auto names = QSet(originalNames.begin(), originalNames.end()); +#else + static const auto names = QSet::fromList(originalNames); +#endif const QString translated = m_trMs->VarToUser(originalName); if (names.contains(translated))