summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/indexschema.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexidb/indexschema.cpp')
-rw-r--r--kexi/kexidb/indexschema.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kexi/kexidb/indexschema.cpp b/kexi/kexidb/indexschema.cpp
index 20dc9e829..c672305a2 100644
--- a/kexi/kexidb/indexschema.cpp
+++ b/kexi/kexidb/indexschema.cpp
@@ -41,11 +41,11 @@ IndexSchema::IndexSchema(TableSchema *tableSchema)
m_master_owned_rels.setAutoDelete(true); //rels at the master-side are owned
}
-IndexSchema::IndexSchema(const IndexSchema& idx, TableSchema& parentTable)
+IndexSchema::IndexSchema(const IndexSchema& idx, TableSchema& tqparentTable)
// : FieldList(static_cast<const FieldList&>(idx))//fields are not owned by IndexSchema object
: FieldList(false)//fields are not owned by IndexSchema object
, SchemaData(static_cast<const SchemaData&>(idx))
- , m_tableSchema(&parentTable)
+ , m_tableSchema(&tqparentTable)
, m_primary( idx.m_primary )
, m_unique( idx.m_unique )
, m_isAutoGenerated( idx.m_isAutoGenerated )
@@ -55,14 +55,14 @@ IndexSchema::IndexSchema(const IndexSchema& idx, TableSchema& parentTable)
//deep copy of the fields
for (Field::ListIterator f_it(idx.m_fields); f_it.current(); ++f_it) {
- Field *parentTableField = parentTable.field( f_it.current()->name() );
- if (!parentTableField) {
- KexiDBWarn << "IndexSchema::IndexSchema(const IndexSchema& idx, const TableSchema& parentTable): "
- "cannot find field '" << f_it.current()->name() << " in parentTable. Empty index will be created!" << endl;
+ Field *tqparentTableField = tqparentTable.field( f_it.current()->name() );
+ if (!tqparentTableField) {
+ KexiDBWarn << "IndexSchema::IndexSchema(const IndexSchema& idx, const TableSchema& tqparentTable): "
+ "cannot find field '" << f_it.current()->name() << " in tqparentTable. Empty index will be created!" << endl;
FieldList::clear();
break;
}
- addField( parentTableField );
+ addField( tqparentTableField );
}
//js TODO: copy relationships!
@@ -79,7 +79,7 @@ IndexSchema::~IndexSchema()
So, we need to detach all these relationships from details-side, corresponding indices.
*/
- QPtrListIterator<Relationship> it(m_master_owned_rels);
+ TQPtrListIterator<Relationship> it(m_master_owned_rels);
for (;it.current();++it) {
if (it.current()->detailsIndex()) {
it.current()->detailsIndex()->detachRelationship(it.current());
@@ -151,13 +151,13 @@ void IndexSchema::setForeignKey(bool set)
}
}
-QString IndexSchema::debugString()
+TQString IndexSchema::debugString()
{
- return QString("INDEX ") + schemaDataDebugString() + "\n"
+ return TQString("INDEX ") + schemaDataDebugString() + "\n"
+ (m_isForeignKey ? "FOREIGN KEY " : "")
+ (m_isAutoGenerated ? "AUTOGENERATED " : "")
+ (m_primary ? "PRIMARY " : "")
- + ((!m_primary) && m_unique ? "UNIQUE " : "")
+ + ((!m_primary) && m_unique ? "UNITQUE " : "")
+ FieldList::debugString();
}
@@ -172,18 +172,18 @@ void IndexSchema::attachRelationship(Relationship *rel, bool ownedByMaster)
return;
if (rel->masterIndex()==this) {
if (ownedByMaster) {
- if (m_master_owned_rels.findRef(rel)==-1) {
+ if (m_master_owned_rels.tqfindRef(rel)==-1) {
m_master_owned_rels.append(rel);
}
}
else {//not owned
- if (m_master_rels.findRef(rel)==-1) {
+ if (m_master_rels.tqfindRef(rel)==-1) {
m_master_rels.append(rel);
}
}
}
else if (rel->detailsIndex()==this) {
- if (m_details_rels.findRef(rel)==-1) {
+ if (m_details_rels.tqfindRef(rel)==-1) {
m_details_rels.append(rel);
}
}
@@ -193,7 +193,7 @@ void IndexSchema::detachRelationship(Relationship *rel)
{
if (!rel)
return;
- m_master_owned_rels.take( m_master_owned_rels.findRef(rel) ); //for sanity
- m_master_rels.take( m_master_rels.findRef(rel) ); //for sanity
- m_details_rels.take( m_details_rels.findRef(rel) ); //for sanity
+ m_master_owned_rels.take( m_master_owned_rels.tqfindRef(rel) ); //for sanity
+ m_master_rels.take( m_master_rels.tqfindRef(rel) ); //for sanity
+ m_details_rels.take( m_details_rels.tqfindRef(rel) ); //for sanity
}