-rw-r--r-- | qmake/include/qregexp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/include/qregexp.h b/qmake/include/qregexp.h index 7bb777a..90f54bd 100644 --- a/qmake/include/qregexp.h +++ b/qmake/include/qregexp.h | |||
@@ -1,115 +1,115 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QRegExp class | 4 | ** Definition of QRegExp class |
5 | ** | 5 | ** |
6 | ** Created : 950126 | 6 | ** Created : 950126 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QREGEXP_H | 38 | #ifndef QREGEXP_H |
39 | #define QREGEXP_H | 39 | #define QREGEXP_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include "qstringlist.h" | 42 | #include "qstringlist.h" |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | #ifndef QT_NO_REGEXP | 45 | #ifndef QT_NO_REGEXP |
46 | class QRegExpEngine; | 46 | class QRegExpEngine; |
47 | struct QRegExpPrivate; | 47 | struct QRegExpPrivate; |
48 | 48 | ||
49 | class Q_EXPORT QRegExp | 49 | class Q_EXPORT QRegExp |
50 | { | 50 | { |
51 | public: | 51 | public: |
52 | enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }; | 52 | enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }; |
53 | 53 | ||
54 | QRegExp(); | 54 | QRegExp(); |
55 | QRegExp( const QString& pattern, bool caseSensitive = TRUE, | 55 | QRegExp( const QString& pattern, bool caseSensitive = TRUE, |
56 | bool wildcard = FALSE ); | 56 | bool wildcard = FALSE ); |
57 | QRegExp( const QRegExp& rx ); | 57 | QRegExp( const QRegExp& rx ); |
58 | ~QRegExp(); | 58 | ~QRegExp(); |
59 | QRegExp& operator=( const QRegExp& rx ); | 59 | QRegExp& operator=( const QRegExp& rx ); |
60 | 60 | ||
61 | bool operator==( const QRegExp& rx ) const; | 61 | bool operator==( const QRegExp& rx ) const; |
62 | bool operator!=( const QRegExp& rx ) const { return !operator==( rx ); } | 62 | bool operator!=( const QRegExp& rx ) const { return !operator==( rx ); } |
63 | 63 | ||
64 | bool isEmpty() const; | 64 | bool isEmpty() const; |
65 | bool isValid() const; | 65 | bool isValid() const; |
66 | QString pattern() const; | 66 | QString pattern() const; |
67 | void setPattern( const QString& pattern ); | 67 | void setPattern( const QString& pattern ); |
68 | bool caseSensitive() const; | 68 | bool caseSensitive() const; |
69 | void setCaseSensitive( bool sensitive ); | 69 | void setCaseSensitive( bool sensitive ); |
70 | #ifndef QT_NO_REGEXP_WILDCARD | 70 | #ifndef QT_NO_REGEXP_WILDCARD |
71 | bool wildcard() const; | 71 | bool wildcard() const; |
72 | void setWildcard( bool wildcard ); | 72 | void setWildcard( bool wildcard ); |
73 | #endif | 73 | #endif |
74 | bool minimal() const; | 74 | bool minimal() const; |
75 | void setMinimal( bool minimal ); | 75 | void setMinimal( bool minimal ); |
76 | 76 | ||
77 | bool exactMatch( const QString& str ) const; | 77 | bool exactMatch( const QString& str ) const; |
78 | #ifndef QT_NO_COMPAT | 78 | #ifndef QT_NO_COMPAT |
79 | int match( const QString& str, int index = 0, int *len = 0, | 79 | int match( const QString& str, int index = 0, int *len = 0, |
80 | bool indexIsStart = TRUE ) const; | 80 | bool indexIsStart = TRUE ) const; |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #if defined(qdoc) | 83 | #if defined(Q_QDOC) |
84 | int search( const QString& str, int offset = 0, | 84 | int search( const QString& str, int offset = 0, |
85 | CaretMode caretMode = CaretAtZero ) const; | 85 | CaretMode caretMode = CaretAtZero ) const; |
86 | int searchRev( const QString& str, int offset = -1, | 86 | int searchRev( const QString& str, int offset = -1, |
87 | CaretMode caretMode = CaretAtZero ) const; | 87 | CaretMode caretMode = CaretAtZero ) const; |
88 | #else | 88 | #else |
89 | // ### Qt 4.0: reduce these four to two functions | 89 | // ### Qt 4.0: reduce these four to two functions |
90 | int search( const QString& str, int offset = 0 ) const; | 90 | int search( const QString& str, int offset = 0 ) const; |
91 | int search( const QString& str, int offset, CaretMode caretMode ) const; | 91 | int search( const QString& str, int offset, CaretMode caretMode ) const; |
92 | int searchRev( const QString& str, int offset = -1 ) const; | 92 | int searchRev( const QString& str, int offset = -1 ) const; |
93 | int searchRev( const QString& str, int offset, CaretMode caretMode ) const; | 93 | int searchRev( const QString& str, int offset, CaretMode caretMode ) const; |
94 | #endif | 94 | #endif |
95 | int matchedLength() const; | 95 | int matchedLength() const; |
96 | #ifndef QT_NO_REGEXP_CAPTURE | 96 | #ifndef QT_NO_REGEXP_CAPTURE |
97 | int numCaptures() const; | 97 | int numCaptures() const; |
98 | QStringList capturedTexts(); | 98 | QStringList capturedTexts(); |
99 | QString cap( int nth = 0 ); | 99 | QString cap( int nth = 0 ); |
100 | int pos( int nth = 0 ); | 100 | int pos( int nth = 0 ); |
101 | QString errorString(); | 101 | QString errorString(); |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | static QString escape( const QString& str ); | 104 | static QString escape( const QString& str ); |
105 | 105 | ||
106 | private: | 106 | private: |
107 | void compile( bool caseSensitive ); | 107 | void compile( bool caseSensitive ); |
108 | 108 | ||
109 | static int caretIndex( int offset, CaretMode caretMode ); | 109 | static int caretIndex( int offset, CaretMode caretMode ); |
110 | 110 | ||
111 | QRegExpEngine *eng; | 111 | QRegExpEngine *eng; |
112 | QRegExpPrivate *priv; | 112 | QRegExpPrivate *priv; |
113 | }; | 113 | }; |
114 | #endif // QT_NO_REGEXP | 114 | #endif // QT_NO_REGEXP |
115 | #endif // QREGEXP_H | 115 | #endif // QREGEXP_H |