don't build code related to CClass if QT_NO_REGEXP_CCLASS is defined
authorRitt Konstantin <ritt.ks@gmail.com>
Fri, 15 Jul 2011 00:30:33 +0000 (04:30 +0400)
committerQt by Nokia <qt-info@nokia.com>
Fri, 26 Aug 2011 12:14:26 +0000 (14:14 +0200)
Change-Id: If86835b1065eeb95e0774f1b42870dcd5225da58
Reviewed-on: http://codereview.qt.nokia.com/3671
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/corelib/tools/qregexp.cpp

index 325320d..a93767f 100644 (file)
@@ -1252,7 +1252,9 @@ private:
 
     friend class Box;
 
+#ifndef QT_NO_REGEXP_CCLASS
     void setupCategoriesRangeMap();
+#endif
 
     /*
       This is the lexical analyzer for regular expressions.
@@ -1293,7 +1295,9 @@ private:
 
     int yyTok; // the last token read
     bool yyMayCapture; // set this to false to disable capturing
+#ifndef QT_NO_REGEXP_CCLASS
     QHash<QByteArray, QPair<int, int> > categoriesRangeMap; // fast lookup hash for xml schema extensions
+#endif
 
     friend struct QRegExpMatchState;
 };
@@ -2735,6 +2739,7 @@ void QRegExpEngine::Box::addAnchorsToEngine(const Box &to) const
     }
 }
 
+#ifndef QT_NO_REGEXP_CCLASS
 void QRegExpEngine::setupCategoriesRangeMap()
 {
    categoriesRangeMap.insert("IsBasicLatin",                           qMakePair(0x0000, 0x007F));
@@ -2880,6 +2885,7 @@ void QRegExpEngine::setupCategoriesRangeMap()
    categoriesRangeMap.insert("IsSupplementaryPrivateUseArea-A",        qMakePair(0xF0000, 0xFFFFF));
    categoriesRangeMap.insert("IsSupplementaryPrivateUseArea-B",        qMakePair(0x100000, 0x10FFFF));
 }
+#endif
 
 int QRegExpEngine::getChar()
 {