summaryrefslogtreecommitdiffstats
path: root/kjsembed/bindings/sql_imp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/bindings/sql_imp.cpp')
-rw-r--r--kjsembed/bindings/sql_imp.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kjsembed/bindings/sql_imp.cpp b/kjsembed/bindings/sql_imp.cpp
index 31c7f53c..5fa9782f 100644
--- a/kjsembed/bindings/sql_imp.cpp
+++ b/kjsembed/bindings/sql_imp.cpp
@@ -20,9 +20,9 @@
*/
#include <kjsembed/global.h>
-#include <qsqldatabase.h>
-#include <qsqlquery.h>
-#include <qsqlerror.h>
+#include <tqsqldatabase.h>
+#include <tqsqlquery.h>
+#include <tqsqlerror.h>
#include "sql_imp.h"
@@ -30,44 +30,44 @@
namespace KJSEmbed {
namespace Bindings {
-SqlDatabase::SqlDatabase( QObject *parent, const char *name): BindingObject(parent, name)
+SqlDatabase::SqlDatabase( TQObject *parent, const char *name): BindingObject(parent, name)
{
connectionName = "defaultConnection";
setJSClassName( "SqlDatabase" );
}
SqlDatabase::~SqlDatabase()
{
- QSqlDatabase::removeDatabase(connectionName);
+ TQSqlDatabase::removeDatabase(connectionName);
}
-bool SqlDatabase::addDatabase ( const QString &type, const QString &conn )
+bool SqlDatabase::addDatabase ( const TQString &type, const TQString &conn )
{
connectionName = conn;
- QSqlDatabase *db = QSqlDatabase::addDatabase(type, connectionName);
+ TQSqlDatabase *db = TQSqlDatabase::addDatabase(type, connectionName);
if ( !db )
return false;
return true;
}
-QStringList SqlDatabase::drivers ()
+TQStringList SqlDatabase::drivers ()
{
- return QSqlDatabase::drivers();
+ return TQSqlDatabase::drivers();
}
bool SqlDatabase::open ( )
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->open();
return false;
}
-bool SqlDatabase::open ( const QString &user, const QString &password )
+bool SqlDatabase::open ( const TQString &user, const TQString &password )
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->open(user, password);
return false;
}
void SqlDatabase::close ()
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
{
db->close();
@@ -75,28 +75,28 @@ void SqlDatabase::close ()
}
bool SqlDatabase::isOpen ()
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->isOpen();
return false;
}
bool SqlDatabase::isOpenError ()
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->isOpenError();
return true;
}
-QStringList SqlDatabase::tables ()
+TQStringList SqlDatabase::tables ()
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->tables();
- return QStringList();
+ return TQStringList();
}
-SqlQuery *SqlDatabase::exec (const QString &query )
+SqlQuery *SqlDatabase::exec (const TQString &query )
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
{
kdDebug() <<" exec query " << query << endl;
@@ -108,9 +108,9 @@ SqlQuery *SqlDatabase::exec (const QString &query )
}
return 0L;
}
-QString SqlDatabase::lastError () const
+TQString SqlDatabase::lastError () const
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
{
return db->lastError().text();
@@ -119,105 +119,105 @@ QString SqlDatabase::lastError () const
}
bool SqlDatabase::transaction ()
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->transaction();
return false;
}
bool SqlDatabase::commit ()
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->commit();
return false;
}
bool SqlDatabase::rollback ()
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->rollback();
return false;
}
-void SqlDatabase::setDatabaseName (const QString &name )
+void SqlDatabase::setDatabaseName (const TQString &name )
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
db->setDatabaseName(name);
}
-void SqlDatabase::setUserName (const QString &name )
+void SqlDatabase::setUserName (const TQString &name )
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
db->setUserName(name);
}
-void SqlDatabase::setPassword (const QString &password )
+void SqlDatabase::setPassword (const TQString &password )
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
db->setPassword(password);
}
-void SqlDatabase::setHostName (const QString &host )
+void SqlDatabase::setHostName (const TQString &host )
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
db->setHostName(host);
}
void SqlDatabase::setPort ( int p )
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
db->setPort(p);
}
-QString SqlDatabase::databaseName () const
+TQString SqlDatabase::databaseName () const
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->databaseName();
return "";
}
-QString SqlDatabase::userName () const
+TQString SqlDatabase::userName () const
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->userName();
return "";
}
-QString SqlDatabase::password () const
+TQString SqlDatabase::password () const
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->password();
return "";
}
-QString SqlDatabase::hostName () const
+TQString SqlDatabase::hostName () const
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->hostName();
return "";
}
-QString SqlDatabase::driverName () const
+TQString SqlDatabase::driverName () const
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->driverName();
return "";
}
int SqlDatabase::port () const
{
- QSqlDatabase *db = QSqlDatabase::database(connectionName,false);
+ TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
if ( db )
return db->port();
return 0;
}
-SqlQuery::SqlQuery( QObject *parent, const char *name ): BindingObject(parent, name)
+SqlQuery::SqlQuery( TQObject *parent, const char *name ): BindingObject(parent, name)
{
kdDebug() << "New null SQL Query" << endl;
- m_query = QSqlQuery();
+ m_query = TQSqlQuery();
setJSClassName( "SqlQuery" );
}
-SqlQuery::SqlQuery( QObject *parent, const char *name, const QSqlQuery &q ): BindingObject(parent, name)
+SqlQuery::SqlQuery( TQObject *parent, const char *name, const TQSqlQuery &q ): BindingObject(parent, name)
{
kdDebug() << "New SQL Query with argument" << endl;
m_query = q;
@@ -252,7 +252,7 @@ int SqlQuery::at () const
{
return m_query.at();
}
-QString SqlQuery::lastQuery () const
+TQString SqlQuery::lastQuery () const
{
kdDebug() << "Last query error: " << m_query.lastQuery() << endl;
return m_query.lastQuery();
@@ -261,7 +261,7 @@ int SqlQuery::numRowsAffected () const
{
return m_query.numRowsAffected();
}
-QString SqlQuery::lastError () const
+TQString SqlQuery::lastError () const
{
return m_query.lastError().text();
}
@@ -273,11 +273,11 @@ int SqlQuery::size () const
{
return m_query.size();
}
-bool SqlQuery::exec ( const QString & query )
+bool SqlQuery::exec ( const TQString & query )
{
return m_query.exec( query );
}
-QVariant SqlQuery::value ( int i )
+TQVariant SqlQuery::value ( int i )
{
return m_query.value(i);
}