From 94844816550ad672ccfcdc25659c625546239998 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:32:11 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kexi/kexidb/drivers/pqxx/pqxxconnection.cpp | 12 ++++++------ kexi/kexidb/drivers/pqxx/pqxxcursor.h | 2 +- kexi/kexidb/drivers/pqxx/pqxxdriver.cpp | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'kexi/kexidb/drivers/pqxx') diff --git a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp index c81f04ad..d6262bef 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'").arg(data()->port); - conninfo += TQString::tqfromLatin1(" dbname='%1'").tqarg(dbName); + conninfo += TQString::fromLatin1(" dbname='%1'").arg(dbName); if (!data()->userName.isNull()) - conninfo += TQString::tqfromLatin1(" user='%1'").tqarg(data()->userName); + conninfo += TQString::fromLatin1(" user='%1'").arg(data()->userName); if (!data()->password.isNull()) - conninfo += TQString::tqfromLatin1(" 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/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); } -- cgit v1.2.1