summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:38:41 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:38:41 -0600
commitf0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (patch)
tree1fc538e179833e62caec21956bfe47a252be5a72 /kexi/kexidb
parent11191ef0b9908604d1d7aaca382b011ef22c454c (diff)
downloadkoffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.tar.gz
koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'kexi/kexidb')
-rw-r--r--kexi/kexidb/alter.cpp32
-rw-r--r--kexi/kexidb/connection.cpp156
-rw-r--r--kexi/kexidb/cursor.cpp2
-rw-r--r--kexi/kexidb/dbobjectnamevalidator.cpp2
-rw-r--r--kexi/kexidb/dbproperties.cpp36
-rw-r--r--kexi/kexidb/driver.cpp10
-rw-r--r--kexi/kexidb/driver_p.cpp2
-rw-r--r--kexi/kexidb/drivermanager.cpp16
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlconnection.cpp2
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxconnection.cpp10
-rw-r--r--kexi/kexidb/drivers/sqlite/sqliteadmin.cpp2
-rw-r--r--kexi/kexidb/drivers/sqlite/sqliteconnection.cpp8
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp4
-rw-r--r--kexi/kexidb/expression.cpp44
-rw-r--r--kexi/kexidb/field.cpp18
-rw-r--r--kexi/kexidb/fieldlist.cpp6
-rw-r--r--kexi/kexidb/lookupfieldschema.cpp12
-rw-r--r--kexi/kexidb/parser/parser_p.cpp36
-rw-r--r--kexi/kexidb/parser/sqlparser.cpp2
-rw-r--r--kexi/kexidb/parser/sqlparser.y4
-rw-r--r--kexi/kexidb/queryschema.cpp26
-rw-r--r--kexi/kexidb/queryschemaparameter.cpp4
-rw-r--r--kexi/kexidb/schemadata.cpp2
-rw-r--r--kexi/kexidb/simplecommandlineapp.cpp2
-rw-r--r--kexi/kexidb/utils.cpp14
25 files changed, 226 insertions, 226 deletions
diff --git a/kexi/kexidb/alter.cpp b/kexi/kexidb/alter.cpp
index 5386d3d6..f4a1346f 100644
--- a/kexi/kexidb/alter.cpp
+++ b/kexi/kexidb/alter.cpp
@@ -181,7 +181,7 @@ int AlterTableHandler::alteringTypeForProperty(const TQCString& propertyName)
if (KexiDB::isExtendedTableFieldProperty(propertyName))
return (int)ExtendedSchemaAlteringRequired;
KexiDBWarn << TQString("AlterTableHandler::alteringTypeForProperty(): property \"%1\" not found!")
- .tqarg(propertyName.data()) << endl;
+ .arg(propertyName.data()) << endl;
}
return res;
}
@@ -214,9 +214,9 @@ void AlterTableHandler::ChangeFieldPropertyAction::updateAlteringRequirements()
TQString AlterTableHandler::ChangeFieldPropertyAction::debugString(const DebugOptions& debugOptions)
{
TQString s = TQString("Set \"%1\" property for table field \"%2\" to \"%3\"")
- .tqarg(m_propertyName).tqarg(fieldName()).tqarg(m_newValue.toString());
+ .arg(m_propertyName).arg(fieldName()).arg(m_newValue.toString());
if (debugOptions.showUID)
- s.append(TQString(" (UID=%1)").tqarg(m_fieldUID));
+ s.append(TQString(" (UID=%1)").arg(m_fieldUID));
return s;
}
@@ -267,7 +267,7 @@ static void debugActionDict(AlterTableHandler::ActionDict *dict, int fieldUID, b
else
fieldName = "??";
TQString dbg = TQString("Action dict for field \"%1\" (%2, UID=%3):")
- .tqarg(fieldName).tqarg(dict->count()).tqarg(fieldUID);
+ .arg(fieldName).arg(dict->count()).arg(fieldUID);
KexiDBDbg << dbg << endl;
#ifdef KEXI_DEBUG_GUI
if (simulate)
@@ -495,9 +495,9 @@ void AlterTableHandler::RemoveFieldAction::updateAlteringRequirements()
TQString AlterTableHandler::RemoveFieldAction::debugString(const DebugOptions& debugOptions)
{
- TQString s = TQString("Remove table field \"%1\"").tqarg(fieldName());
+ TQString s = TQString("Remove table field \"%1\"").arg(fieldName());
if (debugOptions.showUID)
- s.append(TQString(" (UID=%1)").tqarg(uid()));
+ s.append(TQString(" (UID=%1)").arg(uid()));
return s;
}
@@ -583,11 +583,11 @@ void AlterTableHandler::InsertFieldAction::updateAlteringRequirements()
TQString AlterTableHandler::InsertFieldAction::debugString(const DebugOptions& debugOptions)
{
TQString s = TQString("Insert table field \"%1\" at position %2")
- .tqarg(m_field->name()).tqarg(m_index);
+ .arg(m_field->name()).arg(m_index);
if (debugOptions.showUID)
- s.append(TQString(" (UID=%1)").tqarg(m_fieldUID));
+ s.append(TQString(" (UID=%1)").arg(m_fieldUID));
if (debugOptions.showFieldDebug)
- s.append(TQString(" (%1)").tqarg(m_field->debugString()));
+ s.append(TQString(" (%1)").arg(m_field->debugString()));
return s;
}
@@ -710,9 +710,9 @@ void AlterTableHandler::MoveFieldPositionAction::updateAlteringRequirements()
TQString AlterTableHandler::MoveFieldPositionAction::debugString(const DebugOptions& debugOptions)
{
TQString s = TQString("Move table field \"%1\" to position %2")
- .tqarg(fieldName()).tqarg(m_index);
+ .arg(fieldName()).arg(m_index);
if (debugOptions.showUID)
- s.append(TQString(" (UID=%1)").tqarg(uid()));
+ s.append(TQString(" (UID=%1)").arg(uid()));
return s;
}
@@ -878,7 +878,7 @@ TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArgu
}
}
// - Debug
- TQString dbg = TQString("** Overall altering requirements: %1").tqarg(args.requirements);
+ TQString dbg = TQString("** Overall altering requirements: %1").arg(args.requirements);
KexiDBDbg << dbg << endl;
if (args.onlyComputeRequirements) {
@@ -892,14 +892,14 @@ TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArgu
if (args.simulate)
KexiUtils::addAlterTableActionDebug(dbg, 0);
#endif
- dbg = TQString("** Ordered, simplified actions (%1, was %2):").tqarg(currentActionsCount).tqarg(allActionsCount);
+ dbg = TQString("** Ordered, simplified actions (%1, was %2):").arg(currentActionsCount).arg(allActionsCount);
KexiDBDbg << dbg << endl;
#ifdef KEXI_DEBUG_GUI
if (args.simulate)
KexiUtils::addAlterTableActionDebug(dbg, 0);
#endif
for (int i=0; i<allActionsCount; i++) {
- debugAction(actionsVector[i], 1, args.simulate, TQString("%1: ").tqarg(i+1), args.debugString);
+ debugAction(actionsVector[i], 1, args.simulate, TQString("%1: ").arg(i+1), args.debugString);
}
if (args.requirements == 0) {//nothing to do
@@ -918,7 +918,7 @@ TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArgu
if (recreateTable) {
TQString tempDestTableName;
while (true) {
- tempDestTableName = TQString("%1_temp%2%3").tqarg(newTable->name()).tqarg(TQString::number(rand(), 16)).tqarg(TQString::number(rand(), 16));
+ tempDestTableName = TQString("%1_temp%2%3").arg(newTable->name()).arg(TQString::number(rand(), 16)).arg(TQString::number(rand(), 16));
if (!d->conn->tableSchema(tempDestTableName))
break;
}
@@ -1007,7 +1007,7 @@ TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArgu
// -Some source fields can be skipped in case when there are deleted fields.
// -Some destination fields can be skipped in case when there
// are new empty fields without fixed/default value.
- TQString sql = TQString("INSERT INTO %1 (").tqarg(d->conn->escapeIdentifier(newTable->name()));
+ TQString sql = TQString("INSERT INTO %1 (").arg(d->conn->escapeIdentifier(newTable->name()));
//insert list of dest. fields
bool first = true;
TQString sourceFields;
diff --git a/kexi/kexidb/connection.cpp b/kexi/kexidb/connection.cpp
index 34add49a..017e75e4 100644
--- a/kexi/kexidb/connection.cpp
+++ b/kexi/kexidb/connection.cpp
@@ -254,8 +254,8 @@ bool Connection::connect()
d->serverVersion.clear();
if (!(d->isConnected = drv_connect(d->serverVersion))) {
setError(m_driver->isFileDriver() ?
- i18n("Could not open \"%1\" project file.").tqarg(TQDir::convertSeparators(d->conn_data->fileName()))
- : i18n("Could not connect to \"%1\" database server.").tqarg(d->conn_data->serverInfoString()) );
+ i18n("Could not open \"%1\" project file.").arg(TQDir::convertSeparators(d->conn_data->fileName()))
+ : i18n("Could not connect to \"%1\" database server.").arg(d->conn_data->serverInfoString()) );
}
return d->isConnected;
}
@@ -363,7 +363,7 @@ bool Connection::drv_databaseExists( const TQString &dbName, bool ignoreErrors )
if (list.find( dbName )==list.end()) {
if (!ignoreErrors)
- setError(ERR_OBJECT_NOT_FOUND, i18n("The database \"%1\" does not exist.").tqarg(dbName));
+ setError(ERR_OBJECT_NOT_FOUND, i18n("The database \"%1\" does not exist.").arg(dbName));
return false;
}
@@ -384,19 +384,19 @@ bool Connection::databaseExists( const TQString &dbName, bool ignoreErrors )
if (!file.exists() || ( !file.isFile() && !file.isSymLink()) ) {
if (!ignoreErrors)
setError(ERR_OBJECT_NOT_FOUND, i18n("Database file \"%1\" does not exist.")
- .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) );
+ .arg(TQDir::convertSeparators(d->conn_data->fileName())) );
return false;
}
if (!file.isReadable()) {
if (!ignoreErrors)
setError(ERR_ACCESS_RIGHTS, i18n("Database file \"%1\" is not readable.")
- .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) );
+ .arg(TQDir::convertSeparators(d->conn_data->fileName())) );
return false;
}
if (!file.isWritable()) {
if (!ignoreErrors)
setError(ERR_ACCESS_RIGHTS, i18n("Database file \"%1\" is not writable.")
- .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) );
+ .arg(TQDir::convertSeparators(d->conn_data->fileName())) );
return false;
}
return true;
@@ -424,7 +424,7 @@ bool Connection::databaseExists( const TQString &dbName, bool ignoreErrors )
#define createDatabase_CLOSE \
{ if (!closeDatabase()) { \
- setError(i18n("Database \"%1\" created but could not be closed after creation.").tqarg(dbName) ); \
+ setError(i18n("Database \"%1\" created but could not be closed after creation.").arg(dbName) ); \
return false; \
} }
@@ -438,12 +438,12 @@ bool Connection::createDatabase( const TQString &dbName )
return false;
if (databaseExists( dbName )) {
- setError(ERR_OBJECT_EXISTS, i18n("Database \"%1\" already exists.").tqarg(dbName) );
+ setError(ERR_OBJECT_EXISTS, i18n("Database \"%1\" already exists.").arg(dbName) );
return false;
}
if (m_driver->isSystemDatabaseName( dbName )) {
setError(ERR_SYSTEM_NAME_RESERVED,
- i18n("Cannot create database \"%1\". This name is reserved for system database.").tqarg(dbName) );
+ i18n("Cannot create database \"%1\". This name is reserved for system database.").arg(dbName) );
return false;
}
if (m_driver->isFileDriver()) {
@@ -458,7 +458,7 @@ bool Connection::createDatabase( const TQString &dbName )
//low-level create
if (!drv_createDatabase( dbName )) {
- setError(i18n("Error creating database \"%1\" on the server.").tqarg(dbName) );
+ setError(i18n("Error creating database \"%1\" on the server.").arg(dbName) );
closeDatabase();//sanity
return false;
}
@@ -472,7 +472,7 @@ bool Connection::createDatabase( const TQString &dbName )
if (!tmpdbName.isEmpty() || !m_driver->d->isDBOpenedAfterCreate) {
//db need to be opened
if (!useDatabase( dbName, false/*not yet kexi compatible!*/ )) {
- setError(i18n("Database \"%1\" created but could not be opened.").tqarg(dbName) );
+ setError(i18n("Database \"%1\" created but could not be opened.").arg(dbName) );
return false;
}
}
@@ -566,7 +566,7 @@ bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool
if (!drv_useDatabase( my_dbName, cancelled, msgHandler )) {
if (cancelled && *cancelled)
return false;
- TQString msg(i18n("Opening database \"%1\" failed.").tqarg( my_dbName ));
+ TQString msg(i18n("Opening database \"%1\" failed.").arg( my_dbName ));
if (error())
setError( this, msg );
else
@@ -589,7 +589,7 @@ bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool
d->databaseVersion.major = num;
/* if (true!=querySingleNumber(
"select db_value from kexi__db where db_property=" + m_driver->escapeString(TQString("kexidb_major_ver")), num)) {
- d->errorInvalidDBContents(notfound_str.tqarg("kexidb_major_ver"));
+ d->errorInvalidDBContents(notfound_str.arg("kexidb_major_ver"));
return false;
}*/
num = d->dbProperties->value("kexidb_minor_ver").toInt(&ok);
@@ -598,7 +598,7 @@ bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool
d->databaseVersion.minor = num;
/* if (true!=querySingleNumber(
"select db_value from kexi__db where db_property=" + m_driver->escapeString(TQString("kexidb_minor_ver")), num)) {
- d->errorInvalidDBContents(notfound_str.tqarg("kexidb_minor_ver"));
+ d->errorInvalidDBContents(notfound_str.arg("kexidb_minor_ver"));
return false;
}*/
@@ -607,8 +607,8 @@ bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool
if (m_driver->versionMajor()!=KexiDB::versionMajor()) {
setError(ERR_INCOMPAT_DATABASE_VERSION,
i18n("Database version (%1) does not match Kexi application's version (%2)")
- .tqarg( TQString("%1.%2").tqarg(versionMajor()).tqarg(versionMinor()) )
- .tqarg( TQString("%1.%2").tqarg(KexiDB::versionMajor()).tqarg(KexiDB::versionMinor()) ) );
+ .arg( TQString("%1.%2").arg(versionMajor()).arg(versionMinor()) )
+ .arg( TQString("%1.%2").arg(KexiDB::versionMajor()).arg(KexiDB::versionMinor()) ) );
return false;
}
if (m_driver->versionMinor()!=KexiDB::versionMinor()) {
@@ -686,7 +686,7 @@ bool Connection::useTemporaryDatabaseIfNeeded(TQString &tmpdbName)
if (!ret) {
setError(errorNum(),
i18n("Error during starting temporary connection using \"%1\" database name.")
- .tqarg(tmpdbName) );
+ .arg(tmpdbName) );
return false;
}
}
@@ -725,7 +725,7 @@ bool Connection::dropDatabase( const TQString &dbName )
}
if (m_driver->isSystemDatabaseName( dbToDrop )) {
- setError(ERR_SYSTEM_NAME_RESERVED, i18n("Cannot delete system database \"%1\".").tqarg(dbToDrop) );
+ setError(ERR_SYSTEM_NAME_RESERVED, i18n("Cannot delete system database \"%1\".").arg(dbToDrop) );
return false;
}
@@ -765,7 +765,7 @@ TQStringList Connection::objectNames(int objType, bool* ok)
if (objType==KexiDB::AnyObjectType)
sql = "SELECT o_name FROM kexi__objects";
else
- sql = TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType);
+ sql = TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1").arg(objType);
Cursor *c = executeQuery(sql);
if (!c) {
@@ -852,7 +852,7 @@ TQValueList<int> Connection::objectIds(int objType)
return list;
Cursor *c = executeQuery(
- TQString::fromLatin1("SELECT o_id, o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType));
+ TQString::fromLatin1("SELECT o_id, o_name FROM kexi__objects WHERE o_type=%1").arg(objType));
if (!c)
return list;
for (c->moveFirst(); !c->eof(); c->moveNext())
@@ -903,12 +903,12 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem
if (field->isFPNumericType() && field->precision()>0) {
if (field->scale()>0)
- v += TQString::fromLatin1("(%1,%2)").tqarg(field->precision()).tqarg(field->scale());
+ v += TQString::fromLatin1("(%1,%2)").arg(field->precision()).arg(field->scale());
else
- v += TQString::fromLatin1("(%1)").tqarg(field->precision());
+ v += TQString::fromLatin1("(%1)").arg(field->precision());
}
else if (field->type()==Field::Text && field->length()>0)
- v += TQString::fromLatin1("(%1)").tqarg(field->length());
+ v += TQString::fromLatin1("(%1)").arg(field->length());
if (autoinc)
v += (" " +
@@ -1163,12 +1163,12 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
TQString internalUniqueTableAlias( TQString("__kexidb_") + lookupTable->name() + "_"
+ TQString::number(internalUniqueTableAliasNumber++) );
s_additional_joins += TQString("LEFT OUTER JOIN %1 AS %2 ON %3.%4=%5.%6")
- .tqarg(escapeIdentifier(lookupTable->name(), options.identifierEscaping))
- .tqarg(internalUniqueTableAlias)
- .tqarg(escapeIdentifier(f->table()->name(), options.identifierEscaping))
- .tqarg(escapeIdentifier(f->name(), options.identifierEscaping))
- .tqarg(internalUniqueTableAlias)
- .tqarg(escapeIdentifier(boundField->name(), options.identifierEscaping));
+ .arg(escapeIdentifier(lookupTable->name(), options.identifierEscaping))
+ .arg(internalUniqueTableAlias)
+ .arg(escapeIdentifier(f->table()->name(), options.identifierEscaping))
+ .arg(escapeIdentifier(f->name(), options.identifierEscaping))
+ .arg(internalUniqueTableAlias)
+ .arg(escapeIdentifier(boundField->name(), options.identifierEscaping));
//add visibleField to the list of SELECTed fields //if it is not yet present there
//not needed if (!querySchema.findTableField( visibleField->table()->name()+"."+visibleField->name() )) {
@@ -1221,12 +1221,12 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
kexidb_subquery_prefix + lookupQuery->name() + "_"
+ TQString::number(internalUniqueQueryAliasNumber++) );
s_additional_joins += TQString("LEFT OUTER JOIN (%1) AS %2 ON %3.%4=%5.%6")
- .tqarg(selectStatement( *lookupQuery, params, options ))
- .tqarg(internalUniqueQueryAlias)
- .tqarg(escapeIdentifier(f->table()->name(), options.identifierEscaping))
- .tqarg(escapeIdentifier(f->name(), options.identifierEscaping))
- .tqarg(internalUniqueQueryAlias)
- .tqarg(escapeIdentifier(boundColumnInfo->aliasOrName(), options.identifierEscaping));
+ .arg(selectStatement( *lookupQuery, params, options ))
+ .arg(internalUniqueQueryAlias)
+ .arg(escapeIdentifier(f->table()->name(), options.identifierEscaping))
+ .arg(escapeIdentifier(f->name(), options.identifierEscaping))
+ .arg(internalUniqueQueryAlias)
+ .arg(escapeIdentifier(boundColumnInfo->aliasOrName(), options.identifierEscaping));
if (!s_additional_fields.isEmpty())
s_additional_fields += TQString::fromLatin1(", ");
@@ -1306,7 +1306,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
s_from += TQString::fromLatin1("(");
s_from += selectStatement( *it.current(), params, options );
s_from += TQString::fromLatin1(") AS %1%2")
- .tqarg(kexidb_subquery_prefix).tqarg(subqueries_for_lookup_data_counter);
+ .arg(kexidb_subquery_prefix).arg(subqueries_for_lookup_data_counter);
}
sql += s_from;
}
@@ -1541,7 +1541,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
if (m_driver->isSystemObjectName( tableName )) {
clearError();
setError(ERR_SYSTEM_NAME_RESERVED, i18n("System name \"%1\" cannot be used as table name.")
- .tqarg(tableSchema->name()));
+ .arg(tableSchema->name()));
return false;
}
@@ -1550,7 +1550,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
clearError();
setError(ERR_SYSTEM_NAME_RESERVED,
i18n("System name \"%1\" cannot be used as one of fields in \"%2\" table.")
- .tqarg(sys_field->name()).tqarg(tableName));
+ .arg(sys_field->name()).arg(tableName));
return false;
}
}
@@ -1565,7 +1565,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
if (existingTable == tableSchema) {
clearError();
setError(ERR_OBJECT_EXISTS,
- i18n("Could not create the same table \"%1\" twice.").tqarg(tableSchema->name()) );
+ i18n("Could not create the same table \"%1\" twice.").arg(tableSchema->name()) );
return false;
}
//TODO(js): update any structure (e.g. queries) that depend on this table!
@@ -1579,7 +1579,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
else {
if (this->tableSchema( tableSchema->name() ) != 0) {
clearError();
- setError(ERR_OBJECT_EXISTS, i18n("Table \"%1\" already exists.").tqarg(tableSchema->name()) );
+ setError(ERR_OBJECT_EXISTS, i18n("Table \"%1\" already exists.").arg(tableSchema->name()) );
return false;
}
}
@@ -1707,7 +1707,7 @@ tristate Connection::dropTable( KexiDB::TableSchema* tableSchema, bool alsoRemov
|| this->tableSchema(tableSchema->name())!=tableSchema
|| this->tableSchema(tableSchema->id())!=tableSchema)
{
- setError(ERR_OBJECT_NOT_FOUND, errmsg.tqarg(tableSchema->name())
+ setError(ERR_OBJECT_NOT_FOUND, errmsg.arg(tableSchema->name())
+i18n("Unexpected name or identifier."));
return false;
}
@@ -1718,7 +1718,7 @@ tristate Connection::dropTable( KexiDB::TableSchema* tableSchema, bool alsoRemov
//sanity checks:
if (m_driver->isSystemObjectName( tableSchema->name() )) {
- setError(ERR_SYSTEM_NAME_RESERVED, errmsg.tqarg(tableSchema->name()) + d->strItIsASystemObject());
+ setError(ERR_SYSTEM_NAME_RESERVED, errmsg.arg(tableSchema->name()) + d->strItIsASystemObject());
return false;
}
@@ -1757,7 +1757,7 @@ tristate Connection::dropTable( const TQString& table )
TableSchema* ts = tableSchema( table );
if (!ts) {
setError(ERR_OBJECT_NOT_FOUND, i18n("Table \"%1\" does not exist.")
- .tqarg(table));
+ .arg(table));
return false;
}
return dropTable(ts);
@@ -1772,7 +1772,7 @@ tristate Connection::alterTable( TableSchema& tableSchema, TableSchema& newTable
if (&tableSchema == &newTableSchema) {
setError(ERR_OBJECT_THE_SAME, i18n("Could not alter table \"%1\" using the same table.")
- .tqarg(tableSchema.name()));
+ .arg(tableSchema.name()));
return false;
}
//TODO(js): implement real altering
@@ -1793,18 +1793,18 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam
{
clearError();
if (&tableSchema!=d->tables[tableSchema.id()]) {
- setError(ERR_OBJECT_NOT_FOUND, i18n("Unknown table \"%1\"").tqarg(tableSchema.name()));
+ setError(ERR_OBJECT_NOT_FOUND, i18n("Unknown table \"%1\"").arg(tableSchema.name()));
return false;
}
if (newName.isEmpty() || !KexiUtils::isIdentifier(newName)) {
- setError(ERR_INVALID_IDENTIFIER, i18n("Invalid table name \"%1\"").tqarg(newName));
+ setError(ERR_INVALID_IDENTIFIER, i18n("Invalid table name \"%1\"").arg(newName));
return false;
}
const TQString oldTableName = tableSchema.name();
const TQString newTableName = newName.lower().stripWhiteSpace();
if (oldTableName.lower().stripWhiteSpace() == newTableName) {
setError(ERR_OBJECT_THE_SAME, i18n("Could rename table \"%1\" using the same name.")
- .tqarg(newTableName));
+ .arg(newTableName));
return false;
}
//TODO: alter table name for server DB backends!
@@ -1816,7 +1816,7 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam
if (!replace && destTableExists) {
setError(ERR_OBJECT_EXISTS,
i18n("Could not rename table \"%1\" to \"%2\". Table \"%3\" already exists.")
- .tqarg(tableSchema.name()).tqarg(newName).tqarg(newName));
+ .arg(tableSchema.name()).arg(newName).arg(newName));
return false;
}
@@ -1839,12 +1839,12 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam
// the new table owns the previous table's id:
if (!executeSQL(TQString::fromLatin1("UPDATE kexi__objects SET o_id=%1 WHERE o_id=%2 AND o_type=%3")
- .tqarg(origID).tqarg(tableSchema.id()).tqarg((int)TableObjectType)))
+ .arg(origID).arg(tableSchema.id()).arg((int)TableObjectType)))
{
return false;
}
if (!executeSQL(TQString::fromLatin1("UPDATE kexi__fields SET t_id=%1 WHERE t_id=%2")
- .tqarg(origID).tqarg(tableSchema.id())))
+ .arg(origID).arg(tableSchema.id())))
{
return false;
}
@@ -1862,7 +1862,7 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam
// Update kexi__objects
//TODO
if (!executeSQL(TQString::fromLatin1("UPDATE kexi__objects SET o_name=%1 WHERE o_id=%2")
- .tqarg(m_driver->escapeString(tableSchema.name())).tqarg(tableSchema.id())))
+ .arg(m_driver->escapeString(tableSchema.name())).arg(tableSchema.id())))
{
alterTableName_ERR;
return false;
@@ -1890,7 +1890,7 @@ bool Connection::drv_alterTableName(TableSchema& tableSchema, const TQString& ne
tableSchema.setName(newName);
if (!executeSQL(TQString::fromLatin1("ALTER TABLE %1 RENAME TO %2")
- .tqarg(escapeIdentifier(oldTableName)).tqarg(escapeIdentifier(newName))))
+ .arg(escapeIdentifier(oldTableName)).arg(escapeIdentifier(newName))))
{
tableSchema.setName(oldTableName); //restore old name
return false;
@@ -1938,7 +1938,7 @@ bool Connection::dropQuery( const TQString& query )
QuerySchema* qs = querySchema( query );
if (!qs) {
setError(ERR_OBJECT_NOT_FOUND, i18n("Query \"%1\" does not exist.")
- .tqarg(query));
+ .arg(query));
return false;
}
return dropQuery(qs);
@@ -2014,7 +2014,7 @@ bool Connection::rollbackAutoCommitTransaction(const Transaction& trans)
#define SET_ERR_TRANS_NOT_SUPP \
{ setError(ERR_UNSUPPORTED_DRV_FEATURE, \
- i18n("Transactions are not supported for \"%1\" driver.").tqarg(m_driver->name() )); }
+ i18n("Transactions are not supported for \"%1\" driver.").arg(m_driver->name() )); }
#define SET_BEGIN_TR_ERROR \
{ if (!error()) \
@@ -2270,7 +2270,7 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata )
{
//not found: retrieve schema
/* KexiDB::Cursor *cursor;
- if (!(cursor = executeQuery( TQString("select * from kexi__objects where o_id='%1'").tqarg(objId) )))
+ if (!(cursor = executeQuery( TQString("select * from kexi__objects where o_id='%1'").arg(objId) )))
return false;
if (!cursor->moveFirst()) {
deleteCursor(cursor);
@@ -2287,7 +2287,7 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata )
}
sdata.m_name = data[2].toString();
if (!KexiUtils::isIdentifier( sdata.m_name )) {
- setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"").tqarg(sdata.m_name));
+ setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"").arg(sdata.m_name));
return false;
}
sdata.m_caption = data[3].toString();
@@ -2302,7 +2302,7 @@ tristate Connection::loadObjectSchemaData( int objectID, SchemaData &sdata )
RowData data;
if (true!=querySingleRecord(TQString::fromLatin1(
"SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1")
- .tqarg(objectID), data))
+ .arg(objectID), data))
return cancelled;
return setupObjectSchemaData( data, sdata );
}
@@ -2312,7 +2312,7 @@ tristate Connection::loadObjectSchemaData( int objectType, const TQString& objec
RowData data;
if (true!=querySingleRecord(TQString::fromLatin1("SELECT o_id, o_type, o_name, o_caption, o_desc "
"FROM kexi__objects WHERE o_type=%1 AND lower(o_name)=%2")
- .tqarg(objectType).tqarg(m_driver->valueToSQL(Field::Text, objectName.lower())), data))
+ .arg(objectType).arg(m_driver->valueToSQL(Field::Text, objectName.lower())), data))
return cancelled;
return setupObjectSchemaData( data, sdata );
}
@@ -2326,7 +2326,7 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject )
int existingID;
if (true == querySingleNumber(TQString::fromLatin1(
"SELECT o_id FROM kexi__objects WHERE o_type=%1 AND lower(o_name)=%2")
- .tqarg(sdata.type()).tqarg(m_driver->valueToSQL(Field::Text, sdata.name().lower())), existingID))
+ .arg(sdata.type()).arg(m_driver->valueToSQL(Field::Text, sdata.name().lower())), existingID))
{
//we already have stored a schema data with the same name and type:
//just update it's properties as it would be existing object
@@ -2366,9 +2366,9 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject )
}
//existing object:
return executeSQL(TQString("UPDATE kexi__objects SET o_type=%2, o_caption=%3, o_desc=%4 WHERE o_id=%1")
- .tqarg(sdata.id()).tqarg(sdata.type())
- .tqarg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.caption()))
- .tqarg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.description())) );
+ .arg(sdata.id()).arg(sdata.type())
+ .arg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.caption()))
+ .arg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.description())) );
}
tristate Connection::querySingleRecordInternal(RowData &data, const TQString* sql, QuerySchema* query,
@@ -2407,7 +2407,7 @@ tristate Connection::querySingleRecord(QuerySchema& query, RowData &data, bool a
bool Connection::checkIfColumnExists(Cursor *cursor, uint column)
{
if (column >= cursor->fieldCount()) {
- setError(ERR_CURSOR_RECORD_FETCHING, i18n("Column %1 does not exist for the query.").tqarg(column));
+ setError(ERR_CURSOR_RECORD_FETCHING, i18n("Column %1 does not exist for the query.").arg(column));
return false;
}
return true;
@@ -2695,7 +2695,7 @@ bool Connection::loadExtendedTableSchemaData(TableSchema& tableSchema)
int errorLine, errorColumn;
if (!doc.setContent( extendedTableSchemaString, &errorMsg, &errorLine, &errorColumn ))
loadExtendedTableSchemaData_ERR2( i18n("Error in XML data: \"%1\" in line %2, column %3.\nXML data: ")
- .tqarg(errorMsg).tqarg(errorLine).tqarg(errorColumn) + extendedTableSchemaString.left(1024));
+ .arg(errorMsg).arg(errorLine).arg(errorColumn) + extendedTableSchemaString.left(1024));
//! @todo look at the current format version (KEXIDB_EXTENDED_TABLE_SCHEMA_VERSION)
@@ -2777,7 +2777,7 @@ KexiDB::Field* Connection::setupField( const RowData &data )
if (!KexiUtils::isIdentifier( data.at(2).toString() )) {
setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"")
- .tqarg( data.at(2).toString() ));
+ .arg( data.at(2).toString() ));
ok = false;
return 0;
}
@@ -2809,7 +2809,7 @@ KexiDB::TableSchema* Connection::setupTableSchema( const RowData &data )
if (!(cursor = executeQuery(
TQString::fromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, "
"f_options, f_default, f_order, f_caption, f_help"
- " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").tqarg(t->m_id) )))
+ " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").arg(t->m_id) )))
{
delete t;
return 0;
@@ -2869,7 +2869,7 @@ TableSchema* Connection::tableSchema( const TQString& tableName )
RowData data;
if (true!=querySingleRecord(TQString::fromLatin1(
"SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE lower(o_name)='%1' AND o_type=%2")
- .tqarg(m_tableName).tqarg(KexiDB::TableObjectType), data))
+ .arg(m_tableName).arg(KexiDB::TableObjectType), data))
return 0;
return setupTableSchema(data);
@@ -2884,7 +2884,7 @@ TableSchema* Connection::tableSchema( int tableId )
RowData data;
if (true!=querySingleRecord(TQString::fromLatin1(
"SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1")
- .tqarg(tableId), data))
+ .arg(tableId), data))
return 0;
return setupTableSchema(data);
@@ -2904,7 +2904,7 @@ bool Connection::storeDataBlock( int objectID, const TQString &dataString, const
{
if (objectID<=0)
return false;
- TQString sql(TQString::fromLatin1("SELECT kexi__objectdata.o_id FROM kexi__objectdata WHERE o_id=%1").tqarg(objectID));
+ TQString sql(TQString::fromLatin1("SELECT kexi__objectdata.o_id FROM kexi__objectdata WHERE o_id=%1").arg(objectID));
TQString sql_sub( KexiDB::sqlWhere(m_driver, KexiDB::Field::Text, "o_sub_id", dataID) );
bool ok, exists;
@@ -2943,7 +2943,7 @@ KexiDB::QuerySchema* Connection::setupQuerySchema( const RowData &data )
if (!loadDataBlock( objID, sqlText, "sql" )) {
setError(ERR_OBJECT_NOT_FOUND,
i18n("Could not find definition for query \"%1\". Removing this query is recommended.")
- .tqarg(data[2].toString()));
+ .arg(data[2].toString()));
return 0;
}
d->parser()->parse( sqlText );
@@ -2953,8 +2953,8 @@ KexiDB::QuerySchema* Connection::setupQuerySchema( const RowData &data )
setError(ERR_SQL_PARSE_ERROR,
i18n("<p>Could not load definition for query \"%1\". "
"SQL statement for this query is invalid:<br><tt>%2</tt></p>\n"
- "<p>You can open this query in Text View and correct it.</p>").tqarg(data[2].toString())
- .tqarg(d->parser()->statement()));
+ "<p>You can open this query in Text View and correct it.</p>").arg(data[2].toString())
+ .arg(d->parser()->statement()));
return 0;
}
if (!setupObjectSchemaData( data, *query )) {
@@ -2976,7 +2976,7 @@ QuerySchema* Connection::querySchema( const TQString& queryName )
RowData data;
if (true!=querySingleRecord(TQString::fromLatin1(
"SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE lower(o_name)='%1' AND o_type=%2")
- .tqarg(m_queryName).tqarg(KexiDB::QueryObjectType), data))
+ .arg(m_queryName).arg(KexiDB::QueryObjectType), data))
return 0;
return setupQuerySchema(data);
@@ -2991,7 +2991,7 @@ QuerySchema* Connection::querySchema( int queryId )
clearError();
RowData data;
if (true!=querySingleRecord(TQString::fromLatin1(
- "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1").tqarg(queryId), data))
+ "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1").arg(queryId), data))
return 0;
return setupQuerySchema(data);
@@ -3207,7 +3207,7 @@ bool Connection::updateRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
TQVariant val = data[ pkeyFieldsOrder[i] ];
if (val.isNull() || !val.isValid()) {
setError(ERR_UPDATE_NULL_PKEY_FIELD,
- i18n("Primary key's field \"%1\" cannot be empty.").tqarg(it.current()->name()));
+ i18n("Primary key's field \"%1\" cannot be empty.").arg(it.current()->name()));
//js todo: pass the field's name somewhere!
return false;
}
@@ -3291,7 +3291,7 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
KexiDBWarn << "NO ENTIRE MASTER TABLE's PKEY SPECIFIED!" << endl;
setError(ERR_INSERT_NO_ENTIRE_MASTER_TABLES_PKEY,
i18n("Could not insert row because it does not contain entire master table's primary key.")
- .tqarg(query.name()));
+ .arg(query.name()));
return false;
}
}
@@ -3395,7 +3395,7 @@ bool Connection::deleteRow(QuerySchema &query, RowData& data, bool useROWID)
KexiDBWarn << " -- NO MASTER TABLE!" << endl;
setError(ERR_DELETE_NO_MASTER_TABLE,
i18n("Could not delete row because there is no master table defined.")
- .tqarg(query.name()));
+ .arg(query.name()));
return false;
}
IndexSchema *pkey = (mt->primaryKey() && !mt->primaryKey()->fields()->isEmpty()) ? mt->primaryKey() : 0;
@@ -3429,7 +3429,7 @@ bool Connection::deleteRow(QuerySchema &query, RowData& data, bool useROWID)
TQVariant val = data[ pkeyFieldsOrder[i] ];
if (val.isNull() || !val.isValid()) {
setError(ERR_DELETE_NULL_PKEY_FIELD, i18n("Primary key's field \"%1\" cannot be empty.")
- .tqarg(it.current()->name()));
+ .arg(it.current()->name()));
//js todo: pass the field's name somewhere!
return false;
}
diff --git a/kexi/kexidb/cursor.cpp b/kexi/kexidb/cursor.cpp
index dc95e30f..75c30cfa 100644
--- a/kexi/kexidb/cursor.cpp
+++ b/kexi/kexidb/cursor.cpp
@@ -57,7 +57,7 @@ Cursor::Cursor(Connection* conn, QuerySchema& query, uint options )
, m_options(options)
{
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addKexiDBDebug(TQString("Create cursor for query \"%1\": ").tqarg(query.name())+query.debugString());
+ KexiUtils::addKexiDBDebug(TQString("Create cursor for query \"%1\": ").arg(query.name())+query.debugString());
#endif
init();
}
diff --git a/kexi/kexidb/dbobjectnamevalidator.cpp b/kexi/kexidb/dbobjectnamevalidator.cpp
index 1edf5a25..9e384deb 100644
--- a/kexi/kexidb/dbobjectnamevalidator.cpp
+++ b/kexi/kexidb/dbobjectnamevalidator.cpp
@@ -45,7 +45,7 @@ Validator::Result ObjectNameValidator::internalCheck(
return Validator::Ok;
message = i18n("You cannot use name \"%1\" for your object.\n"
"It is reserved for internal Kexi objects. Please choose another name.")
- .tqarg(v.toString());
+ .arg(v.toString());
details = i18n("Names of internal Kexi objects are starting with \"kexi__\".");
return Validator::Error;
}
diff --git a/kexi/kexidb/dbproperties.cpp b/kexi/kexidb/dbproperties.cpp
index 27b6a5b2..490a7390 100644
--- a/kexi/kexidb/dbproperties.cpp
+++ b/kexi/kexidb/dbproperties.cpp
@@ -39,19 +39,19 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value
//we need to know whether update or insert
bool exists = m_conn->resultExists(
TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1")
- .tqarg(m_conn->driver()->escapeString(name)), ok);
+ .arg(m_conn->driver()->escapeString(name)), ok);
if (!ok) {
- setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name));
+ setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name));
return false;
}
if (exists) {
if (!m_conn->executeSQL(
TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
- .tqarg(m_conn->driver()->escapeString(value.toString()))
- .tqarg(m_conn->driver()->escapeString(name))))
+ .arg(m_conn->driver()->escapeString(value.toString()))
+ .arg(m_conn->driver()->escapeString(name))))
{
- setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name));
+ setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name));
return false;
}
return true;
@@ -59,10 +59,10 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value
if (!m_conn->executeSQL(
TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
- .tqarg(m_conn->driver()->escapeString(name))
- .tqarg(m_conn->driver()->escapeString(value.toString()))))
+ .arg(m_conn->driver()->escapeString(name))
+ .arg(m_conn->driver()->escapeString(value.toString()))))
{
- setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name));
+ setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name));
return false;
}
return true;
@@ -77,19 +77,19 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt
//we need to know whether update or insert
bool exists = m_conn->resultExists(
TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1")
- .tqarg(m_conn->driver()->escapeString(name)), ok);
+ .arg(m_conn->driver()->escapeString(name)), ok);
if (!ok) {
- setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name));
+ setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name));
return false;
}
if (exists) {
if (!m_conn->executeSQL(
TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
- .tqarg(m_conn->driver()->escapeString(caption))
- .tqarg(m_conn->driver()->escapeString(name))))
+ .arg(m_conn->driver()->escapeString(caption))
+ .arg(m_conn->driver()->escapeString(name))))
{
- setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name));
+ setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name));
return false;
}
return true;
@@ -97,10 +97,10 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt
if (!m_conn->executeSQL(
TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
- .tqarg(m_conn->driver()->escapeString(name))
- .tqarg(m_conn->driver()->escapeString(caption))))
+ .arg(m_conn->driver()->escapeString(name))
+ .arg(m_conn->driver()->escapeString(caption))))
{
- setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name));
+ setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name));
return false;
}
return true;
@@ -113,7 +113,7 @@ TQVariant DatabaseProperties::value( const TQString& _name )
if (true!=m_conn->querySingleString(
TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=")
+ m_conn->driver()->escapeString(name), result)) {
- m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").tqarg(name));
+ m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").arg(name));
return TQVariant();
}
return result;
@@ -128,7 +128,7 @@ TQString DatabaseProperties::caption( const TQString& _name )
if (true!=m_conn->querySingleString(
TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=")
+ m_conn->driver()->escapeString(name), result)) {
- setError(m_conn, i18n("Could not read database property \"%1\".").tqarg(name));
+ setError(m_conn, i18n("Could not read database property \"%1\".").arg(name));
return TQString();
}
return result;
diff --git a/kexi/kexidb/driver.cpp b/kexi/kexidb/driver.cpp
index 5d8f8d48..d760a004 100644
--- a/kexi/kexidb/driver.cpp
+++ b/kexi/kexidb/driver.cpp
@@ -106,16 +106,16 @@ bool Driver::isValid()
{
setError(ERR_INCOMPAT_DRIVER_VERSION,
i18n("Incompatible database driver's \"%1\" version: found version %2, expected version %3.")
- .tqarg(name())
- .tqarg(TQString("%1.%2").tqarg(version().major).tqarg(version().minor))
- .tqarg(TQString("%1.%2").tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor)));
+ .arg(name())
+ .arg(TQString("%1.%2").arg(version().major).arg(version().minor))
+ .arg(TQString("%1.%2").arg(KexiDB::version().major).arg(KexiDB::version().minor)));
return false;
}
- TQString inv_impl = i18n("Invalid database driver's \"%1\" implementation:\n").tqarg(name());
+ TQString inv_impl = i18n("Invalid database driver's \"%1\" implementation:\n").arg(name());
TQString not_init = i18n("Value of \"%1\" is not initialized for the driver.");
if (beh->ROW_ID_FIELD_NAME.isEmpty()) {
- setError(ERR_INVALID_DRIVER_IMPL, inv_impl + not_init.tqarg("DriverBehaviour::ROW_ID_FIELD_NAME"));
+ setError(ERR_INVALID_DRIVER_IMPL, inv_impl + not_init.arg("DriverBehaviour::ROW_ID_FIELD_NAME"));
return false;
}
diff --git a/kexi/kexidb/driver_p.cpp b/kexi/kexidb/driver_p.cpp
index 8c7f096a..462ce608 100644
--- a/kexi/kexidb/driver_p.cpp
+++ b/kexi/kexidb/driver_p.cpp
@@ -85,7 +85,7 @@ void DriverPrivate::initInternalProperties()
propertyCaptions["transaction_nested"] = i18n("Nested transactions support");
properties["kexidb_driver_version"] =
- TQString("%1.%2").tqarg(version().major).tqarg(version().minor);
+ TQString("%1.%2").arg(version().major).arg(version().minor);
propertyCaptions["kexidb_driver_version"] =
i18n("KexiDB driver version");
}
diff --git a/kexi/kexidb/drivermanager.cpp b/kexi/kexidb/drivermanager.cpp
index 5abacc94..1f348ddf 100644
--- a/kexi/kexidb/drivermanager.cpp
+++ b/kexi/kexidb/drivermanager.cpp
@@ -137,12 +137,12 @@ bool DriverManagerInternal::lookupDrivers()
if (major_ver != KexiDB::version().major || minor_ver != KexiDB::version().minor) {
KexiDBWarn << TQString("DriverManagerInternal::lookupDrivers(): '%1' driver"
" has version '%2' but required KexiDB driver version is '%3.%4'\n"
- " -- skipping this driver!").tqarg(srv_name.lower()).tqarg(srv_ver_str)
- .tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor) << endl;
+ " -- skipping this driver!").arg(srv_name.lower()).arg(srv_ver_str)
+ .arg(KexiDB::version().major).arg(KexiDB::version().minor) << endl;
possibleProblems += TQString("\"%1\" database driver has version \"%2\" "
"but required driver version is \"%3.%4\"")
- .tqarg(srv_name.lower()).tqarg(srv_ver_str)
- .tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor);
+ .arg(srv_name.lower()).arg(srv_ver_str)
+ .arg(KexiDB::version().major).arg(KexiDB::version().minor);
continue;
}
@@ -186,7 +186,7 @@ KexiDB::Driver::Info DriverManagerInternal::driverInfo(const TQString &name)
{
KexiDB::Driver::Info i = m_driversInfo[name.lower()];
if (!error() && i.name.isEmpty())
- setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").tqarg(name) );
+ setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").arg(name) );
return i;
}
@@ -203,7 +203,7 @@ Driver* DriverManagerInternal::driver(const TQString& name)
return drv; //cached
if (!m_services_lcase.contains(name.lower())) {
- setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").tqarg(name) );
+ setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").arg(name) );
return 0;
}
@@ -216,7 +216,7 @@ Driver* DriverManagerInternal::driver(const TQString& name)
if (!drv) {
setError(ERR_DRIVERMANAGER, i18n("Could not load database driver \"%1\".")
- .tqarg(name) );
+ .arg(name) );
if (m_componentLoadingErrors.isEmpty()) {//fill errtable on demand
m_componentLoadingErrors[KParts::ComponentFactory::ErrNoServiceFound]="ErrNoServiceFound";
m_componentLoadingErrors[KParts::ComponentFactory::ErrServiceProvidesNoLibrary]="ErrServiceProvidesNoLibrary";
@@ -360,7 +360,7 @@ KService::Ptr DriverManager::serviceInfo(const TQString &name)
if (d_int->m_services_lcase.contains(name.lower())) {
return *d_int->m_services_lcase.find(name.lower());
} else {
- setError(ERR_DRIVERMANAGER, i18n("No such driver service: \"%1\".").tqarg(name) );
+ setError(ERR_DRIVERMANAGER, i18n("No such driver service: \"%1\".").arg(name) );
return KService::Ptr();
}
}
diff --git a/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp b/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp
index 18682a4f..44853163 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp
+++ b/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp
@@ -175,7 +175,7 @@ bool MySqlConnection::drv_containsTable( const TQString &tableName )
{
bool success;
return resultExists(TQString("show tables like %1")
- .tqarg(driver()->escapeString(tableName)), success) && success;
+ .arg(driver()->escapeString(tableName)), success) && success;
}
bool MySqlConnection::drv_getTablesList( TQStringList &list )
diff --git a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp
index faa7b582..d6262bef 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp
+++ b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp
@@ -190,15 +190,15 @@ bool pqxxSqlConnection::drv_useDatabase( const TQString &dbName, bool *cancelled
if (data()->port == 0)
data()->port = 5432;
- conninfo += TQString::fromLatin1(" port='%1'").tqarg(data()->port);
+ conninfo += TQString::fromLatin1(" port='%1'").arg(data()->port);
- conninfo += TQString::fromLatin1(" dbname='%1'").tqarg(dbName);
+ conninfo += TQString::fromLatin1(" dbname='%1'").arg(dbName);
if (!data()->userName.isNull())
- conninfo += TQString::fromLatin1(" user='%1'").tqarg(data()->userName);
+ conninfo += TQString::fromLatin1(" user='%1'").arg(data()->userName);
if (!data()->password.isNull())
- conninfo += TQString::fromLatin1(" password='%1'").tqarg(data()->password);
+ conninfo += TQString::fromLatin1(" password='%1'").arg(data()->password);
try
{
@@ -346,7 +346,7 @@ bool pqxxSqlConnection::drv_containsTable( const TQString &tableName )
{
bool success;
return resultExists(TQString("select 1 from pg_class where relkind='r' and relname LIKE %1")
- .tqarg(driver()->escapeString(tableName)), success) && success;
+ .arg(driver()->escapeString(tableName)), success) && success;
}
bool pqxxSqlConnection::drv_getTablesList( TQStringList &list )
diff --git a/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp b/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp
index 14d2217a..1fb33233 100644
--- a/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp
@@ -46,7 +46,7 @@ bool SQLiteAdminTools::vacuum(const KexiDB::ConnectionData& data, const TQString
#else
KexiDB::DriverManager manager;
KexiDB::Driver *drv = manager.driver(data.driverName);
- TQString title( i18n("Could not compact database \"%1\".").tqarg(TQDir::convertSeparators(databaseName)) );
+ TQString title( i18n("Could not compact database \"%1\".").arg(TQDir::convertSeparators(databaseName)) );
if (!drv) {
setError(&manager, title);
return false;
diff --git a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp
index b10d5383..08d639ba 100644
--- a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp
@@ -130,7 +130,7 @@ bool SQLiteConnection::drv_containsTable( const TQString &tableName )
{
bool success;
return resultExists(TQString("select name from sqlite_master where type='table' and name LIKE %1")
- .tqarg(driver()->escapeString(tableName)), success) && success;
+ .arg(driver()->escapeString(tableName)), success) && success;
}
bool SQLiteConnection::drv_getTablesList( TQStringList &list )
@@ -200,7 +200,7 @@ bool SQLiteConnection::drv_useDatabase( const TQString &dbName, bool *cancelled,
if (KMessageBox::Continue !=
askQuestion(
i18n("Do you want to open file \"%1\" as read-only?")
- .tqarg(TQDir::convertSeparators(data()->fileName()))
+ .arg(TQDir::convertSeparators(data()->fileName()))
+ "\n\n"
+ i18n("The file is probably already open on this or another computer.") + " "
+ i18n("Could not gain exclusive access for writing the file."),
@@ -264,7 +264,7 @@ bool SQLiteConnection::drv_dropDatabase( const TQString &dbName )
const TQString filename = data()->fileName();
if (TQFile(filename).exists() && !TQDir().remove(filename)) {
setError(ERR_ACCESS_RIGHTS, i18n("Could not remove file \"%1\".")
- .tqarg(TQDir::convertSeparators(filename)) + " "
+ .arg(TQDir::convertSeparators(filename)) + " "
+ i18n("Check the file's permissions and whether it is already opened and locked by another application."));
return false;
}
@@ -396,7 +396,7 @@ bool SQLiteConnection::drv_alterTableName(TableSchema& tableSchema, const TQStri
// 3. copy all rows to the new table
if (!executeSQL(TQString::fromLatin1("INSERT INTO %1 SELECT * FROM %2")
- .tqarg(escapeIdentifier(tableSchema.name())).tqarg(escapeIdentifier(oldTableName))))
+ .arg(escapeIdentifier(tableSchema.name())).arg(escapeIdentifier(oldTableName))))
{
drv_alterTableName_ERR;
return false;
diff --git a/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp b/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp
index d24d906d..96802596 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp
@@ -79,7 +79,7 @@ tristate SQLiteVacuum::run()
}
m_dlg = new KProgressDialog(0, 0, i18n("Compacting database"),
"<qt>"+i18n("Compacting database \"%1\"...")
- .tqarg("<nobr>"+TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())+"</nobr>")
+ .arg("<nobr>"+TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())+"</nobr>")
);
m_dlg->adjustSize();
m_dlg->resize(300, m_dlg->height());
@@ -98,7 +98,7 @@ tristate SQLiteVacuum::run()
const uint newSize = TQFileInfo(m_filePath).size();
const uint decrease = 100-100*newSize/origSize;
KMessageBox::information(0, i18n("The database has been compacted. Current size decreased by %1% to %2.")
- .tqarg(decrease).tqarg(KIO::convertSize(newSize)));
+ .arg(decrease).arg(KIO::convertSize(newSize)));
}
return m_result;
}
diff --git a/kexi/kexidb/expression.cpp b/kexi/kexidb/expression.cpp
index 034154bf..d9a33b4c 100644
--- a/kexi/kexidb/expression.cpp
+++ b/kexi/kexidb/expression.cpp
@@ -82,7 +82,7 @@ Field::Type BaseExpr::type()
TQString BaseExpr::debugString()
{
- return TQString("BaseExpr(%1,type=%1)").tqarg(m_token).tqarg(Driver::defaultSQLTypeName(type()));
+ return TQString("BaseExpr(%1,type=%1)").arg(m_token).arg(Driver::defaultSQLTypeName(type()));
}
bool BaseExpr::validate(ParseInfo& /*parseInfo*/)
@@ -241,7 +241,7 @@ TQString UnaryExpr::debugString()
return "UnaryExpr('"
+ tokenToDebugString() + "', "
+ (m_arg ? m_arg->debugString() : TQString("<NONE>"))
- + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type()));
+ + TQString(",type=%1)").arg(Driver::defaultSQLTypeName(type()));
}
TQString UnaryExpr::toString(QuerySchemaParameterValueListIterator* params)
@@ -256,7 +256,7 @@ TQString UnaryExpr::toString(QuerySchemaParameterValueListIterator* params)
return (m_arg ? m_arg->toString(params) : "<NULL>") + " IS NULL";
if (m_token==SQL_IS_NOT_NULL)
return (m_arg ? m_arg->toString(params) : "<NULL>") + " IS NOT NULL";
- return TQString("{INVALID_OPERATOR#%1} ").tqarg(m_token) + (m_arg ? m_arg->toString(params) : "<NULL>");
+ return TQString("{INVALID_OPERATOR#%1} ").arg(m_token) + (m_arg ? m_arg->toString(params) : "<NULL>");
}
void UnaryExpr::getQueryParameters(QuerySchemaParameterList& params)
@@ -419,7 +419,7 @@ TQString BinaryExpr::debugString()
+ "," + (m_larg ? m_larg->debugString() : TQString("<NONE>"))
+ ",'" + tokenToDebugString() + "',"
+ (m_rarg ? m_rarg->debugString() : TQString("<NONE>"))
- + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type()));
+ + TQString(",type=%1)").arg(Driver::defaultSQLTypeName(type()));
}
TQString BinaryExpr::tokenToString()
@@ -449,7 +449,7 @@ TQString BinaryExpr::tokenToString()
/* not handled here */
default:;
}
- return TQString("{INVALID_BINARY_OPERATOR#%1} ").tqarg(m_token);
+ return TQString("{INVALID_BINARY_OPERATOR#%1} ").arg(m_token);
}
TQString BinaryExpr::toString(QuerySchemaParameterValueListIterator* params)
@@ -529,7 +529,7 @@ Field::Type ConstExpr::type()
TQString ConstExpr::debugString()
{
return TQString("ConstExpr('") + tokenToDebugString() +"'," + toString()
- + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type()));
+ + TQString(",type=%1)").arg(Driver::defaultSQLTypeName(type()));
}
TQString ConstExpr::toString(QuerySchemaParameterValueListIterator* params)
@@ -601,13 +601,13 @@ void QueryParameterExpr::setType(Field::Type type)
TQString QueryParameterExpr::debugString()
{
- return TQString("QueryParameterExpr('") + TQString::fromLatin1("[%2]").tqarg(value.toString())
- + TQString("',type=%1)").tqarg(Driver::defaultSQLTypeName(type()));
+ return TQString("QueryParameterExpr('") + TQString::fromLatin1("[%2]").arg(value.toString())
+ + TQString("',type=%1)").arg(Driver::defaultSQLTypeName(type()));
}
TQString QueryParameterExpr::toString(QuerySchemaParameterValueListIterator* params)
{
- return params ? params->getPreviousValueAsString(type()) : TQString::fromLatin1("[%2]").tqarg(value.toString());
+ return params ? params->getPreviousValueAsString(type()) : TQString::fromLatin1("[%2]").arg(value.toString());
}
void QueryParameterExpr::getQueryParameters(QuerySchemaParameterList& params)
@@ -656,7 +656,7 @@ VariableExpr* VariableExpr::copy() const
TQString VariableExpr::debugString()
{
return TQString("VariableExpr(") + name
- + TQString(",type=%1)").tqarg(field ? Driver::defaultSQLTypeName(type()) : TQString("FIELD NOT DEFINED YET"));
+ + TQString(",type=%1)").arg(field ? Driver::defaultSQLTypeName(type()) : TQString("FIELD NOT DEFINED YET"));
}
TQString VariableExpr::toString(QuerySchemaParameterValueListIterator* params)
@@ -719,15 +719,15 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
parseInfo.errMsg = i18n("Ambiguous field name");
parseInfo.errDescr = i18n("Both table \"%1\" and \"%2\" have defined \"%3\" field. "
"Use \"<tableName>.%4\" notation to specify table name.")
- .tqarg(firstField->table()->name()).tqarg(f->table()->name())
- .tqarg(fieldName).tqarg(fieldName);
+ .arg(firstField->table()->name()).arg(f->table()->name())
+ .arg(fieldName).arg(fieldName);
return false;
}
}
}
if (!firstField) {
parseInfo.errMsg = i18n("Field not found");
- parseInfo.errDescr = i18n("Table containing \"%1\" field not found").tqarg(fieldName);
+ parseInfo.errDescr = i18n("Table containing \"%1\" field not found").arg(fieldName);
return false;
}
//ok
@@ -754,8 +754,8 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
if (covered) {
parseInfo.errMsg = i18n("Could not access the table directly using its name");
parseInfo.errDescr = i18n("Table \"%1\" is covered by aliases. Instead of \"%2\", "
- "you can write \"%3\"").tqarg(tableName)
- .tqarg(TQString(tableName+"."+fieldName)).tqarg(TQString(tableAlias+"."+fieldName.latin1()));
+ "you can write \"%3\"").arg(tableName)
+ .arg(TQString(tableName+"."+fieldName)).arg(TQString(tableAlias+"."+fieldName.latin1()));
return false;
}
}
@@ -773,7 +773,7 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
if (!ts) {
parseInfo.errMsg = i18n("Table not found");
- parseInfo.errDescr = i18n("Unknown table \"%1\"").tqarg(tableName);
+ parseInfo.errDescr = i18n("Unknown table \"%1\"").arg(tableName);
return false;
}
@@ -786,8 +786,8 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
//it's a table.*
if (fieldName=="*") {
if (positionsList->count()>1) {
- parseInfo.errMsg = i18n("Ambiguous \"%1.*\" expression").tqarg(tableName);
- parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined").tqarg(tableName);
+ parseInfo.errMsg = i18n("Ambiguous \"%1.*\" expression").arg(tableName);
+ parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined").arg(tableName);
return false;
}
tableForQueryAsterisk = ts;
@@ -800,7 +800,7 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
if (!realField) {
parseInfo.errMsg = i18n("Field not found");
parseInfo.errDescr = i18n("Table \"%1\" has no \"%2\" field")
- .tqarg(tableName).tqarg(fieldName);
+ .arg(tableName).arg(fieldName);
return false;
}
@@ -815,9 +815,9 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
numberOfTheSameFields++;
if (numberOfTheSameFields>1) {
parseInfo.errMsg = i18n("Ambiguous \"%1.%2\" expression")
- .tqarg(tableName).tqarg(fieldName);
+ .arg(tableName).arg(fieldName);
parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined containing \"%2\" field")
- .tqarg(tableName).tqarg(fieldName);
+ .arg(tableName).arg(fieldName);
return false;
}
}
@@ -880,7 +880,7 @@ TQString FunctionExpr::debugString()
res.append( TQString("FunctionExpr(") + name );
if (args)
res.append(TQString(",") + args->debugString());
- res.append(TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type())));
+ res.append(TQString(",type=%1)").arg(Driver::defaultSQLTypeName(type())));
return res;
}
diff --git a/kexi/kexidb/field.cpp b/kexi/kexidb/field.cpp
index 6666fcfd..b12000ac 100644
--- a/kexi/kexidb/field.cpp
+++ b/kexi/kexidb/field.cpp
@@ -179,7 +179,7 @@ TQString Field::typeName(uint type)
TQString Field::typeString(uint type)
{
m_typeNames.init();
- return (type <= LastType) ? m_typeNames.at((int)LastType+1 + type) : TQString("Type%1").tqarg(type);
+ return (type <= LastType) ? m_typeNames.at((int)LastType+1 + type) : TQString("Type%1").arg(type);
}
TQString Field::typeGroupName(uint typeGroup)
@@ -191,7 +191,7 @@ TQString Field::typeGroupName(uint typeGroup)
TQString Field::typeGroupString(uint typeGroup)
{
m_typeGroupNames.init();
- return (typeGroup <= LastTypeGroup) ? m_typeGroupNames.at((int)LastTypeGroup+1 + typeGroup) : TQString("TypeGroup%1").tqarg(typeGroup);
+ return (typeGroup <= LastTypeGroup) ? m_typeGroupNames.at((int)LastTypeGroup+1 + typeGroup) : TQString("TypeGroup%1").arg(typeGroup);
}
Field::Type Field::typeForString(const TQString& typeString)
@@ -330,7 +330,7 @@ void
Field::setType(Type t)
{
if (m_expr) {
- KexiDBWarn << TQString("Field::setType(%1)").tqarg(t)
+ KexiDBWarn << TQString("Field::setType(%1)").arg(t)
<< " could not set type because the field has expression assigned!" << endl;
return;
}
@@ -589,12 +589,12 @@ TQString Field::debugString() const
dbg += (conn && conn->driver()) ? conn->driver()->sqlTypeName(type()) : Driver::defaultSQLTypeName(type());
if (isFPNumericType() && m_precision>0) {
if (scale()>0)
- dbg += TQString::fromLatin1("(%1,%2)").tqarg(m_precision).tqarg(scale());
+ dbg += TQString::fromLatin1("(%1,%2)").arg(m_precision).arg(scale());
else
- dbg += TQString::fromLatin1("(%1)").tqarg(m_precision);
+ dbg += TQString::fromLatin1("(%1)").arg(m_precision);
}
else if (m_type==Field::Text && m_length>0)
- dbg += TQString::fromLatin1("(%1)").tqarg(m_length);
+ dbg += TQString::fromLatin1("(%1)").arg(m_length);
if (m_constraints & Field::AutoInc)
dbg += " AUTOINC";
if (m_constraints & Field::Unique)
@@ -608,18 +608,18 @@ TQString Field::debugString() const
if (m_constraints & Field::NotEmpty)
dbg += " NOTEMPTY";
if (!m_defaultValue.isNull())
- dbg += TQString(" DEFAULT=[%1]").tqarg(m_defaultValue.typeName()) + KexiDB::variantToString(m_defaultValue);
+ dbg += TQString(" DEFAULT=[%1]").arg(m_defaultValue.typeName()) + KexiDB::variantToString(m_defaultValue);
if (m_expr)
dbg += " EXPRESSION=" + m_expr->debugString();
if (m_customProperties && !m_customProperties->isEmpty()) {
- dbg += TQString(" CUSTOM PROPERTIES (%1): ").tqarg(m_customProperties->count());
+ dbg += TQString(" CUSTOM PROPERTIES (%1): ").arg(m_customProperties->count());
bool first = true;
foreach (CustomPropertiesMap::ConstIterator, it, *m_customProperties) {
if (first)
first = false;
else
dbg += ", ";
- dbg += TQString("%1 = %2 (%3)").tqarg(TQString(it.key())).tqarg(TQString(it.data().toString())).tqarg(TQString(it.data().typeName()));
+ dbg += TQString("%1 = %2 (%3)").arg(TQString(it.key())).arg(TQString(it.data().toString())).arg(TQString(it.data().typeName()));
}
}
return dbg;
diff --git a/kexi/kexidb/fieldlist.cpp b/kexi/kexidb/fieldlist.cpp
index dea19876..292ba75e 100644
--- a/kexi/kexidb/fieldlist.cpp
+++ b/kexi/kexidb/fieldlist.cpp
@@ -94,7 +94,7 @@ 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 ? TQString("\"%1\"").tqarg(field->name()) : TQString()) << endl;
+ << (field ? TQString("\"%1\"").arg(field->name()) : TQString()) << endl;
return;
}
m_fields_by_name.take( field->name() );
@@ -157,7 +157,7 @@ void FieldList::debug()
}
static TQString subListWarning1(const TQString& fname) {
- return TQString("FieldList::subList() could not find field \"%1\"").tqarg(fname);
+ return TQString("FieldList::subList() could not find field \"%1\"").arg(fname);
}
FieldList* FieldList::subList(const TQString& n1, const TQString& n2,
@@ -212,7 +212,7 @@ FieldList* FieldList::subList(const TQValueList<uint>& list)
foreach(TQValueList<uint>::ConstIterator, it, list) {
f = field(*it);
if (!f) {
- KexiDBWarn << TQString("FieldList::subList() could not find field at position %1").tqarg(*it) << endl;
+ KexiDBWarn << TQString("FieldList::subList() could not find field at position %1").arg(*it) << endl;
delete fl;
return 0;
}
diff --git a/kexi/kexidb/lookupfieldschema.cpp b/kexi/kexidb/lookupfieldschema.cpp
index 62a0665e..05728d00 100644
--- a/kexi/kexidb/lookupfieldschema.cpp
+++ b/kexi/kexidb/lookupfieldschema.cpp
@@ -91,7 +91,7 @@ void LookupFieldSchema::RowSource::setValues(const TQStringList& values)
TQString LookupFieldSchema::RowSource::debugString() const
{
return TQString("rowSourceType:'%1' rowSourceName:'%2' rowSourceValues:'%3'\n")
- .tqarg(typeName()).tqarg(name()).tqarg(m_values ? m_values->join("|") : TQString());
+ .arg(typeName()).arg(name()).arg(m_values ? m_values->join("|") : TQString());
}
void LookupFieldSchema::RowSource::debug() const
@@ -144,11 +144,11 @@ TQString LookupFieldSchema::debugString() const
" boundColumn:%2 visibleColumns:%3 maximumListRows:%4 displayWidget:%5\n"
" columnHeadersVisible:%6 limitToList:%7\n"
" columnWidths:%8 )")
- .tqarg(m_rowSource.debugString())
- .tqarg(m_boundColumn).tqarg(visibleColumnsString).tqarg(m_maximumListRows)
- .tqarg( m_displayWidget==ComboBox ? "ComboBox" : "ListBox")
- .tqarg(m_columnHeadersVisible).tqarg(m_limitToList)
- .tqarg(columnWidthsStr);
+ .arg(m_rowSource.debugString())
+ .arg(m_boundColumn).arg(visibleColumnsString).arg(m_maximumListRows)
+ .arg( m_displayWidget==ComboBox ? "ComboBox" : "ListBox")
+ .arg(m_columnHeadersVisible).arg(m_limitToList)
+ .arg(columnWidthsStr);
}
void LookupFieldSchema::debug() const
diff --git a/kexi/kexidb/parser/parser_p.cpp b/kexi/kexidb/parser/parser_p.cpp
index c2cece0b..38a7d386 100644
--- a/kexi/kexidb/parser/parser_p.cpp
+++ b/kexi/kexidb/parser/parser_p.cpp
@@ -142,10 +142,10 @@ void yyerror(const char *str)
if (parser->isReservedKeyword(ctoken.latin1()))
parser->setError( ParserError(i18n("Syntax Error"),
- i18n("\"%1\" is a reserved keyword").tqarg(ctoken)+lexerErr, ctoken, current) );
+ i18n("\"%1\" is a reserved keyword").arg(ctoken)+lexerErr, ctoken, current) );
else
parser->setError( ParserError(i18n("Syntax Error"),
- i18n("Syntax Error near \"%1\"").tqarg(ctoken)+lexerErr, ctoken, current) );
+ i18n("Syntax Error near \"%1\"").arg(ctoken)+lexerErr, ctoken, current) );
}
}
}
@@ -204,7 +204,7 @@ bool parseData(Parser *p, const char *data)
{
if(tableList.findRef(item->table()) == -1)
{
- ParserError err(i18n("Field List Error"), i18n("Unknown table '%1' in field list").tqarg(item->table()->name()), ctoken, current);
+ ParserError err(i18n("Field List Error"), i18n("Unknown table '%1' in field list").arg(item->table()->name()), ctoken, current);
parser->setError(err);
yyerror("fieldlisterror");
@@ -288,15 +288,15 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
setError(i18n("Ambiguous field name"),
i18n("Both table \"%1\" and \"%2\" have defined \"%3\" field. "
"Use \"<tableName>.%4\" notation to specify table name.")
- .tqarg(firstField->table()->name()).tqarg(f->table()->name())
- .tqarg(fieldName).tqarg(fieldName));
+ .arg(firstField->table()->name()).arg(f->table()->name())
+ .arg(fieldName).arg(fieldName));
return false;
}
}
}
if (!firstField) {
setError(i18n("Field not found"),
- i18n("Table containing \"%1\" field not found").tqarg(fieldName));
+ i18n("Table containing \"%1\" field not found").arg(fieldName));
return false;
}
//ok
@@ -321,8 +321,8 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
if (covered) {
setError(i18n("Could not access the table directly using its name"),
i18n("Table \"%1\" is covered by aliases. Instead of \"%2\", "
- "you can write \"%3\"").tqarg(tableName)
- .tqarg(tableName+"."+fieldName).tqarg(tableAlias+"."+fieldName.latin1()));
+ "you can write \"%3\"").arg(tableName)
+ .arg(tableName+"."+fieldName).arg(tableAlias+"."+fieldName.latin1()));
return false;
}
}
@@ -348,8 +348,8 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
if (fieldName=="*") {
if (positionsList->count()>1) {
- setError(i18n("Ambiguous \"%1.*\" expression").tqarg(tableName),
- i18n("More than one \"%1\" table or alias defined").tqarg(tableName));
+ setError(i18n("Ambiguous \"%1.*\" expression").arg(tableName),
+ i18n("More than one \"%1\" table or alias defined").arg(tableName));
return false;
}
parseInfo.querySchema->addAsterisk( new QueryAsterisk(parseInfo.querySchema, ts) );
@@ -368,9 +368,9 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
if (otherTS->field(fieldName))
numberOfTheSameFields++;
if (numberOfTheSameFields>1) {
- setError(i18n("Ambiguous \"%1.%2\" expression").tqarg(tableName).tqarg(fieldName),
+ setError(i18n("Ambiguous \"%1.%2\" expression").arg(tableName).arg(fieldName),
i18n("More than one \"%1\" table or alias defined containing \"%2\" field")
- .tqarg(tableName).tqarg(fieldName));
+ .arg(tableName).arg(fieldName));
return false;
}
}
@@ -379,7 +379,7 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
}
else {
setError(i18n("Field not found"), i18n("Table \"%1\" has no \"%2\" field")
- .tqarg(tableName).tqarg(fieldName));
+ .arg(tableName).arg(fieldName));
return false;
}
}
@@ -436,7 +436,7 @@ QuerySchema* buildSelectQuery(
TableSchema *s = parser->db()->tableSchema(TQString(tname));
if(!s) {
setError(//i18n("Field List Error"),
- i18n("Table \"%1\" does not exist").tqarg(TQString(tname)));
+ i18n("Table \"%1\" does not exist").arg(TQString(tname)));
// yyerror("fieldlisterror");
CLEANUP;
return 0;
@@ -511,7 +511,7 @@ QuerySchema* buildSelectQuery(
aliasVariable = e->toBinary()->right()->toVariable();
if (!aliasVariable) {
setError(i18n("Invalid alias definition for column \"%1\"")
- .tqarg(columnExpr->toString())); //ok?
+ .arg(columnExpr->toString())); //ok?
CLEANUP;
return 0;
}
@@ -542,7 +542,7 @@ QuerySchema* buildSelectQuery(
e->toBinary()->m_larg = 0;
}
else {
- setError(i18n("Invalid \"%1\" column definition").tqarg(e->toString())); //ok?
+ setError(i18n("Invalid \"%1\" column definition").arg(e->toString())); //ok?
CLEANUP;
return 0;
}
@@ -610,7 +610,7 @@ QuerySchema* buildSelectQuery(
(*it).ascending, (*it).columnNumber-1 ))
{
setError(i18n("Could not define sorting - no column at position %1")
- .tqarg((*it).columnNumber));
+ .arg((*it).columnNumber));
CLEANUP;
return 0;
}
@@ -619,7 +619,7 @@ QuerySchema* buildSelectQuery(
Field * f = querySchema->findTableField((*it).aliasOrName);
if (!f) {
setError(i18n("Could not define sorting - "
- "column name or alias \"%1\" does not exist").tqarg((*it).aliasOrName));
+ "column name or alias \"%1\" does not exist").arg((*it).aliasOrName));
CLEANUP;
return 0;
}
diff --git a/kexi/kexidb/parser/sqlparser.cpp b/kexi/kexidb/parser/sqlparser.cpp
index 091d516b..c7c3aa99 100644
--- a/kexi/kexidb/parser/sqlparser.cpp
+++ b/kexi/kexidb/parser/sqlparser.cpp
@@ -3111,7 +3111,7 @@ YYACCEPT;
Field *f = item->table()->field(item->name());
if(!f)
{
- ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").tqarg(item->name()).tqarg(schema->name()), ctoken, current);
+ ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").arg(item->name()).arg(schema->name()), ctoken, current);
parser->setError(err);
yyerror("fieldlisterror");
}
diff --git a/kexi/kexidb/parser/sqlparser.y b/kexi/kexidb/parser/sqlparser.y
index 7775885d..5a8357f2 100644
--- a/kexi/kexidb/parser/sqlparser.y
+++ b/kexi/kexidb/parser/sqlparser.y
@@ -1201,7 +1201,7 @@ IDENTIFIER
Field *f = item->table()->field(item->name());
if(!f)
{
- ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").tqarg(item->name()).tqarg(schema->name()), ctoken, current);
+ ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").arg(item->name()).arg(schema->name()), ctoken, current);
parser->setError(err);
yyerror("fieldlisterror");
}
@@ -1360,7 +1360,7 @@ ColWildCard:
{
$$ = new VariableExpr($1);
KexiDBDbg << " Invalid identifier! " << $1 << endl;
- setError(i18n("Invalid identifier \"%1\"").tqarg($1));
+ setError(i18n("Invalid identifier \"%1\"").arg($1));
}*/
;
diff --git a/kexi/kexidb/queryschema.cpp b/kexi/kexidb/queryschema.cpp
index cff98a31..47e5d95c 100644
--- a/kexi/kexidb/queryschema.cpp
+++ b/kexi/kexidb/queryschema.cpp
@@ -402,11 +402,11 @@ TQString OrderByColumn::debugString() const
if (m_column) {
if (m_pos>-1)
return TQString("COLUMN_AT_POSITION_%1(%2, %3)")
- .tqarg(m_pos+1).tqarg(m_column->debugString()).tqarg(orderString);
+ .arg(m_pos+1).arg(m_column->debugString()).arg(orderString);
else
- return TQString("COLUMN(%1, %2)").tqarg(m_column->debugString()).tqarg(orderString);
+ return TQString("COLUMN(%1, %2)").arg(m_column->debugString()).arg(orderString);
}
- return m_field ? TQString("FIELD(%1, %2)").tqarg(m_field->debugString()).tqarg(orderString)
+ return m_field ? TQString("FIELD(%1, %2)").arg(m_field->debugString()).arg(orderString)
: TQString("NONE");
}
@@ -801,7 +801,7 @@ TQString QuerySchema::debugString()
else {
dbg1 = "<NONE>\n";
}
- dbg1.prepend( TQString("(%1):\n").tqarg(fieldsExpandedCount) );
+ dbg1.prepend( TQString("(%1):\n").arg(fieldsExpandedCount) );
dbg += dbg1;
//it's safer to delete fieldsExpanded for now
@@ -847,7 +847,7 @@ TQString QuerySchema::debugString()
for (int i=0; it.current(); ++it, i++) {
TQCString *alias = d->columnAlias(i);
if (alias)
- aliases += (TQString("field #%1: ").tqarg(i)
+ aliases += (TQString("field #%1: ").arg(i)
+ (it.current()->name().isEmpty() ? "<noname>" : it.current()->name())
+ " -> " + (const char*)*alias + "\n");
}
@@ -862,7 +862,7 @@ TQString QuerySchema::debugString()
for (int i=0; t_it.current(); ++t_it, i++) {
TQCString *alias = d->tableAliases[i];
if (alias)
- aliases += (TQString("table #%1: ").tqarg(i)
+ aliases += (TQString("table #%1: ").arg(i)
+ (t_it.current()->name().isEmpty() ? "<noname>" : t_it.current()->name())
+ " -> " + (const char*)*alias + "\n");
}
@@ -872,7 +872,7 @@ TQString QuerySchema::debugString()
if (!where.isEmpty())
dbg += (TQString("\n-WHERE EXPRESSION:\n") + where);
if (!orderByColumnList().isEmpty())
- dbg += (TQString("\n-ORDER BY (%1):\n").tqarg(orderByColumnList().count())
+ dbg += (TQString("\n-ORDER BY (%1):\n").arg(orderByColumnList().count())
+ orderByColumnList().debugString());
return dbg;
}
@@ -1292,7 +1292,7 @@ void QuerySchema::computeFieldsExpanded()
visibleColumn = new Field();
visibleColumn->setName(
TQString::fromLatin1("[multiple_visible_fields_%1]")
- .tqarg( ++numberOfColumnsWithMultipleVisibleFields ));
+ .arg( ++numberOfColumnsWithMultipleVisibleFields ));
visibleColumn->setExpression(
new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/));
if (!d->ownedVisibleColumns) {
@@ -1352,7 +1352,7 @@ void QuerySchema::computeFieldsExpanded()
visibleColumn = new Field();
visibleColumn->setName(
TQString::fromLatin1("[multiple_visible_fields_%1]")
- .tqarg( ++numberOfColumnsWithMultipleVisibleFields ));
+ .arg( ++numberOfColumnsWithMultipleVisibleFields ));
visibleColumn->setExpression(
new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/));
if (!d->ownedVisibleColumns) {
@@ -1509,8 +1509,8 @@ void QuerySchema::computeFieldsExpanded()
}
else {
const TQString key( TQString::fromLatin1("[multiple_visible_fields_%1]_%2.%3")
- .tqarg( ++numberOfColumnsWithMultipleVisibleFields )
- .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) );
+ .arg( ++numberOfColumnsWithMultipleVisibleFields )
+ .arg(ci->field->table()->name()).arg(ci->field->name()) );
uint *index = lookup_dict[ key ];
if (index)
ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index );
@@ -1543,8 +1543,8 @@ void QuerySchema::computeFieldsExpanded()
}
else {
const TQString key( TQString::fromLatin1("[multiple_visible_fields_%1]_%2.%3")
- .tqarg( ++numberOfColumnsWithMultipleVisibleFields )
- .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) );
+ .arg( ++numberOfColumnsWithMultipleVisibleFields )
+ .arg(ci->field->table()->name()).arg(ci->field->name()) );
uint *index = lookup_dict[ key ];
if (index)
ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index );
diff --git a/kexi/kexidb/queryschemaparameter.cpp b/kexi/kexidb/queryschemaparameter.cpp
index 4cead962..4418f6e9 100644
--- a/kexi/kexidb/queryschemaparameter.cpp
+++ b/kexi/kexidb/queryschemaparameter.cpp
@@ -36,12 +36,12 @@ QuerySchemaParameter::~QuerySchemaParameter()
TQString QuerySchemaParameter::debugString() const
{
- return TQString("msg=\"%1\" type=\"%2\"").tqarg(Field::typeName(type)).tqarg(message);
+ return TQString("msg=\"%1\" type=\"%2\"").arg(Field::typeName(type)).arg(message);
}
void KexiDB::debug(const QuerySchemaParameterList& list)
{
- KexiDBDbg << TQString("Query parameters (%1):").tqarg(list.count()) << endl;
+ KexiDBDbg << TQString("Query parameters (%1):").arg(list.count()) << endl;
foreach(QuerySchemaParameterListConstIterator, it, list)
KexiDBDbg << " - " << (*it).debugString() << endl;
}
diff --git a/kexi/kexidb/schemadata.cpp b/kexi/kexidb/schemadata.cpp
index 9b691349..9370a3ac 100644
--- a/kexi/kexidb/schemadata.cpp
+++ b/kexi/kexidb/schemadata.cpp
@@ -51,5 +51,5 @@ TQString SchemaData::schemaDataDebugString() const
desc+="...";
}
return TQString("id=%1 name='%2' caption='%3' desc='%4'")
- .tqarg(m_id).tqarg(m_name).tqarg(m_caption).tqarg(desc);
+ .arg(m_id).arg(m_name).arg(m_caption).arg(desc);
}
diff --git a/kexi/kexidb/simplecommandlineapp.cpp b/kexi/kexidb/simplecommandlineapp.cpp
index 904469bc..570043fe 100644
--- a/kexi/kexidb/simplecommandlineapp.cpp
+++ b/kexi/kexidb/simplecommandlineapp.cpp
@@ -140,7 +140,7 @@ SimpleCommandLineApp::SimpleCommandLineApp(
userAtHost += "@";
userAtHost += (d->connData.hostName.isEmpty() ? "localhost" : d->connData.hostName);
TQTextStream cout(stdout,IO_WriteOnly);
- cout << i18n("Enter password for %1: ").tqarg(userAtHost);
+ cout << i18n("Enter password for %1: ").arg(userAtHost);
//! @todo make use of pty/tty here! (and care about portability)
TQTextStream cin(stdin,IO_ReadOnly);
cin >> d->connData.password;
diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp
index 8551a0ef..594773af 100644
--- a/kexi/kexidb/utils.cpp
+++ b/kexi/kexidb/utils.cpp
@@ -138,7 +138,7 @@ void KexiDB::getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details)
if (!obj->serverErrorMsg().isEmpty())
details += "<p><b><nobr>" +i18n("Message from server:") + "</nobr></b><br>" + obj->serverErrorMsg();
if (!obj->recentSQLString().isEmpty())
- details += "<p><b><nobr>" +i18n("SQL statement:") + TQString("</nobr></b><br><tt>%1</tt>").tqarg(obj->recentSQLString());
+ details += "<p><b><nobr>" +i18n("SQL statement:") + TQString("</nobr></b><br><tt>%1</tt>").arg(obj->recentSQLString());
int serverResult;
TQString serverResultName;
if (obj->serverResult()!=0) {
@@ -179,7 +179,7 @@ int KexiDB::idForObjectName( Connection &conn, const TQString& objName, int objT
{
RowData data;
if (true!=conn.querySingleRecord(TQString("select o_id from kexi__objects where lower(o_name)='%1' and o_type=%2")
- .tqarg(objName.lower()).tqarg(objType), data))
+ .arg(objName.lower()).arg(objType), data))
return 0;
bool ok;
int id = data[0].toInt(&ok);
@@ -387,7 +387,7 @@ ConnectionTestDialog::ConnectionTestDialog(TQWidget* parent,
KexiDB::MessageHandler& msgHandler)
: KProgressDialog(parent, "testconn_dlg",
i18n("Test Connection"), i18n("<qt>Testing connection to <b>%1</b> database server...</qt>")
- .tqarg(data.serverInfoString(true)), true /*modal*/)
+ .arg(data.serverInfoString(true)), true /*modal*/)
, m_thread(new ConnectionTestThread(this, data))
, m_connData(data)
, m_msgHandler(&msgHandler)
@@ -441,13 +441,13 @@ void ConnectionTestDialog::slotTimeout()
else if (notResponding) {
KMessageBox::sorry(0,
i18n("<qt>Test connection to <b>%1</b> database server failed. The server is not responding.</qt>")
- .tqarg(m_connData.serverInfoString(true)),
+ .arg(m_connData.serverInfoString(true)),
i18n("Test Connection"));
}
else {
KMessageBox::information(0,
i18n("<qt>Test connection to <b>%1</b> database server established successfully.</qt>")
- .tqarg(m_connData.serverInfoString(true)),
+ .arg(m_connData.serverInfoString(true)),
i18n("Test Connection"));
}
// slotCancel();
@@ -807,7 +807,7 @@ bool KexiDB::setFieldProperty( Field& field, const TQCString& propertyName, cons
else {
if (!field.table()) {
KexiDBWarn << TQString("KexiDB::setFieldProperty() Cannot set \"%1\" property - no table assinged for field!")
- .tqarg(propertyName.data()) << endl;
+ .arg(propertyName.data()) << endl;
}
else {
LookupFieldSchema *lookup = field.table()->lookupFieldSchema(field);
@@ -1228,7 +1228,7 @@ void KexiDB::getLimitsForType(Field::Type type, int &minValue, int &maxValue)
void KexiDB::debugRowData(const RowData& rowData)
{
- KexiDBDbg << TQString("ROW DATA (%1 columns):").tqarg(rowData.count()) << endl;
+ KexiDBDbg << TQString("ROW DATA (%1 columns):").arg(rowData.count()) << endl;
foreach(RowData::ConstIterator, it, rowData)
KexiDBDbg << "- " << (*it) << endl;
}