From 36ff2e99f7474c93b3a8f6578a2717dad81034d7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 20 Apr 2012 13:59:30 +0200 Subject: 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 Reviewed-by: Toby Tomkins --- src/xmlpatterns/functions/qpatternplatform.cpp | 2 +- ...favailableregexpflagsTheavailableflagsareformattedinacomplexway..txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xmlpatterns/functions/qpatternplatform.cpp b/src/xmlpatterns/functions/qpatternplatform.cpp index 91d3748..08dc2f1 100644 --- a/src/xmlpatterns/functions/qpatternplatform.cpp +++ b/src/xmlpatterns/functions/qpatternplatform.cpp @@ -64,7 +64,7 @@ namespace QPatternist class PatternFlag { public: - typedef QHash Hash; + typedef QMap Hash; inline PatternFlag() : flag(PatternPlatform::NoFlags) { diff --git a/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt b/tests/auto/xmlpatterns/stderrBaselines/PrintalistofavailableregexpflagsTheavailableflagsareformattedinacomplexway..txt index 9f09298..ff54402 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 -- cgit v1.2.1