From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp') diff --git a/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp b/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp index 9797ca967..50b94ae2a 100644 --- a/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp +++ b/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp @@ -18,10 +18,10 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -67,37 +67,37 @@ void MySqlConnectionInternal::storeResult() none is specified). If the server is on a remote machine, then a port is the port that the remote server is listening on. */ -//bool MySqlConnectionInternal::db_connect(QCString host, QCString user, -// QCString password, unsigned short int port, QString socket) +//bool MySqlConnectionInternal::db_connect(TQCString host, TQCString user, +// TQCString password, unsigned short int port, TQString socket) bool MySqlConnectionInternal::db_connect(const KexiDB::ConnectionData& data) { if (!(mysql = mysql_init(mysql))) return false; KexiDBDrvDbg << "MySqlConnectionInternal::connect()" << endl; - QCString localSocket; - QString hostName = data.hostName; + TQCString localSocket; + TQString hostName = data.hostName; if (hostName.isEmpty() || hostName.lower()=="localhost") { if (data.useLocalSocketFile) { if (data.localSocketFileName.isEmpty()) { //! @todo move the list of default sockets to a generic method - QStringList sockets; - #ifndef Q_WS_WIN + TQStringList sockets; + #ifndef TQ_WS_WIN sockets.append("/var/lib/mysql/mysql.sock"); sockets.append("/var/run/mysqld/mysqld.sock"); sockets.append("/tmp/mysql.sock"); - for(QStringList::ConstIterator it = sockets.constBegin(); it != sockets.constEnd(); it++) + for(TQStringList::ConstIterator it = sockets.constBegin(); it != sockets.constEnd(); it++) { - if(QFile(*it).exists()) { - localSocket = ((QString)(*it)).local8Bit(); + if(TQFile(*it).exists()) { + localSocket = ((TQString)(*it)).local8Bit(); break; } } #endif } else - localSocket = QFile::encodeName(data.localSocketFileName); + localSocket = TQFile::encodeName(data.localSocketFileName); } else { //we're not using local socket @@ -131,17 +131,17 @@ bool MySqlConnectionInternal::db_disconnect() /* ************************************************************************** */ /*! Selects dbName as the active database so it can be used. */ -bool MySqlConnectionInternal::useDatabase(const QString &dbName) { +bool MySqlConnectionInternal::useDatabase(const TQString &dbName) { //TODO is here escaping needed? return executeSQL("USE " + dbName); } /*! Executes the given SQL statement on the server. */ -bool MySqlConnectionInternal::executeSQL(const QString& statement) { +bool MySqlConnectionInternal::executeSQL(const TQString& statement) { // KexiDBDrvDbg << "MySqlConnectionInternal::executeSQL: " // << statement << endl; - QCString queryStr=statement.utf8(); + TQCString queryStr=statement.utf8(); const char *query=queryStr; if(mysql_real_query(mysql, query, strlen(query)) == 0) { @@ -153,8 +153,8 @@ bool MySqlConnectionInternal::executeSQL(const QString& statement) { return false; } -QString MySqlConnectionInternal::escapeIdentifier(const QString& str) const { - return QString(str).replace('`', "'"); +TQString MySqlConnectionInternal::escapeIdentifier(const TQString& str) const { + return TQString(str).tqreplace('`', "'"); } //-------------------------------------- -- cgit v1.2.3