summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/tableschema.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/tableschema.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/tableschema.cpp')
-rw-r--r--kexi/kexidb/tableschema.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kexi/kexidb/tableschema.cpp b/kexi/kexidb/tableschema.cpp
index 8c0f5e07..b794f273 100644
--- a/kexi/kexidb/tableschema.cpp
+++ b/kexi/kexidb/tableschema.cpp
@@ -43,7 +43,7 @@ public:
void clearLookupFields()
{
- for (QMap<const Field*, LookupFieldSchema*>::ConstIterator it = lookupFields.constBegin();
+ for (TQMap<const Field*, LookupFieldSchema*>::ConstIterator it = lookupFields.constBegin();
it!=lookupFields.constEnd(); ++it)
{
delete it.data();
@@ -52,8 +52,8 @@ public:
}
Field *anyNonPKField;
- QMap<const Field*, LookupFieldSchema*> lookupFields;
- QPtrVector<LookupFieldSchema> lookupFieldsList;
+ TQMap<const Field*, LookupFieldSchema*> lookupFields;
+ TQPtrVector<LookupFieldSchema> lookupFieldsList;
};
}
//-------------------------------------
@@ -61,7 +61,7 @@ public:
using namespace KexiDB;
-TableSchema::TableSchema(const QString& name)
+TableSchema::TableSchema(const TQString& name)
: FieldList(true)
, SchemaData(KexiDB::TableObjectType)
, m_query(0)
@@ -105,7 +105,7 @@ TableSchema::TableSchema(const TableSchema& ts, int setId)
}
// used by Connection
-TableSchema::TableSchema(Connection *conn, const QString & name)
+TableSchema::TableSchema(Connection *conn, const TQString & name)
: FieldList(true)
, SchemaData(KexiDB::TableObjectType)
, m_conn( conn )
@@ -278,12 +278,12 @@ void TableSchema::clear()
}
/*
-void TableSchema::addPrimaryKey(const QString& key)
+void TableSchema::addPrimaryKey(const TQString& key)
{
m_primaryKeys.append(key);
}*/
-/*QStringList TableSchema::primaryKeys() const
+/*TQStringList TableSchema::primaryKeys() const
{
return m_primaryKeys;
}
@@ -294,12 +294,12 @@ bool TableSchema::hasPrimaryKeys() const
}
*/
-//const QString& TableSchema::name() const
+//const TQString& TableSchema::name() const
//{
// return m_name;
//}
-//void TableSchema::setName(const QString& name)
+//void TableSchema::setName(const TQString& name)
//{
// m_name=name;
/* ListIterator it( m_fields );
@@ -323,23 +323,23 @@ unsigned int TableSchema::fieldCount() const
return m_fields.count();
}*/
-QString TableSchema::debugString()
+TQString TableSchema::debugString()
{
return debugString(true);
}
-QString TableSchema::debugString(bool includeTableName)
+TQString TableSchema::debugString(bool includeTableName)
{
- QString s;
+ TQString s;
if (includeTableName)
- s = QString("TABLE ") + schemaDataDebugString() + "\n";
+ s = TQString("TABLE ") + schemaDataDebugString() + "\n";
s.append( FieldList::debugString() );
Field *f;
for (Field::ListIterator it(m_fields); (f = it.current()); ++it) {
LookupFieldSchema *lookupSchema = lookupFieldSchema( *f );
if (lookupSchema)
- s.append( QString("\n") + lookupSchema->debugString() );
+ s.append( TQString("\n") + lookupSchema->debugString() );
}
return s;
}
@@ -374,7 +374,7 @@ Field* TableSchema::anyNonPKField()
if (!d->anyNonPKField) {
Field *f;
Field::ListIterator it(m_fields);
- it.toLast(); //from the end (higher chances to find)
+ it.toLast(); //from the end (higher chances to tqfind)
for (; (f = it.current()); --it) {
if (!f->isPrimaryKey() && (!m_pkey || !m_pkey->hasField(f)))
break;
@@ -384,7 +384,7 @@ Field* TableSchema::anyNonPKField()
return d->anyNonPKField;
}
-bool TableSchema::setLookupFieldSchema( const QString& fieldName, LookupFieldSchema *lookupFieldSchema )
+bool TableSchema::setLookupFieldSchema( const TQString& fieldName, LookupFieldSchema *lookupFieldSchema )
{
Field *f = field(fieldName);
if (!f) {
@@ -393,7 +393,7 @@ bool TableSchema::setLookupFieldSchema( const QString& fieldName, LookupFieldSch
return false;
}
if (lookupFieldSchema)
- d->lookupFields.replace( f, lookupFieldSchema );
+ d->lookupFields.tqreplace( f, lookupFieldSchema );
else {
delete d->lookupFields[f];
d->lookupFields.remove( f );
@@ -407,7 +407,7 @@ LookupFieldSchema *TableSchema::lookupFieldSchema( const Field& field ) const
return d->lookupFields[ &field ];
}
-LookupFieldSchema *TableSchema::lookupFieldSchema( const QString& fieldName )
+LookupFieldSchema *TableSchema::lookupFieldSchema( const TQString& fieldName )
{
Field *f = TableSchema::field(fieldName);
if (!f)
@@ -415,7 +415,7 @@ LookupFieldSchema *TableSchema::lookupFieldSchema( const QString& fieldName )
return lookupFieldSchema( *f );
}
-const QPtrVector<LookupFieldSchema>& TableSchema::lookupFieldsList()
+const TQPtrVector<LookupFieldSchema>& TableSchema::lookupFieldsList()
{
if (d->lookupFields.isEmpty())
return d->lookupFieldsList;
@@ -426,7 +426,7 @@ const QPtrVector<LookupFieldSchema>& TableSchema::lookupFieldsList()
d->lookupFieldsList.resize( d->lookupFields.count() );
uint i = 0;
for (Field::ListIterator it(m_fields); it.current(); ++it) {
- QMap<const Field*, LookupFieldSchema*>::ConstIterator itMap = d->lookupFields.find( it.current() );
+ TQMap<const Field*, LookupFieldSchema*>::ConstIterator itMap = d->lookupFields.tqfind( it.current() );
if (itMap != d->lookupFields.constEnd()) {
d->lookupFieldsList.insert( i, itMap.data() );
i++;
@@ -437,7 +437,7 @@ const QPtrVector<LookupFieldSchema>& TableSchema::lookupFieldsList()
//--------------------------------------
-InternalTableSchema::InternalTableSchema(const QString& name)
+InternalTableSchema::InternalTableSchema(const TQString& name)
: TableSchema(name)
{
}