From 8af7968d9309f6869a93ff6f1a4ef51bcff964fb Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 4 Jul 2011 21:50:57 +0000 Subject: TQt4 port kio-locate This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kio-locate@1239314 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/pattern.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/pattern.cpp') diff --git a/src/pattern.cpp b/src/pattern.cpp index 14c74e3..52ade3c 100644 --- a/src/pattern.cpp +++ b/src/pattern.cpp @@ -28,7 +28,7 @@ #include "pattern.h" -LocateRegExp::LocateRegExp(const QString& pattern, bool ignoreCase) +LocateRegExp::LocateRegExp(const TQString& pattern, bool ignoreCase) { m_ignoreCase = ignoreCase; setPattern(pattern); @@ -45,7 +45,7 @@ LocateRegExp::~LocateRegExp() } -bool LocateRegExp::isMatching(const QString& file) const +bool LocateRegExp::isMatching(const TQString& file) const { bool matching = m_regExp.search(file) >= 0; if (m_negated) { @@ -57,7 +57,7 @@ bool LocateRegExp::isMatching(const QString& file) const int LocateRegExp::getMatchPosition() const { - // Why is QRegExp::pos() non const? + // Why is TQRegExp::pos() non const? return const_cast(this)->m_regExp.pos(); } @@ -68,7 +68,7 @@ int LocateRegExp::getMatchedLength() const } -void LocateRegExp::setPattern(const QString& pattern) +void LocateRegExp::setPattern(const TQString& pattern) { m_negated = false; m_pattern = pattern; @@ -76,11 +76,11 @@ void LocateRegExp::setPattern(const QString& pattern) m_negated = true; m_pattern = m_pattern.mid(1, m_pattern.length()-1); } - m_regExp = QRegExp(m_pattern, !m_ignoreCase); + m_regExp = TQRegExp(m_pattern, !m_ignoreCase); } -QString LocateRegExp::getPattern() const +TQString LocateRegExp::getPattern() const { return m_pattern; } @@ -91,10 +91,10 @@ LocateRegExpList::~LocateRegExpList() } -LocateRegExpList& LocateRegExpList::operator = (const QStringList& list) +LocateRegExpList& LocateRegExpList::operator = (const TQStringList& list) { clear(); - QStringList::ConstIterator it = list.begin(); + TQStringList::ConstIterator it = list.begin(); for (; it != list.end(); ++it) { append(LocateRegExp((*it), (*it) == (*it).lower())); } @@ -102,7 +102,7 @@ LocateRegExpList& LocateRegExpList::operator = (const QStringList& list) } -bool LocateRegExpList::isMatchingOne(const QString& file) const +bool LocateRegExpList::isMatchingOne(const TQString& file) const { bool matches = false; LocateRegExpList::ConstIterator it = begin(); @@ -113,7 +113,7 @@ bool LocateRegExpList::isMatchingOne(const QString& file) const } -bool LocateRegExpList::isMatchingAll(const QString& file) const +bool LocateRegExpList::isMatchingAll(const TQString& file) const { bool matches = true; LocateRegExpList::ConstIterator it = begin(); -- cgit v1.2.3