summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xmlpatterns/api/qcoloringmessagehandler.cpp3
-rw-r--r--src/xmlpatterns/expr/qnodesort.cpp4
-rw-r--r--src/xmlpatterns/expr/qorderby.cpp6
-rw-r--r--src/xmlpatterns/expr/qtemplatemode.cpp4
-rw-r--r--tests/auto/xmlpatternssdk/ErrorHandler.cpp3
5 files changed, 13 insertions, 7 deletions
diff --git a/src/xmlpatterns/api/qcoloringmessagehandler.cpp b/src/xmlpatterns/api/qcoloringmessagehandler.cpp
index f55f96d..59be099 100644
--- a/src/xmlpatterns/api/qcoloringmessagehandler.cpp
+++ b/src/xmlpatterns/api/qcoloringmessagehandler.cpp
@@ -136,11 +136,12 @@ void ColoringMessageHandler::handleMessage(QtMsgType type,
break;
}
case QtCriticalMsg:
+ case QtTraceMsg:
/* Fallthrough. */
case QtDebugMsg:
{
Q_ASSERT_X(false, Q_FUNC_INFO,
- "message() is not supposed to receive QtCriticalMsg or QtDebugMsg.");
+ "message() is not supposed to receive QtCriticalMsg, QtTraceMsg or QtDebugMsg.");
return;
}
}
diff --git a/src/xmlpatterns/expr/qnodesort.cpp b/src/xmlpatterns/expr/qnodesort.cpp
index 58e33d0..9dd1bed 100644
--- a/src/xmlpatterns/expr/qnodesort.cpp
+++ b/src/xmlpatterns/expr/qnodesort.cpp
@@ -43,6 +43,8 @@
#include "qdeduplicateiterator_p.h"
#include "qnodesort_p.h"
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
using namespace QPatternist;
@@ -83,7 +85,7 @@ Item::Iterator::Ptr NodeSortExpression::evaluateSequence(const DynamicContext::P
return makeListIterator(nodes);
else
{
- qSort(nodes.begin(), nodes.end(), lessThanUsingNodeModel);
+ std::sort(nodes.begin(), nodes.end(), lessThanUsingNodeModel);
return Item::Iterator::Ptr(new DeduplicateIterator(nodes));
}
diff --git a/src/xmlpatterns/expr/qorderby.cpp b/src/xmlpatterns/expr/qorderby.cpp
index a5c395d..46ac7a3 100644
--- a/src/xmlpatterns/expr/qorderby.cpp
+++ b/src/xmlpatterns/expr/qorderby.cpp
@@ -51,6 +51,8 @@
#include "qorderby_p.h"
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
using namespace QPatternist;
@@ -182,11 +184,11 @@ Item::Iterator::Ptr OrderBy::evaluateSequence(const DynamicContext::Ptr &context
/* On one hand we could just disregard stability and always use qStableSort(), but maybe qSort()
* is a bit faster? */
if(m_stability == StableOrder)
- qStableSort(tuples.begin(), tuples.end(), sorter);
+ std::stable_sort(tuples.begin(), tuples.end(), sorter);
else
{
Q_ASSERT(m_stability == UnstableOrder);
- qSort(tuples.begin(), tuples.end(), sorter);
+ std::sort(tuples.begin(), tuples.end(), sorter);
}
return makeSequenceMappingIterator<Item>(ConstPtr(this),
diff --git a/src/xmlpatterns/expr/qtemplatemode.cpp b/src/xmlpatterns/expr/qtemplatemode.cpp
index f2a5b2a..a90efbc 100644
--- a/src/xmlpatterns/expr/qtemplatemode.cpp
+++ b/src/xmlpatterns/expr/qtemplatemode.cpp
@@ -41,6 +41,8 @@
#include "qtemplatemode_p.h"
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
using namespace QPatternist;
@@ -53,7 +55,7 @@ bool TemplateMode::lessThanByPriority(const TemplatePattern::Ptr &t1,
void TemplateMode::finalize()
{
- qSort(templatePatterns.begin(), templatePatterns.end(), lessThanByPriority);
+ std::sort(templatePatterns.begin(), templatePatterns.end(), lessThanByPriority);
/* Now we have a list of patterns sorted by priority. */
}
diff --git a/tests/auto/xmlpatternssdk/ErrorHandler.cpp b/tests/auto/xmlpatternssdk/ErrorHandler.cpp
index 74a6a6d..5b21d83 100644
--- a/tests/auto/xmlpatternssdk/ErrorHandler.cpp
+++ b/tests/auto/xmlpatternssdk/ErrorHandler.cpp
@@ -88,8 +88,7 @@ void qMessageHandler(QtMsgType type, const QMessageLogContext &, const QString &
return;
}
case QtDebugMsg: /* This enum is handled above in the if-clause. */
- /* Fallthrough. */
- default:
+ case QtTraceMsg:
{
Q_ASSERT(false);
return;