summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/fieldlist.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/kexidb/fieldlist.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/kexidb/fieldlist.cpp')
-rw-r--r--kexi/kexidb/fieldlist.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kexi/kexidb/fieldlist.cpp b/kexi/kexidb/fieldlist.cpp
index ee159c72..dea19876 100644
--- a/kexi/kexidb/fieldlist.cpp
+++ b/kexi/kexidb/fieldlist.cpp
@@ -60,10 +60,10 @@ FieldList::~FieldList()
void FieldList::clear()
{
-// m_name = QString::null;
+// m_name = TQString();
m_fields.clear();
m_fields_by_name.clear();
- m_sqlFields = QString::null;
+ m_sqlFields = TQString();
delete m_autoinc_fields;
m_autoinc_fields = 0;
}
@@ -81,20 +81,20 @@ FieldList& FieldList::insertField(uint index, KexiDB::Field *field)
return *this;
if (!field->name().isEmpty())
m_fields_by_name.insert(field->name().lower(),field);
- m_sqlFields = QString::null;
+ m_sqlFields = TQString();
return *this;
}
-void FieldList::renameField(const QString& oldName, const QString& newName)
+void FieldList::renameField(const TQString& oldName, const TQString& newName)
{
renameField( m_fields_by_name[ oldName ], newName );
}
-void FieldList::renameField(KexiDB::Field *field, const QString& newName)
+void FieldList::renameField(KexiDB::Field *field, const TQString& newName)
{
if (!field || field != m_fields_by_name[ field->name() ]) {
KexiDBFatal << "FieldList::renameField() no field found "
- << (field ? QString("\"%1\"").arg(field->name()) : QString::null) << endl;
+ << (field ? TQString("\"%1\"").tqarg(field->name()) : TQString()) << endl;
return;
}
m_fields_by_name.take( field->name() );
@@ -115,17 +115,17 @@ void FieldList::removeField(KexiDB::Field *field)
return;
m_fields_by_name.remove(field->name());
m_fields.remove(field);
- m_sqlFields = QString::null;
+ m_sqlFields = TQString();
}
-Field* FieldList::field(const QString& name)
+Field* FieldList::field(const TQString& name)
{
return m_fields_by_name[name];
}
-QString FieldList::debugString()
+TQString FieldList::debugString()
{
- QString dbg;
+ TQString dbg;
dbg.reserve(512);
Field::ListIterator it( m_fields );
Field *field;
@@ -156,19 +156,19 @@ void FieldList::debug()
fl->addField(f); \
}
-static QString subListWarning1(const QString& fname) {
- return QString("FieldList::subList() could not find field \"%1\"").arg(fname);
+static TQString subListWarning1(const TQString& fname) {
+ return TQString("FieldList::subList() could not find field \"%1\"").tqarg(fname);
}
-FieldList* FieldList::subList(const QString& n1, const QString& n2,
- const QString& n3, const QString& n4,
- const QString& n5, const QString& n6,
- const QString& n7, const QString& n8,
- const QString& n9, const QString& n10,
- const QString& n11, const QString& n12,
- const QString& n13, const QString& n14,
- const QString& n15, const QString& n16,
- const QString& n17, const QString& n18)
+FieldList* FieldList::subList(const TQString& n1, const TQString& n2,
+ const TQString& n3, const TQString& n4,
+ const TQString& n5, const TQString& n6,
+ const TQString& n7, const TQString& n8,
+ const TQString& n9, const TQString& n10,
+ const TQString& n11, const TQString& n12,
+ const TQString& n13, const TQString& n14,
+ const TQString& n15, const TQString& n16,
+ const TQString& n17, const TQString& n18)
{
if (n1.isEmpty())
return 0;
@@ -195,24 +195,24 @@ FieldList* FieldList::subList(const QString& n1, const QString& n2,
return fl;
}
-FieldList* FieldList::subList(const QStringList& list)
+FieldList* FieldList::subList(const TQStringList& list)
{
Field *f;
FieldList *fl = new FieldList(false);
- for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
+ for(TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
_ADD_FIELD( (*it) );
}
return fl;
}
-FieldList* FieldList::subList(const QValueList<uint>& list)
+FieldList* FieldList::subList(const TQValueList<uint>& list)
{
Field *f;
FieldList *fl = new FieldList(false);
- foreach(QValueList<uint>::ConstIterator, it, list) {
+ foreach(TQValueList<uint>::ConstIterator, it, list) {
f = field(*it);
if (!f) {
- KexiDBWarn << QString("FieldList::subList() could not find field at position %1").arg(*it) << endl;
+ KexiDBWarn << TQString("FieldList::subList() could not find field at position %1").tqarg(*it) << endl;
delete fl;
return 0;
}
@@ -221,10 +221,10 @@ FieldList* FieldList::subList(const QValueList<uint>& list)
return fl;
}
-QStringList FieldList::names() const
+TQStringList FieldList::names() const
{
- QStringList r;
-// for (QDictIterator<Field> it(m_fields_by_name);it.current();++it) {
+ TQStringList r;
+// for (TQDictIterator<Field> it(m_fields_by_name);it.current();++it) {
// r += it.currentKey().lower();
// }
for (Field::ListIterator it(m_fields); it.current(); ++it) {
@@ -234,15 +234,15 @@ QStringList FieldList::names() const
}
//static
-QString FieldList::sqlFieldsList(Field::List* list, Driver *driver,
- const QString& separator, const QString& tableAlias, int drvEscaping)
+TQString FieldList::sqlFieldsList(Field::List* list, Driver *driver,
+ const TQString& separator, const TQString& tableAlias, int drvEscaping)
{
if (!list)
- return QString::null;
- QString result;
+ return TQString();
+ TQString result;
result.reserve(256);
bool start = true;
- const QString tableAliasAndDot( tableAlias.isEmpty() ? QString::null : (tableAlias + ".") );
+ const TQString tableAliasAndDot( tableAlias.isEmpty() ? TQString() : (tableAlias + ".") );
for (Field::ListIterator it( *list ); it.current(); ++it) {
if (!start)
result += separator;
@@ -253,8 +253,8 @@ QString FieldList::sqlFieldsList(Field::List* list, Driver *driver,
return result;
}
-QString FieldList::sqlFieldsList(Driver *driver,
- const QString& separator, const QString& tableAlias, int drvEscaping)
+TQString FieldList::sqlFieldsList(Driver *driver,
+ const TQString& separator, const TQString& tableAlias, int drvEscaping)
{
if (!m_sqlFields.isEmpty())
return m_sqlFields;