summaryrefslogtreecommitdiffstats
path: root/src/pattern.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 21:50:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 21:50:57 +0000
commit8af7968d9309f6869a93ff6f1a4ef51bcff964fb (patch)
treef875b03e53eb9170c93fc2d2a9d1047e570789e8 /src/pattern.cpp
parent0cbbdc735b3069758b90527554e43ad905e46665 (diff)
downloadtdeio-locate-8af7968d9309f6869a93ff6f1a4ef51bcff964fb.tar.gz
tdeio-locate-8af7968d9309f6869a93ff6f1a4ef51bcff964fb.zip
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
Diffstat (limited to 'src/pattern.cpp')
-rw-r--r--src/pattern.cpp20
1 files changed, 10 insertions, 10 deletions
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<LocateRegExp*>(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();