summaryrefslogtreecommitdiffstats
path: root/src/stringset.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/stringset.h
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz
tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip
TQt4 port tellico
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/stringset.h')
-rw-r--r--src/stringset.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/stringset.h b/src/stringset.h
index 47667a0..68b27d5 100644
--- a/src/stringset.h
+++ b/src/stringset.h
@@ -14,8 +14,8 @@
#ifndef TELLICO_STRINGSET_H
#define TELLICO_STRINGSET_H
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
namespace Tellico {
@@ -28,21 +28,21 @@ public:
StringSet(int size = 17) : m_dict(size) {}
// replace instead of insert, to ensure unique keys
- void add(const QString& val) { if(!val.isEmpty()) m_dict.replace(val, reinterpret_cast<const int *>(1)); }
- void add(const QStringList& vals) {
- for(QStringList::ConstIterator it = vals.begin(), end = vals.end(); it != end; ++it) {
+ void add(const TQString& val) { if(!val.isEmpty()) m_dict.tqreplace(val, reinterpret_cast<const int *>(1)); }
+ void add(const TQStringList& vals) {
+ for(TQStringList::ConstIterator it = vals.begin(), end = vals.end(); it != end; ++it) {
add(*it);
}
}
- bool remove(const QString& val) { return !val.isEmpty() && m_dict.remove(val); }
+ bool remove(const TQString& val) { return !val.isEmpty() && m_dict.remove(val); }
void clear() { m_dict.clear(); }
- bool has(const QString& val) const { return !val.isEmpty() && (m_dict.find(val) != 0); }
+ bool has(const TQString& val) const { return !val.isEmpty() && (m_dict.tqfind(val) != 0); }
bool isEmpty() const { return m_dict.isEmpty(); }
uint count() const { return m_dict.count(); }
- QStringList toList() const {
- QStringList list;
- for(QDictIterator<int> it(m_dict); it.current(); ++it) {
+ TQStringList toList() const {
+ TQStringList list;
+ for(TQDictIterator<int> it(m_dict); it.current(); ++it) {
list << it.currentKey();
}
return list;
@@ -50,7 +50,7 @@ public:
private:
// use a dict for fast random access to keep track of the values
- QDict<int> m_dict;
+ TQDict<int> m_dict;
};
}