From 36ff2e99f7474c93b3a8f6578a2717dad81034d7 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Fri, 20 Apr 2012 13:59:30 +0200
Subject: [PATCH] Use a QMap instead of a QHash for the regexp flags

This is unit-tested, so we need a predictable order. Therefore, we
can't use QHash anymore. Besides, this is just for 4 elements, so
there shouldn't be a perceptible overhead.

Change-Id: I878f77982e8070f3bc30bd2458e26e61b22f313d
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
---
 src/xmlpatterns/functions/qpatternplatform.cpp                  | 2 +-
 ...leregexpflagsTheavailableflagsareformattedinacomplexway..txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xmlpatterns/functions/qpatternplatform.cpp b/src/xmlpatterns/functions/qpatternplatform.cpp
index 91d37483..08dc2f1f 100644
--- a/src/xmlpatterns/functions/qpatternplatform.cpp
+++ b/src/xmlpatterns/functions/qpatternplatform.cpp
@@ -64,7 +64,7 @@ namespace QPatternist
     class PatternFlag
     {
     public:
-        typedef QHash<QChar, PatternFlag> Hash;
+        typedef QMap<QChar, PatternFlag> Hash;
 
         inline PatternFlag() : flag(PatternPlatform::NoFlags)
         {
diff --git a/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt b/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt
index 9f09298d..ff544022 100644
--- a/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt
+++ b/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt
@@ -1,5 +1,5 @@
 Error FORX0001 in file:///home/fenglich/dev/qt-xslt/tests/auto/xmlpatterns/queries/invalidRegexpFlag.xq, at line 1, column 1: I is an invalid flag for regular expressions. Valid flags are:
-x - Whitespace characters are removed, except when they appear in character classes
 i - Matches are case insensitive
 m - ^ and $ match the start and end of a line.
 s - . matches newline characters
+x - Whitespace characters are removed, except when they appear in character classes
-- 
GitLab