summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/indexschema.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/indexschema.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/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 20dc9e82..c672305a 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
}