summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2012-11-01 23:38:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-11 10:30:23 +0200
commitdfa36cd65d8874a2cd7831822da67349d9c87dad (patch)
tree9dd345c0c79047ea874baff0c33d13f711c1219b /src
parent8c4323c74d6cf6ba5a646936c912191e93939555 (diff)
Remove qSort usages from statemachines
QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I6edaafa75348a4e8795c3e29eeea9c45c178b621 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 1f14b0f8c5..883d62113c 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -73,6 +73,8 @@
#include <QtCore/qmetaobject.h>
#include <qdebug.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
/*!
@@ -438,7 +440,7 @@ QList<QAbstractState*> QStateMachinePrivate::computeStatesToExit(const QList<QAb
}
}
QList<QAbstractState*> statesToExit_sorted = statesToExit.toList();
- qSort(statesToExit_sorted.begin(), statesToExit_sorted.end(), stateExitLessThan);
+ std::sort(statesToExit_sorted.begin(), statesToExit_sorted.end(), stateExitLessThan);
return statesToExit_sorted;
}
@@ -541,7 +543,7 @@ QList<QAbstractState*> QStateMachinePrivate::computeStatesToEnter(const QList<QA
}
QList<QAbstractState*> statesToEnter_sorted = statesToEnter.toList();
- qSort(statesToEnter_sorted.begin(), statesToEnter_sorted.end(), stateEntryLessThan);
+ std::sort(statesToEnter_sorted.begin(), statesToEnter_sorted.end(), stateEntryLessThan);
return statesToEnter_sorted;
}