summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/drivers/pqxx
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:12:30 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:12:30 -0600
commit11191ef0b9908604d1d7aaca382b011ef22c454c (patch)
treed38f0ccd8bfcc9756f5cfc42fb2ad1dad351e6aa /kexi/kexidb/drivers/pqxx
parentc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (diff)
downloadkoffice-11191ef0b9908604d1d7aaca382b011ef22c454c.tar.gz
koffice-11191ef0b9908604d1d7aaca382b011ef22c454c.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kexi/kexidb/drivers/pqxx')
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxconnection.cpp10
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxcursor.h2
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxdriver.cpp6
3 files changed, 9 insertions, 9 deletions
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);
}