summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexidb/utils.cpp')
-rw-r--r--kexi/kexidb/utils.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp
index 36267b1f..d3d1361c 100644
--- a/kexi/kexidb/utils.cpp
+++ b/kexi/kexidb/utils.cpp
@@ -59,7 +59,7 @@ static void initList()
const uint tg = KexiDB::Field::typeGroup( t );
TypeGroupList list;
TQStringList name_list, str_list;
- if (KexiDB_typeCache->tlist.tqfind( tg )!=KexiDB_typeCache->tlist.end()) {
+ if (KexiDB_typeCache->tlist.find( tg )!=KexiDB_typeCache->tlist.end()) {
list = KexiDB_typeCache->tlist[ tg ];
name_list = KexiDB_typeCache->nlist[ tg ];
str_list = KexiDB_typeCache->slist[ tg ];
@@ -584,7 +584,7 @@ bool KexiDB::splitToTableAndFieldParts(const TQString& string,
TQString& tableName, TQString& fieldName,
SplitToTableAndFieldPartsOptions option)
{
- const int id = string.tqfind('.');
+ const int id = string.find('.');
if (option & SetFieldNameIfNoTableName && id==-1) {
tableName = TQString();
fieldName = string;
@@ -613,7 +613,7 @@ TQString KexiDB::formatNumberForVisibleDecimalPlaces(double value, int decimalPl
i--;
if (s[i]=='.') //remove '.'
i--;
- s = s.left(i+1).tqreplace('.', KGlobal::locale()->decimalSymbol());
+ s = s.left(i+1).replace('.', KGlobal::locale()->decimalSymbol());
return s;
}
if (decimalPlaces == 0)
@@ -671,13 +671,13 @@ bool KexiDB::isBuiltinTableFieldProperty( const TQCString& propertyName )
//! @todo always update this when new builtins appear!
#undef ADD
}
- return KexiDB_builtinFieldProperties->tqfind( propertyName );
+ return KexiDB_builtinFieldProperties->find( propertyName );
}
bool KexiDB::setFieldProperties( Field& field, const TQMap<TQCString, TQVariant>& values )
{
TQMapConstIterator<TQCString, TQVariant> it;
- if ( (it = values.tqfind("type")) != values.constEnd() ) {
+ if ( (it = values.find("type")) != values.constEnd() ) {
if (!setIntToFieldType(field, *it))
return false;
}
@@ -690,50 +690,50 @@ bool KexiDB::setFieldProperties( Field& field, const TQMap<TQCString, TQVariant>
uint constraints = field.constraints();
bool ok = true;
- if ( (it = values.tqfind("primaryKey")) != values.constEnd() )
+ if ( (it = values.find("primaryKey")) != values.constEnd() )
SET_BOOLEAN_FLAG(PrimaryKey, (*it).toBool());
- if ( (it = values.tqfind("indexed")) != values.constEnd() )
+ if ( (it = values.find("indexed")) != values.constEnd() )
SET_BOOLEAN_FLAG(Indexed, (*it).toBool());
- if ( (it = values.tqfind("autoIncrement")) != values.constEnd()
+ if ( (it = values.find("autoIncrement")) != values.constEnd()
&& KexiDB::Field::isAutoIncrementAllowed(field.type()) )
SET_BOOLEAN_FLAG(AutoInc, (*it).toBool());
- if ( (it = values.tqfind("unique")) != values.constEnd() )
+ if ( (it = values.find("unique")) != values.constEnd() )
SET_BOOLEAN_FLAG(Unique, (*it).toBool());
- if ( (it = values.tqfind("notNull")) != values.constEnd() )
+ if ( (it = values.find("notNull")) != values.constEnd() )
SET_BOOLEAN_FLAG(NotNull, (*it).toBool());
- if ( (it = values.tqfind("allowEmpty")) != values.constEnd() )
+ if ( (it = values.find("allowEmpty")) != values.constEnd() )
SET_BOOLEAN_FLAG(NotEmpty, !(*it).toBool());
field.setConstraints( constraints );
uint options = 0;
- if ( (it = values.tqfind("unsigned")) != values.constEnd()) {
+ if ( (it = values.find("unsigned")) != values.constEnd()) {
options |= KexiDB::Field::Unsigned;
if (!(*it).toBool())
options ^= KexiDB::Field::Unsigned;
}
field.setOptions( options );
- if ( (it = values.tqfind("name")) != values.constEnd())
+ if ( (it = values.find("name")) != values.constEnd())
field.setName( (*it).toString() );
- if ( (it = values.tqfind("caption")) != values.constEnd())
+ if ( (it = values.find("caption")) != values.constEnd())
field.setCaption( (*it).toString() );
- if ( (it = values.tqfind("description")) != values.constEnd())
+ if ( (it = values.find("description")) != values.constEnd())
field.setDescription( (*it).toString() );
- if ( (it = values.tqfind("length")) != values.constEnd())
+ if ( (it = values.find("length")) != values.constEnd())
field.setLength( (*it).isNull() ? 0/*default*/ : (*it).toUInt(&ok) );
if (!ok)
return false;
- if ( (it = values.tqfind("precision")) != values.constEnd())
+ if ( (it = values.find("precision")) != values.constEnd())
field.setPrecision( (*it).isNull() ? 0/*default*/ : (*it).toUInt(&ok) );
if (!ok)
return false;
- if ( (it = values.tqfind("defaultValue")) != values.constEnd())
+ if ( (it = values.find("defaultValue")) != values.constEnd())
field.setDefaultValue( *it );
- if ( (it = values.tqfind("width")) != values.constEnd())
+ if ( (it = values.find("width")) != values.constEnd())
field.setWidth( (*it).isNull() ? 0/*default*/ : (*it).toUInt(&ok) );
if (!ok)
return false;
- if ( (it = values.tqfind("visibleDecimalPlaces")) != values.constEnd()
+ if ( (it = values.find("visibleDecimalPlaces")) != values.constEnd()
&& KexiDB::supportsVisibleDecimalPlacesProperty(field.type()) )
field.setVisibleDecimalPlaces( (*it).isNull() ? -1/*default*/ : (*it).toInt(&ok) );
if (!ok)
@@ -773,7 +773,7 @@ bool KexiDB::isExtendedTableFieldProperty( const TQCString& propertyName )
ADD("displayWidget");
#undef ADD
}
- return KexiDB_extendedProperties->tqfind( propertyName );
+ return KexiDB_extendedProperties->find( propertyName );
}
bool KexiDB::setFieldProperty( Field& field, const TQCString& propertyName, const TQVariant& value )
@@ -924,7 +924,7 @@ TQVariant KexiDB::loadPropertyValueFromDom( const TQDomNode& node )
return TQCString(text.latin1());
}
else if (valueType == "number") { // integer or double
- if (text.tqfind('.')!=-1) {
+ if (text.find('.')!=-1) {
double val = text.toDouble(&ok);
if (ok)
return val;