Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/xmlpatterns/functions/qpatternplatform.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    6060     *
    6161     * @ingroup Patternist_utils
    62      * @author Frans Englich <fenglich@trolltech.com>
     62     * @author Frans Englich <frans.englich@nokia.com>
    6363     */
    6464    class PatternFlag
     
    169169}
    170170
     171QRegExp PatternPlatform::parsePattern(const QString &pattern,
     172                                      const ReportContext::Ptr &context) const
     173{
     174    return parsePattern(pattern, context, this);
     175}
     176
    171177QRegExp PatternPlatform::parsePattern(const QString &patternP,
    172                                       const DynamicContext::Ptr &context) const
     178                                      const ReportContext::Ptr &context,
     179                                      const SourceLocationReflection *const location)
    173180{
    174181    if(patternP == QLatin1String("(.)\\3") ||
     
    177184    {
    178185        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);
    181188        return QRegExp();
    182189    }
     
    190197    rewrittenPattern.replace(QLatin1String("[\\i-[:]]"), QLatin1String("[a-zA-Z_]"));
    191198    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);
    200201
    201202    if(retval.isValid())
     
    205206        context->error(QtXmlPatterns::tr("%1 is an invalid regular expression pattern: %2")
    206207                                        .arg(formatExpression(patternP), retval.errorString()),
    207                                    ReportContext::FORX0002, this);
     208                                   ReportContext::FORX0002, location);
    208209        return QRegExp();
    209210    }
Note: See TracChangeset for help on using the changeset viewer.