Changeset 561 for trunk/src/xmlpatterns/functions/qpatternplatform.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/xmlpatterns/functions/qpatternplatform.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtXmlPatterns module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 60 60 * 61 61 * @ingroup Patternist_utils 62 * @author Frans Englich <f englich@trolltech.com>62 * @author Frans Englich <frans.englich@nokia.com> 63 63 */ 64 64 class PatternFlag … … 169 169 } 170 170 171 QRegExp PatternPlatform::parsePattern(const QString &pattern, 172 const ReportContext::Ptr &context) const 173 { 174 return parsePattern(pattern, context, this); 175 } 176 171 177 QRegExp PatternPlatform::parsePattern(const QString &patternP, 172 const DynamicContext::Ptr &context) const 178 const ReportContext::Ptr &context, 179 const SourceLocationReflection *const location) 173 180 { 174 181 if(patternP == QLatin1String("(.)\\3") || … … 177 184 { 178 185 context->error(QLatin1String("We don't want to hang infinitely on K2-MatchesFunc-9, " 179 "10 and 11. See Trolltech task 148505."),180 ReportContext::FOER0000, this);186 "10 and 11."), 187 ReportContext::FOER0000, location); 181 188 return QRegExp(); 182 189 } … … 190 197 rewrittenPattern.replace(QLatin1String("[\\i-[:]]"), QLatin1String("[a-zA-Z_]")); 191 198 rewrittenPattern.replace(QLatin1String("[\\c-[:]]"), QLatin1String("[a-zA-Z0-9_\\-\\.]")); 192 rewrittenPattern.replace(QLatin1String("\\i"), QLatin1String("[a-zA-Z:_]")); 193 rewrittenPattern.replace(QLatin1String("\\c"), QLatin1String("[a-zA-Z0-9:_\\-\\.]")); 194 rewrittenPattern.replace(QLatin1String("\\p{L}"), QLatin1String("[a-zA-Z]")); 195 rewrittenPattern.replace(QLatin1String("\\p{Lu}"), QLatin1String("[A-Z]")); 196 rewrittenPattern.replace(QLatin1String("\\p{Ll}"), QLatin1String("[a-z]")); 197 rewrittenPattern.replace(QLatin1String("\\p{Nd}"), QLatin1String("[0-9]")); 198 199 QRegExp retval(rewrittenPattern); 199 200 QRegExp retval(rewrittenPattern, Qt::CaseSensitive, QRegExp::W3CXmlSchema11); 200 201 201 202 if(retval.isValid()) … … 205 206 context->error(QtXmlPatterns::tr("%1 is an invalid regular expression pattern: %2") 206 207 .arg(formatExpression(patternP), retval.errorString()), 207 ReportContext::FORX0002, this);208 ReportContext::FORX0002, location); 208 209 return QRegExp(); 209 210 }
Note:
See TracChangeset
for help on using the changeset viewer.