Qt:Документация 4.3.2/qregexp-qt3

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] Qt 3 Support Members for QRegExp

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.



[править] Открытые функции


[править] Описание функций-членов

[править]
QRegExp::QRegExp ( const QString & pattern, bool cs, bool wildcard = false )

Use another constructor instead.

For example, if you have code like

 QRegExp rx("*.txt", false, true);

you can rewrite it as

 QRegExp rx("*.txt", Qt::CaseInsensitive, QRegExp::Wildcard);

[править]
bool QRegExp::caseSensitive () const

Use caseSensitivity() instead.

See also setCaseSensitive().

[править]
bool QRegExp::minimal () const

Use isMinimal() instead.

See also setMinimal().

[править] int QRegExp::search ( const QString & str, int from = 0, CaretMode caretMode = CaretAtZero ) const

Use indexIn() instead.

[править]
int QRegExp::searchRev ( const QString & str, int from = -1, CaretMode caretMode = CaretAtZero ) const

Use lastIndexIn() instead.

[править]
void QRegExp::setCaseSensitive ( bool sensitive )

Use setCaseSensitivity() instead.

See also caseSensitive().

[править]
void QRegExp::setWildcard ( bool wildcard )

Use setPatternSyntax() instead.

For example, if you have code like

 rx.setWildcard(wc);

you can rewrite it as

 rx.setPatternSyntax(wc ? QRegExp::Wildcard : QRegExp::RegExp);

See also wildcard().

[править]
bool QRegExp::wildcard () const

Use patternSyntax() instead.

For example, if you have code like

 bool wc = rx.wildcard();

you can rewrite it as

 bool wc = (rx.patternSyntax() == QRegExp::Wildcard);

See also setWildcard().


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2