summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp')
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp b/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp
index 9797ca96..50b94ae2 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 <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include <kdebug.h>
@@ -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('`', "'");
}
//--------------------------------------