diff options
Diffstat (limited to 'kexi/kexidb')
-rw-r--r-- | kexi/kexidb/connection.cpp | 102 | ||||
-rw-r--r-- | kexi/kexidb/dbproperties.cpp | 20 | ||||
-rw-r--r-- | kexi/kexidb/driver.cpp | 4 | ||||
-rw-r--r-- | kexi/kexidb/drivermanager.cpp | 2 | ||||
-rw-r--r-- | kexi/kexidb/drivers/mySQL/mysqldriver.cpp | 2 | ||||
-rw-r--r-- | kexi/kexidb/drivers/pqxx/pqxxconnection.cpp | 10 | ||||
-rw-r--r-- | kexi/kexidb/drivers/pqxx/pqxxcursor.h | 2 | ||||
-rw-r--r-- | kexi/kexidb/drivers/pqxx/pqxxdriver.cpp | 6 | ||||
-rw-r--r-- | kexi/kexidb/drivers/sqlite/sqliteconnection.cpp | 6 | ||||
-rw-r--r-- | kexi/kexidb/drivers/sqlite/sqlitecursor.cpp | 14 | ||||
-rw-r--r-- | kexi/kexidb/expression.cpp | 4 | ||||
-rw-r--r-- | kexi/kexidb/field.cpp | 10 | ||||
-rw-r--r-- | kexi/kexidb/fieldlist.h | 4 | ||||
-rw-r--r-- | kexi/kexidb/queryschema.cpp | 16 | ||||
-rw-r--r-- | kexi/kexidb/utils.cpp | 26 | ||||
-rw-r--r-- | kexi/kexidb/utils.h | 6 |
16 files changed, 117 insertions, 117 deletions
diff --git a/kexi/kexidb/connection.cpp b/kexi/kexidb/connection.cpp index 4af6cae6..34add49a 100644 --- a/kexi/kexidb/connection.cpp +++ b/kexi/kexidb/connection.cpp @@ -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::tqfromLatin1("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").tqarg(objType); Cursor *c = executeQuery(sql); if (!c) { @@ -852,7 +852,7 @@ TQValueList<int> Connection::objectIds(int objType) return list; Cursor *c = executeQuery( - TQString::tqfromLatin1("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").tqarg(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::tqfromLatin1("(%1,%2)").tqarg(field->precision()).tqarg(field->scale()); + v += TQString::fromLatin1("(%1,%2)").tqarg(field->precision()).tqarg(field->scale()); else - v += TQString::tqfromLatin1("(%1)").tqarg(field->precision()); + v += TQString::fromLatin1("(%1)").tqarg(field->precision()); } else if (field->type()==Field::Text && field->length()>0) - v += TQString::tqfromLatin1("(%1)").tqarg(field->length()); + v += TQString::fromLatin1("(%1)").tqarg(field->length()); if (autoinc) v += (" " + @@ -925,7 +925,7 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem if (field->defaultValue().isValid()) { TQString valToSQL( m_driver->valueToSQL( field, field->defaultValue() ) ); if (!valToSQL.isEmpty()) //for sanity - v += TQString::tqfromLatin1(" DEFAULT ") + valToSQL; + v += TQString::fromLatin1(" DEFAULT ") + valToSQL; } } sql += v; @@ -1106,14 +1106,14 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, for (Field::ListIterator it = querySchema.fieldsIterator(); (f = it.current()); ++it, number++) { if (querySchema.isColumnVisible(number)) { if (!sql.isEmpty()) - sql += TQString::tqfromLatin1(", "); + sql += TQString::fromLatin1(", "); if (f->isQueryAsterisk()) { if (!singleTable && static_cast<QueryAsterisk*>(f)->isSingleTableAsterisk()) //single-table * sql += escapeIdentifier(f->table()->name(), options.identifierEscaping) + - TQString::tqfromLatin1(".*"); + TQString::fromLatin1(".*"); else //all-tables * (or simplified table.* when there's only one table) - sql += TQString::tqfromLatin1("*"); + sql += TQString::fromLatin1("*"); } else { if (f->isExpression()) { @@ -1137,7 +1137,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, } TQString aliasString = TQString(querySchema.columnAlias(number)); if (!aliasString.isEmpty()) - sql += (TQString::tqfromLatin1(" AS ") + aliasString); + sql += (TQString::fromLatin1(" AS ") + aliasString); //! @todo add option that allows to omit "AS" keyword } LookupFieldSchema *lookupFieldSchema = (options.addVisibleLookupColumns && f->table()) @@ -1159,7 +1159,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, { //add LEFT OUTER JOIN if (!s_additional_joins.isEmpty()) - s_additional_joins += TQString::tqfromLatin1(" "); + s_additional_joins += TQString::fromLatin1(" "); TQString internalUniqueTableAlias( TQString("__kexidb_") + lookupTable->name() + "_" + TQString::number(internalUniqueTableAliasNumber++) ); s_additional_joins += TQString("LEFT OUTER JOIN %1 AS %2 ON %3.%4=%5.%6") @@ -1177,13 +1177,13 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, /* not true //table should be added after FROM if (!s_from_additional.isEmpty()) - s_from_additional += TQString::tqfromLatin1(", "); + s_from_additional += TQString::fromLatin1(", "); s_from_additional += escapeIdentifier(visibleField->table()->name(), options.identifierEscaping); */ } #endif if (!s_additional_fields.isEmpty()) - s_additional_fields += TQString::tqfromLatin1(", "); + s_additional_fields += TQString::fromLatin1(", "); // s_additional_fields += (internalUniqueTableAlias + "." //escapeIdentifier(visibleField->table()->name(), options.identifierEscaping) + "." // escapeIdentifier(visibleField->name(), options.identifierEscaping)); //! @todo Add lookup schema option for separator other than ' ' or even option for placeholders like "Name ? ?" @@ -1216,7 +1216,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, } //add LEFT OUTER JOIN if (!s_additional_joins.isEmpty()) - s_additional_joins += TQString::tqfromLatin1(" "); + s_additional_joins += TQString::fromLatin1(" "); TQString internalUniqueQueryAlias( kexidb_subquery_prefix + lookupQuery->name() + "_" + TQString::number(internalUniqueQueryAliasNumber++) ); @@ -1229,7 +1229,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, .tqarg(escapeIdentifier(boundColumnInfo->aliasOrName(), options.identifierEscaping)); if (!s_additional_fields.isEmpty()) - s_additional_fields += TQString::tqfromLatin1(", "); + s_additional_fields += TQString::fromLatin1(", "); const TQValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() ); TQString expression; foreach (TQValueList<uint>::ConstIterator, visibleColumnsIt, visibleColumns) { @@ -1260,12 +1260,12 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, //add lookup fields if (!s_additional_fields.isEmpty()) - sql += (TQString::tqfromLatin1(", ") + s_additional_fields); + sql += (TQString::fromLatin1(", ") + s_additional_fields); if (options.alsoRetrieveROWID) { //append rowid column TQString s; if (!sql.isEmpty()) - s = TQString::tqfromLatin1(", "); + s = TQString::fromLatin1(", "); if (querySchema.masterTable()) s += (escapeIdentifier(querySchema.masterTable()->name())+"."); s += m_driver->beh->ROW_ID_FIELD_NAME; @@ -1275,7 +1275,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, sql.prepend("SELECT "); TableSchema::List* tables = querySchema.tables(); if ((tables && !tables->isEmpty()) || !subqueries_for_lookup_data.isEmpty()) { - sql += TQString::tqfromLatin1(" FROM "); + sql += TQString::fromLatin1(" FROM "); TQString s_from; if (tables) { TableSchema *table; @@ -1284,15 +1284,15 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, ++it, number++) { if (!s_from.isEmpty()) - s_from += TQString::tqfromLatin1(", "); + s_from += TQString::fromLatin1(", "); s_from += escapeIdentifier(table->name(), options.identifierEscaping); TQString aliasString = TQString(querySchema.tableAlias(number)); if (!aliasString.isEmpty()) - s_from += (TQString::tqfromLatin1(" AS ") + aliasString); + s_from += (TQString::fromLatin1(" AS ") + aliasString); } /*unused if (!s_from_additional.isEmpty()) {//additional tables list needed for lookup fields if (!s_from.isEmpty()) - s_from += TQString::tqfromLatin1(", "); + s_from += TQString::fromLatin1(", "); s_from += s_from_additional; }*/ } @@ -1302,10 +1302,10 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, subqueries_for_lookup_data.current(); ++it, subqueries_for_lookup_data_counter++) { if (!s_from.isEmpty()) - s_from += TQString::tqfromLatin1(", "); - s_from += TQString::tqfromLatin1("("); + s_from += TQString::fromLatin1(", "); + s_from += TQString::fromLatin1("("); s_from += selectStatement( *it.current(), params, options ); - s_from += TQString::tqfromLatin1(") AS %1%2") + s_from += TQString::fromLatin1(") AS %1%2") .tqarg(kexidb_subquery_prefix).tqarg(subqueries_for_lookup_data_counter); } sql += s_from; @@ -1315,7 +1315,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, //JOINS if (!s_additional_joins.isEmpty()) { - sql += TQString::tqfromLatin1(" ") + s_additional_joins + TQString::tqfromLatin1(" "); + sql += TQString::fromLatin1(" ") + s_additional_joins + TQString::fromLatin1(" "); } //@todo: we're using WHERE for joins now; use INNER/LEFT/RIGHT JOIN later @@ -1328,24 +1328,24 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, wasWhere = true; } else - s_where += TQString::tqfromLatin1(" AND "); + s_where += TQString::fromLatin1(" AND "); Field::Pair *pair; TQString s_where_sub; for (TQPtrListIterator<Field::Pair> p_it(*rel->fieldPairs()); (pair = p_it.current()); ++p_it) { if (!s_where_sub.isEmpty()) - s_where_sub += TQString::tqfromLatin1(" AND "); + s_where_sub += TQString::fromLatin1(" AND "); s_where_sub += ( escapeIdentifier(pair->first->table()->name(), options.identifierEscaping) + - TQString::tqfromLatin1(".") + + TQString::fromLatin1(".") + escapeIdentifier(pair->first->name(), options.identifierEscaping) + - TQString::tqfromLatin1(" = ") + + TQString::fromLatin1(" = ") + escapeIdentifier(pair->second->table()->name(), options.identifierEscaping) + - TQString::tqfromLatin1(".") + + TQString::fromLatin1(".") + escapeIdentifier(pair->second->name(), options.identifierEscaping)); } if (rel->fieldPairs()->count()>1) { s_where_sub.prepend("("); - s_where_sub += TQString::tqfromLatin1(")"); + s_where_sub += TQString::fromLatin1(")"); } s_where += s_where_sub; } @@ -1362,7 +1362,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, } } if (!s_where.isEmpty()) - sql += TQString::tqfromLatin1(" WHERE ") + s_where; + sql += TQString::fromLatin1(" WHERE ") + s_where; //! \todo (js) add other sql parts //(use wasWhere here) @@ -1424,8 +1424,8 @@ TQ_ULLONG Connection::lastInsertedAutoIncValue(const TQString& aiFieldName, cons } RowData rdata; if (row_id<=0 || true!=querySingleRecord( - TQString::tqfromLatin1("SELECT ") + tableName + TQString::tqfromLatin1(".") + aiFieldName + TQString::tqfromLatin1(" FROM ") + tableName - + TQString::tqfromLatin1(" WHERE ") + m_driver->beh->ROW_ID_FIELD_NAME + TQString::tqfromLatin1("=") + TQString::number(row_id), rdata)) + TQString::fromLatin1("SELECT ") + tableName + TQString::fromLatin1(".") + aiFieldName + TQString::fromLatin1(" FROM ") + tableName + + TQString::fromLatin1(" WHERE ") + m_driver->beh->ROW_ID_FIELD_NAME + TQString::fromLatin1("=") + TQString::number(row_id), rdata)) { // KexiDBDbg << "Connection::lastInsertedAutoIncValue(): row_id<=0 || true!=querySingleRecord()" << endl; return (TQ_ULLONG)-1; //ULL; @@ -1838,12 +1838,12 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam } // the new table owns the previous table's id: - if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__objects SET o_id=%1 WHERE o_id=%2 AND o_type=%3") + 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))) { return false; } - if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__fields SET t_id=%1 WHERE t_id=%2") + if (!executeSQL(TQString::fromLatin1("UPDATE kexi__fields SET t_id=%1 WHERE t_id=%2") .tqarg(origID).tqarg(tableSchema.id()))) { return false; @@ -1861,7 +1861,7 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam // Update kexi__objects //TODO - if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__objects SET o_name=%1 WHERE o_id=%2") + if (!executeSQL(TQString::fromLatin1("UPDATE kexi__objects SET o_name=%1 WHERE o_id=%2") .tqarg(m_driver->escapeString(tableSchema.name())).tqarg(tableSchema.id()))) { alterTableName_ERR; @@ -1889,7 +1889,7 @@ bool Connection::drv_alterTableName(TableSchema& tableSchema, const TQString& ne const TQString oldTableName = tableSchema.name(); tableSchema.setName(newName); - if (!executeSQL(TQString::tqfromLatin1("ALTER TABLE %1 RENAME TO %2") + if (!executeSQL(TQString::fromLatin1("ALTER TABLE %1 RENAME TO %2") .tqarg(escapeIdentifier(oldTableName)).tqarg(escapeIdentifier(newName)))) { tableSchema.setName(oldTableName); //restore old name @@ -2300,7 +2300,7 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata ) tristate Connection::loadObjectSchemaData( int objectID, SchemaData &sdata ) { RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + 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)) return cancelled; @@ -2310,7 +2310,7 @@ tristate Connection::loadObjectSchemaData( int objectID, SchemaData &sdata ) tristate Connection::loadObjectSchemaData( int objectType, const TQString& objectName, SchemaData &sdata ) { RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1("SELECT o_id, o_type, o_name, o_caption, o_desc " + 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)) return cancelled; @@ -2324,7 +2324,7 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject ) return false; if (newObject) { int existingID; - if (true == querySingleNumber(TQString::tqfromLatin1( + 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)) { @@ -2807,7 +2807,7 @@ KexiDB::TableSchema* Connection::setupTableSchema( const RowData &data ) KexiDB::Cursor *cursor; if (!(cursor = executeQuery( - TQString::tqfromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, " + 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) ))) { @@ -2867,7 +2867,7 @@ TableSchema* Connection::tableSchema( const TQString& tableName ) return t; //not found: retrieve schema RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + 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)) return 0; @@ -2882,7 +2882,7 @@ TableSchema* Connection::tableSchema( int tableId ) return t; //not found: retrieve schema RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + 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)) return 0; @@ -2904,7 +2904,7 @@ bool Connection::storeDataBlock( int objectID, const TQString &dataString, const { if (objectID<=0) return false; - TQString sql(TQString::tqfromLatin1("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").tqarg(objectID)); TQString sql_sub( KexiDB::sqlWhere(m_driver, KexiDB::Field::Text, "o_sub_id", dataID) ); bool ok, exists; @@ -2917,7 +2917,7 @@ bool Connection::storeDataBlock( int objectID, const TQString &dataString, const + " WHERE o_id=" + TQString::number(objectID) + " AND " + sql_sub ); } return executeSQL( - TQString::tqfromLatin1("INSERT INTO kexi__objectdata (o_id, o_data, o_sub_id) VALUES (") + TQString::fromLatin1("INSERT INTO kexi__objectdata (o_id, o_data, o_sub_id) VALUES (") + TQString::number(objectID) +"," + m_driver->valueToSQL( KexiDB::Field::LongText, dataString ) + "," + m_driver->valueToSQL( KexiDB::Field::Text, dataID ) + ")" ); } @@ -2974,7 +2974,7 @@ QuerySchema* Connection::querySchema( const TQString& queryName ) return q; //not found: retrieve schema RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + 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)) return 0; @@ -2990,7 +2990,7 @@ QuerySchema* Connection::querySchema( int queryId ) //not found: retrieve schema clearError(); RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + 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)) return 0; @@ -3351,11 +3351,11 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf return false; } RowData aif_data; - TQString getAutoIncForInsertedValue = TQString::tqfromLatin1("SELECT ") + TQString getAutoIncForInsertedValue = TQString::fromLatin1("SELECT ") + query.autoIncrementSQLFieldsList(m_driver) - + TQString::tqfromLatin1(" FROM ") + + TQString::fromLatin1(" FROM ") + escapeIdentifier(id_columnInfo->field->table()->name()) - + TQString::tqfromLatin1(" WHERE ") + + TQString::fromLatin1(" WHERE ") + escapeIdentifier(id_columnInfo->field->name()) + "=" + TQString::number(last_id); if (true!=querySingleRecord(getAutoIncForInsertedValue, aif_data)) { diff --git a/kexi/kexidb/dbproperties.cpp b/kexi/kexidb/dbproperties.cpp index 44b69192..27b6a5b2 100644 --- a/kexi/kexidb/dbproperties.cpp +++ b/kexi/kexidb/dbproperties.cpp @@ -38,7 +38,7 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value bool ok; //we need to know whether update or insert bool exists = m_conn->resultExists( - TQString::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") + TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") .tqarg(m_conn->driver()->escapeString(name)), ok); if (!ok) { setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name)); @@ -47,7 +47,7 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value if (exists) { if (!m_conn->executeSQL( - TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") + 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)))) { @@ -58,7 +58,7 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value } if (!m_conn->executeSQL( - TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") + 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())))) { @@ -76,7 +76,7 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt bool ok; //we need to know whether update or insert bool exists = m_conn->resultExists( - TQString::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") + TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") .tqarg(m_conn->driver()->escapeString(name)), ok); if (!ok) { setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name)); @@ -85,7 +85,7 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt if (exists) { if (!m_conn->executeSQL( - TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") + 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)))) { @@ -96,7 +96,7 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt } if (!m_conn->executeSQL( - TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") + 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)))) { @@ -111,7 +111,7 @@ TQVariant DatabaseProperties::value( const TQString& _name ) TQString result; TQString name(_name.stripWhiteSpace()); if (true!=m_conn->querySingleString( - TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + 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)); return TQVariant(); @@ -126,7 +126,7 @@ TQString DatabaseProperties::caption( const TQString& _name ) //captions have ' ' prefix name.prepend(" "); if (true!=m_conn->querySingleString( - TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + 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)); return TQString(); @@ -138,8 +138,8 @@ TQStringList DatabaseProperties::names() { TQStringList result; if (true!=m_conn->queryStringList( - TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ") - + m_conn->driver()->escapeString(TQString::tqfromLatin1(" %%")), result, 0 /*0-th*/)) { + TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ") + + m_conn->driver()->escapeString(TQString::fromLatin1(" %%")), result, 0 /*0-th*/)) { // ^^ exclude captions setError(m_conn, i18n("Could not read database properties.")); return TQStringList(); diff --git a/kexi/kexidb/driver.cpp b/kexi/kexidb/driver.cpp index 4db1b400..5d8f8d48 100644 --- a/kexi/kexidb/driver.cpp +++ b/kexi/kexidb/driver.cpp @@ -135,7 +135,7 @@ TQString Driver::fileDBDriverMimeType() const { return d->fileDBDriverMimeType; } TQString Driver::defaultFileBasedDriverMimeType() -{ return TQString::tqfromLatin1("application/x-kexiproject-sqlite3"); } +{ return TQString::fromLatin1("application/x-kexiproject-sqlite3"); } TQString Driver::defaultFileBasedDriverName() { @@ -282,7 +282,7 @@ TQString Driver::valueToSQL( uint ftype, const TQVariant& v ) const return dateTimeToSQL( v.toDateTime() ); case Field::BLOB: { if (v.toByteArray().isEmpty()) - return TQString::tqfromLatin1("NULL"); + return TQString::fromLatin1("NULL"); if (v.type()==TQVariant::String) return escapeBLOB(v.toString().utf8()); return escapeBLOB(v.toByteArray()); diff --git a/kexi/kexidb/drivermanager.cpp b/kexi/kexidb/drivermanager.cpp index 0a7ff574..5abacc94 100644 --- a/kexi/kexidb/drivermanager.cpp +++ b/kexi/kexidb/drivermanager.cpp @@ -425,7 +425,7 @@ TQString DriverManager::possibleProblemsInfoMsg() const for (TQStringList::ConstIterator it = d_int->possibleProblems.constBegin(); it!=d_int->possibleProblems.constEnd(); ++it) { - str += (TQString::tqfromLatin1("<li>") + *it + TQString::tqfromLatin1("</li>")); + str += (TQString::fromLatin1("<li>") + *it + TQString::fromLatin1("</li>")); } str += "</ul>"; return str; diff --git a/kexi/kexidb/drivers/mySQL/mysqldriver.cpp b/kexi/kexidb/drivers/mySQL/mysqldriver.cpp index 01d326af..10654e7e 100644 --- a/kexi/kexidb/drivers/mySQL/mysqldriver.cpp +++ b/kexi/kexidb/drivers/mySQL/mysqldriver.cpp @@ -125,7 +125,7 @@ TQString MySqlDriver::escapeString(const TQString& str) const break; } if (i >= old_length) { //no characters to escape - return TQString::tqfromLatin1("'") + str + TQString::tqfromLatin1("'"); + return TQString::fromLatin1("'") + str + TQString::fromLatin1("'"); } TQChar *new_string = new TQChar[ old_length * 3 + 1 ]; // a worst case approximation diff --git a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp index c81f04ad..faa7b582 100644 --- a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp +++ b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp @@ -128,7 +128,7 @@ bool pqxxSqlConnection::drv_getDatabasesList( TQStringList &list ) // Read value of column 0 into a string N c[0].to(N); // Copy the result into the return list - list << TQString::tqfromLatin1 (N.c_str()); + list << TQString::fromLatin1 (N.c_str()); } return true; } @@ -190,15 +190,15 @@ bool pqxxSqlConnection::drv_useDatabase( const TQString &dbName, bool *cancelled if (data()->port == 0) data()->port = 5432; - conninfo += TQString::tqfromLatin1(" port='%1'").tqarg(data()->port); + conninfo += TQString::fromLatin1(" port='%1'").tqarg(data()->port); - conninfo += TQString::tqfromLatin1(" dbname='%1'").tqarg(dbName); + conninfo += TQString::fromLatin1(" dbname='%1'").tqarg(dbName); if (!data()->userName.isNull()) - conninfo += TQString::tqfromLatin1(" user='%1'").tqarg(data()->userName); + conninfo += TQString::fromLatin1(" user='%1'").tqarg(data()->userName); if (!data()->password.isNull()) - conninfo += TQString::tqfromLatin1(" password='%1'").tqarg(data()->password); + conninfo += TQString::fromLatin1(" password='%1'").tqarg(data()->password); try { diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.h b/kexi/kexidb/drivers/pqxx/pqxxcursor.h index 637a33f3..8a61978d 100644 --- a/kexi/kexidb/drivers/pqxx/pqxxcursor.h +++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.h @@ -79,7 +79,7 @@ inline TQVariant pgsqlCStrToVariant(const pqxx::result::field& r) switch(r.type()) { case BOOLOID: - return TQString::tqfromLatin1(r.c_str(), r.size())=="true"; //TODO check formatting + return TQString::fromLatin1(r.c_str(), r.size())=="true"; //TODO check formatting case INT2OID: case INT4OID: case INT8OID: diff --git a/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp b/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp index 333df590..8967bc5e 100644 --- a/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp +++ b/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp @@ -133,9 +133,9 @@ bool pqxxSqlDriver::isSystemDatabaseName( const TQString& n ) const // TQString pqxxSqlDriver::escapeString( const TQString& str) const { - return TQString::tqfromLatin1("'") + return TQString::fromLatin1("'") + TQString::fromAscii( pqxx::sqlesc(std::string(str.utf8())).c_str() ) - + TQString::tqfromLatin1("'"); + + TQString::fromLatin1("'"); } //================================================================================== @@ -172,7 +172,7 @@ TQString pqxxSqlDriver::valueToSQL( uint ftype, const TQVariant& v ) const // use SQL compliant TRUE or FALSE as described here // http://www.postgresql.org/docs/8.0/interactive/datatype-boolean.html // 1 or 0 does not work - return v.toInt()==0 ? TQString::tqfromLatin1("FALSE") : TQString::tqfromLatin1("TRUE"); + return v.toInt()==0 ? TQString::fromLatin1("FALSE") : TQString::fromLatin1("TRUE"); } return Driver::valueToSQL(ftype, v); } diff --git a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp index 631f3bc6..b10d5383 100644 --- a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp +++ b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp @@ -324,9 +324,9 @@ TQString SQLiteConnection::serverResultName() { TQString r = #ifdef SQLITE2 - TQString::tqfromLatin1( sqlite_error_string(d->res) ); + TQString::fromLatin1( sqlite_error_string(d->res) ); #else //SQLITE3 - TQString(); //tqfromLatin1( d->result_name ); + TQString(); //fromLatin1( d->result_name ); #endif return r.isEmpty() ? Connection::serverResultName() : r; } @@ -395,7 +395,7 @@ bool SQLiteConnection::drv_alterTableName(TableSchema& tableSchema, const TQStri //TODO indices, etc.??? // 3. copy all rows to the new table - if (!executeSQL(TQString::tqfromLatin1("INSERT INTO %1 SELECT * FROM %2") + if (!executeSQL(TQString::fromLatin1("INSERT INTO %1 SELECT * FROM %2") .tqarg(escapeIdentifier(tableSchema.name())).tqarg(escapeIdentifier(oldTableName)))) { drv_alterTableName_ERR; diff --git a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp index 5239127c..20d80f9c 100644 --- a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp +++ b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp @@ -476,19 +476,19 @@ void SQLiteCursor::storeCurrentRow(RowData &data) const case Field::Integer: data[i] = TQVariant( TQCString(*col).toInt() ); case Field::BigInteger: - data[i] = TQVariant( TQString::tqfromLatin1(*col).toLongLong() ); + data[i] = TQVariant( TQString::fromLatin1(*col).toLongLong() ); case Field::Boolean: - data[i] = TQVariant( sqliteStringToBool(TQString::tqfromLatin1(*col)), 1 ); + data[i] = TQVariant( sqliteStringToBool(TQString::fromLatin1(*col)), 1 ); break; case Field::Date: - data[i] = TQDate::fromString( TQString::tqfromLatin1(*col), Qt::ISODate ); + data[i] = TQDate::fromString( TQString::fromLatin1(*col), Qt::ISODate ); break; case Field::Time: //TQDateTime - a hack needed because TQVariant(TQTime) has broken isNull() - data[i] = KexiUtils::stringToHackedTQTime(TQString::tqfromLatin1(*col)); + data[i] = KexiUtils::stringToHackedTQTime(TQString::fromLatin1(*col)); break; case Field::DateTime: { - TQString tmp( TQString::tqfromLatin1(*col) ); + TQString tmp( TQString::fromLatin1(*col) ); tmp[10] = 'T'; data[i] = TQDateTime::fromString( tmp, Qt::ISODate ); break; @@ -548,9 +548,9 @@ int SQLiteCursor::serverResult() TQString SQLiteCursor::serverResultName() { #ifdef SQLITE2 - return TQString::tqfromLatin1( sqlite_error_string(d->res) ); + return TQString::fromLatin1( sqlite_error_string(d->res) ); #else //SQLITE3 - return TQString::tqfromLatin1( d->result_name ); + return TQString::fromLatin1( d->result_name ); #endif } diff --git a/kexi/kexidb/expression.cpp b/kexi/kexidb/expression.cpp index 35ab8d70..034154bf 100644 --- a/kexi/kexidb/expression.cpp +++ b/kexi/kexidb/expression.cpp @@ -601,13 +601,13 @@ void QueryParameterExpr::setType(Field::Type type) TQString QueryParameterExpr::debugString() { - return TQString("QueryParameterExpr('") + TQString::tqfromLatin1("[%2]").tqarg(value.toString()) + return TQString("QueryParameterExpr('") + TQString::fromLatin1("[%2]").tqarg(value.toString()) + TQString("',type=%1)").tqarg(Driver::defaultSQLTypeName(type())); } TQString QueryParameterExpr::toString(QuerySchemaParameterValueListIterator* params) { - return params ? params->getPreviousValueAsString(type()) : TQString::tqfromLatin1("[%2]").tqarg(value.toString()); + return params ? params->getPreviousValueAsString(type()) : TQString::fromLatin1("[%2]").tqarg(value.toString()); } void QueryParameterExpr::getQueryParameters(QuerySchemaParameterList& params) diff --git a/kexi/kexidb/field.cpp b/kexi/kexidb/field.cpp index 33e9e929..6666fcfd 100644 --- a/kexi/kexidb/field.cpp +++ b/kexi/kexidb/field.cpp @@ -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::tqfromLatin1("(%1,%2)").tqarg(m_precision).tqarg(scale()); + dbg += TQString::fromLatin1("(%1,%2)").tqarg(m_precision).tqarg(scale()); else - dbg += TQString::tqfromLatin1("(%1)").tqarg(m_precision); + dbg += TQString::fromLatin1("(%1)").tqarg(m_precision); } else if (m_type==Field::Text && m_length>0) - dbg += TQString::tqfromLatin1("(%1)").tqarg(m_length); + dbg += TQString::fromLatin1("(%1)").tqarg(m_length); if (m_constraints & Field::AutoInc) dbg += " AUTOINC"; if (m_constraints & Field::Unique) @@ -664,10 +664,10 @@ void Field::setCustomProperty(const TQCString& propertyName, const TQVariant& va //------------------------------------------------------- #define ADDTYPE(type, i18, str) this->at(Field::type) = i18; \ this->at(Field::type+Field::LastType+1) = str; \ - str2num.insert(TQString::tqfromLatin1(str).lower(), type) + str2num.insert(TQString::fromLatin1(str).lower(), type) #define ADDGROUP(type, i18, str) this->at(Field::type) = i18; \ this->at(Field::type+Field::LastTypeGroup+1) = str; \ - str2num.insert(TQString::tqfromLatin1(str).lower(), type) + str2num.insert(TQString::fromLatin1(str).lower(), type) Field::FieldTypeNames::FieldTypeNames() : TQValueVector<TQString>() diff --git a/kexi/kexidb/fieldlist.h b/kexi/kexidb/fieldlist.h index fbf303a9..9db4f5a6 100644 --- a/kexi/kexidb/fieldlist.h +++ b/kexi/kexidb/fieldlist.h @@ -143,13 +143,13 @@ class KEXI_DB_EXPORT FieldList See @ref Connection::selectStatement() for example use. \a drvEscaping can be used to alter default escaping type. */ - TQString sqlFieldsList(Driver *driver, const TQString& separator = TQString::tqfromLatin1(","), + TQString sqlFieldsList(Driver *driver, const TQString& separator = TQString::fromLatin1(","), const TQString& tableAlias = TQString(), int drvEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary); /*! Like above, but this is convenient static function, so you can pass any \a list here. */ static TQString sqlFieldsList(Field::List* list, Driver *driver, - const TQString& separator = TQString::tqfromLatin1(","), const TQString& tableAlias = TQString(), + const TQString& separator = TQString::fromLatin1(","), const TQString& tableAlias = TQString(), int drvEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary); /*! @internal Renames field \a oldName to \a newName. diff --git a/kexi/kexidb/queryschema.cpp b/kexi/kexidb/queryschema.cpp index b77f76a3..cff98a31 100644 --- a/kexi/kexidb/queryschema.cpp +++ b/kexi/kexidb/queryschema.cpp @@ -53,7 +53,7 @@ TQString QueryColumnInfo::debugString() const { return field->name() + ( alias.isEmpty() ? TQString() - : (TQString::tqfromLatin1(" AS ") + TQString(alias)) ); + : (TQString::fromLatin1(" AS ") + TQString(alias)) ); } //======================================= @@ -816,7 +816,7 @@ TQString QuerySchema::debugString() if (tablePos>=0) { TQCString tAlias = tableAlias(tablePos); if (!tAlias.isEmpty()) { - dbg2 += (TQString::tqfromLatin1(" field \"") + FieldList::field(i)->name() + dbg2 += (TQString::fromLatin1(" field \"") + FieldList::field(i)->name() + "\" uses alias \"" + TQString(tAlias) + "\" of table \"" + d->tables.at(tablePos)->name() + "\"\n"); } @@ -1291,7 +1291,7 @@ void QuerySchema::computeFieldsExpanded() // (the expression object will be owned by column info) visibleColumn = new Field(); visibleColumn->setName( - TQString::tqfromLatin1("[multiple_visible_fields_%1]") + TQString::fromLatin1("[multiple_visible_fields_%1]") .tqarg( ++numberOfColumnsWithMultipleVisibleFields )); visibleColumn->setExpression( new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/)); @@ -1310,7 +1310,7 @@ void QuerySchema::computeFieldsExpanded() if (!table( visibleField->table()->name() )) { } if (!sql.isEmpty()) - sql += TQString::tqfromLatin1(", "); + sql += TQString::fromLatin1(", "); sql += (escapeIdentifier(visibleField->table()->name(), drvEscaping) + "." + escapeIdentifier(visibleField->name(), drvEscaping)); }*/ @@ -1351,7 +1351,7 @@ void QuerySchema::computeFieldsExpanded() // (the expression object will be owned by column info) visibleColumn = new Field(); visibleColumn->setName( - TQString::tqfromLatin1("[multiple_visible_fields_%1]") + TQString::fromLatin1("[multiple_visible_fields_%1]") .tqarg( ++numberOfColumnsWithMultipleVisibleFields )); visibleColumn->setExpression( new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/)); @@ -1370,7 +1370,7 @@ void QuerySchema::computeFieldsExpanded() if (!table( visibleField->table()->name() )) { } if (!sql.isEmpty()) - sql += TQString::tqfromLatin1(", "); + sql += TQString::fromLatin1(", "); sql += (escapeIdentifier(visibleField->table()->name(), drvEscaping) + "." + escapeIdentifier(visibleField->name(), drvEscaping)); }*/ @@ -1508,7 +1508,7 @@ void QuerySchema::computeFieldsExpanded() ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index ); } else { - const TQString key( TQString::tqfromLatin1("[multiple_visible_fields_%1]_%2.%3") + const TQString key( TQString::fromLatin1("[multiple_visible_fields_%1]_%2.%3") .tqarg( ++numberOfColumnsWithMultipleVisibleFields ) .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) ); uint *index = lookup_dict[ key ]; @@ -1542,7 +1542,7 @@ void QuerySchema::computeFieldsExpanded() ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index ); } else { - const TQString key( TQString::tqfromLatin1("[multiple_visible_fields_%1]_%2.%3") + const TQString key( TQString::fromLatin1("[multiple_visible_fields_%1]_%2.%3") .tqarg( ++numberOfColumnsWithMultipleVisibleFields ) .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) ); uint *index = lookup_dict[ key ]; diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp index 9fa9ca01..8551a0ef 100644 --- a/kexi/kexidb/utils.cpp +++ b/kexi/kexidb/utils.cpp @@ -159,9 +159,9 @@ void KexiDB::getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details) if (!details.isEmpty() && !details.startsWith("<qt>")) { if (details.startsWith("<p>")) - details = TQString::tqfromLatin1("<qt>")+details; + details = TQString::fromLatin1("<qt>")+details; else - details = TQString::tqfromLatin1("<qt><p>")+details; + details = TQString::fromLatin1("<qt><p>")+details; } } @@ -493,7 +493,7 @@ void KexiDB::connectionTestDialog(TQWidget* parent, const KexiDB::ConnectionData int KexiDB::rowCount(Connection &conn, const TQString& sql) { int count = -1; //will be changed only on success of querySingleNumber() - TQString selectSql( TQString::tqfromLatin1("SELECT COUNT() FROM (") + sql + ")" ); + TQString selectSql( TQString::fromLatin1("SELECT COUNT() FROM (") + sql + ")" ); conn.querySingleNumber(selectSql, count); return count; } @@ -507,7 +507,7 @@ int KexiDB::rowCount(const KexiDB::TableSchema& tableSchema) } int count = -1; //will be changed only on success of querySingleNumber() tableSchema.connection()->querySingleNumber( - TQString::tqfromLatin1("SELECT COUNT(*) FROM ") + TQString::fromLatin1("SELECT COUNT(*) FROM ") + tableSchema.connection()->driver()->escapeIdentifier(tableSchema.name()), count ); @@ -523,7 +523,7 @@ int KexiDB::rowCount(KexiDB::QuerySchema& querySchema) } int count = -1; //will be changed only on success of querySingleNumber() querySchema.connection()->querySingleNumber( - TQString::tqfromLatin1("SELECT COUNT(*) FROM (") + TQString::fromLatin1("SELECT COUNT(*) FROM (") + querySchema.connection()->selectStatement(querySchema) + ")", count ); @@ -965,7 +965,7 @@ TQDomElement KexiDB::saveBooleanElementToDom(TQDomDocument& doc, TQDomElement& p TQDomElement numberEl( doc.createElement("bool") ); el.appendChild( numberEl ); numberEl.appendChild( doc.createTextNode( - value ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("false") ) ); + value ? TQString::fromLatin1("true") : TQString::fromLatin1("false") ) ); return el; } @@ -998,9 +998,9 @@ TQVariant KexiDB::emptyValueForType( KexiDB::Field::Type type ) return val; else { //special cases if (type==Field::Date) - return TQDate::tqcurrentDate(); + return TQDate::currentDate(); if (type==Field::DateTime) - return TQDateTime::tqcurrentDateTime(); + return TQDateTime::currentDateTime(); if (type==Field::Time) return TQTime::currentTime(); } @@ -1047,9 +1047,9 @@ TQVariant KexiDB::notEmptyValueForType( KexiDB::Field::Type type ) return val; else { //special cases if (type==Field::Date) - return TQDate::tqcurrentDate(); + return TQDate::currentDate(); if (type==Field::DateTime) - return TQDateTime::tqcurrentDateTime(); + return TQDateTime::currentDateTime(); if (type==Field::Time) return TQTime::currentTime(); } @@ -1076,11 +1076,11 @@ TQString KexiDB::escapeBLOB(const TQByteArray& array, BLOBEscapingType type) return TQString(); } if (type == BLOBEscapeXHex) - str = TQString::tqfromLatin1("X'"); + str = TQString::fromLatin1("X'"); else if (type == BLOBEscape0xHex) - str = TQString::tqfromLatin1("0x"); + str = TQString::fromLatin1("0x"); else if (type == BLOBEscapeOctal) - str = TQString::tqfromLatin1("'"); + str = TQString::fromLatin1("'"); int new_length = str.length(); //after X' or 0x, etc. if (type == BLOBEscapeOctal) { diff --git a/kexi/kexidb/utils.h b/kexi/kexidb/utils.h index ec807d34..334ea20c 100644 --- a/kexi/kexidb/utils.h +++ b/kexi/kexidb/utils.h @@ -454,11 +454,11 @@ namespace KexiDB return TQString::fromUtf8(data, length); if (f->isIntegerType()) { if (f->type()==KexiDB::Field::BigInteger) - return TQVariant( TQString::tqfromLatin1(data, length).toLongLong() ); - return TQVariant( TQString::tqfromLatin1(data, length).toInt() ); + return TQVariant( TQString::fromLatin1(data, length).toLongLong() ); + return TQVariant( TQString::fromLatin1(data, length).toInt() ); } if (f->isFPNumericType()) - return TQString::tqfromLatin1(data, length).toDouble(); + return TQString::fromLatin1(data, length).toDouble(); if (f->type()==KexiDB::Field::BLOB) { TQByteArray ba; ba.duplicate(data, length); |