Fix deprecation warnings.
--HG-- branch : develop
This commit is contained in:
parent
48fbc9262e
commit
1847b068b5
|
@ -160,12 +160,18 @@ bool SavePieceOptions::mergeWith(const QUndoCommand *command)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QSet<quint32> currentSet;
|
|
||||||
currentSet.fromList(m_newDet.Dependencies());
|
|
||||||
|
|
||||||
const VPiece candidate = saveCommand->NewDet();
|
const VPiece candidate = saveCommand->NewDet();
|
||||||
const QSet<quint32> candidateSet;
|
|
||||||
candidateSet.fromList(candidate.Dependencies());
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
QList<quint32> currentDependencies = m_newDet.Dependencies();
|
||||||
|
QList<quint32> candidateDependencies = candidate.Dependencies();
|
||||||
|
|
||||||
|
auto currentSet = QSet<quint32>(currentDependencies.begin(), currentDependencies.end());
|
||||||
|
auto candidateSet = QSet<quint32>(candidateDependencies.begin(), candidateDependencies.end());
|
||||||
|
#else
|
||||||
|
auto currentSet = QSet<quint32>::fromList(m_newDet.Dependencies());
|
||||||
|
auto candidateSet = QSet<quint32>::fromList(candidate.Dependencies());
|
||||||
|
#endif
|
||||||
|
|
||||||
if (currentSet != candidateSet)
|
if (currentSet != candidateSet)
|
||||||
{
|
{
|
||||||
|
|
|
@ -127,12 +127,18 @@ bool SavePiecePathOptions::mergeWith(const QUndoCommand *command)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const QSet<quint32> currentSet;
|
|
||||||
currentSet.fromList(m_newPath.Dependencies());
|
|
||||||
|
|
||||||
const VPiecePath candidate = saveCommand->NewPath();
|
const VPiecePath candidate = saveCommand->NewPath();
|
||||||
const QSet<quint32> candidateSet;
|
|
||||||
candidateSet.fromList(candidate.Dependencies());
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
QList<quint32> currentDependencies = m_newPath.Dependencies();
|
||||||
|
QList<quint32> candidateDependencies = candidate.Dependencies();
|
||||||
|
|
||||||
|
auto currentSet = QSet<quint32>(currentDependencies.begin(), currentDependencies.end());
|
||||||
|
auto candidateSet = QSet<quint32>(candidateDependencies.begin(), candidateDependencies.end());
|
||||||
|
#else
|
||||||
|
auto currentSet = QSet<quint32>::fromList(m_newPath.Dependencies());
|
||||||
|
auto candidateSet = QSet<quint32>::fromList(candidate.Dependencies());
|
||||||
|
#endif
|
||||||
|
|
||||||
if (currentSet != candidateSet)
|
if (currentSet != candidateSet)
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,7 +185,11 @@ void TST_AbstractRegExp::CallTestCheckNoOriginalNamesInTranslation()
|
||||||
QFETCH(QString, originalName);
|
QFETCH(QString, originalName);
|
||||||
|
|
||||||
static const QStringList originalNames = AllNames();
|
static const QStringList originalNames = AllNames();
|
||||||
static const QSet<QString> names = QSet<QString>::fromList(originalNames);
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
static const auto names = QSet<QString>(originalNames.begin(), originalNames.end());
|
||||||
|
#else
|
||||||
|
static const auto names = QSet<QString>::fromList(originalNames);
|
||||||
|
#endif
|
||||||
|
|
||||||
const QString translated = m_trMs->VarToUser(originalName);
|
const QString translated = m_trMs->VarToUser(originalName);
|
||||||
if (names.contains(translated))
|
if (names.contains(translated))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user