summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/scripting/kexidb/kexidbconnection.cpp')
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnection.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
index d3b7cc76..f64a089f 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
@@ -94,20 +94,20 @@ KexiDBConnection::KexiDBConnection(::KexiDB::Connection* connection, KexiDBDrive
KexiDBConnection::~KexiDBConnection() {
}
-const QString KexiDBConnection::getClassName() const {
+const TQString KexiDBConnection::getClassName() const {
return "Kross::KexiDB::KexiDBConnection";
}
::KexiDB::Connection* KexiDBConnection::connection() const {
if(! m_connection)
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::Connection is NULL.")) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection is NULL.")) );
//if(m_connection->error())
- // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::Connection error: %1").arg(m_connection->errorMsg())) );
+ // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection error: %1").tqarg(m_connection->errorMsg())) );
return m_connection;
}
bool KexiDBConnection::hadError() const { return connection()->error(); }
-const QString KexiDBConnection::lastError() const { return connection()->errorMsg(); }
+const TQString KexiDBConnection::lastError() const { return connection()->errorMsg(); }
KexiDBConnectionData* KexiDBConnection::data() { return m_connectiondata.data(); }
KexiDBDriver* KexiDBConnection::driver() { return m_driver.data(); }
@@ -118,31 +118,31 @@ bool KexiDBConnection::disconnect() { return connection()->disconnect(); }
bool KexiDBConnection::isReadOnly() const { return connection()->isReadOnly(); }
-bool KexiDBConnection::databaseExists(const QString& dbname) { return connection()->databaseExists(dbname); }
-const QString KexiDBConnection::currentDatabase() const { return connection()->currentDatabase(); }
-const QStringList KexiDBConnection::databaseNames() const { return connection()->databaseNames(); }
+bool KexiDBConnection::databaseExists(const TQString& dbname) { return connection()->databaseExists(dbname); }
+const TQString KexiDBConnection::currentDatabase() const { return connection()->currentDatabase(); }
+const TQStringList KexiDBConnection::databaseNames() const { return connection()->databaseNames(); }
bool KexiDBConnection::isDatabaseUsed() const { return connection()->isDatabaseUsed(); }
-bool KexiDBConnection::useDatabase(const QString& dbname) { return connection()->databaseExists(dbname) && m_connection->useDatabase(dbname); }
+bool KexiDBConnection::useDatabase(const TQString& dbname) { return connection()->databaseExists(dbname) && m_connection->useDatabase(dbname); }
bool KexiDBConnection::closeDatabase() { return connection()->closeDatabase(); }
-const QStringList KexiDBConnection::allTableNames() const { return connection()->tableNames(true); }
-const QStringList KexiDBConnection::tableNames() const { return connection()->tableNames(false); }
+const TQStringList KexiDBConnection::allTableNames() const { return connection()->tableNames(true); }
+const TQStringList KexiDBConnection::tableNames() const { return connection()->tableNames(false); }
-const QStringList KexiDBConnection::queryNames() const {
+const TQStringList KexiDBConnection::queryNames() const {
bool ok = true;
- QStringList queries = connection()->objectNames(::KexiDB::QueryObjectType, &ok);
- if(! ok) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Failed to determinate querynames.")) );
+ TQStringList queries = connection()->objectNames(::KexiDB::QueryObjectType, &ok);
+ if(! ok) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to determinate querynames.")) );
return queries;
}
-KexiDBCursor* KexiDBConnection::executeQueryString(const QString& sqlquery) {
+KexiDBCursor* KexiDBConnection::executeQueryString(const TQString& sqlquery) {
// The ::KexiDB::Connection::executeQuery() method does not check if we pass a valid SELECT-statement
// or e.g. a DROP TABLE operation. So, let's check for such dangerous operations right now.
::KexiDB::Parser parser( connection() );
if(! parser.parse(sqlquery))
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Failed to parse query: %1 %2").arg(parser.error().type()).arg(parser.error().error())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to parse query: %1 %2").tqarg(parser.error().type()).tqarg(parser.error().error())) );
if( parser.query() == 0 || parser.operation() != ::KexiDB::Parser::OP_Select )
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Invalid query operation \"%1\"").arg(parser.operationString()) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid query operation \"%1\"").tqarg(parser.operationString()) ) );
::KexiDB::Cursor* cursor = connection()->executeQuery(sqlquery);
return cursor ? new KexiDBCursor(cursor) : 0;
}
@@ -153,39 +153,39 @@ KexiDBCursor* KexiDBConnection::executeQuerySchema(KexiDBQuerySchema* queryschem
}
/*TODO
-bool KexiDBConnection::insertRecordIntoFieldlist(KexiDBFieldList* fieldlist, QValueList<QVariant> values) {
+bool KexiDBConnection::insertRecordIntoFieldlist(KexiDBFieldList* fieldlist, TQValueList<TQVariant> values) {
return connection()->insertRecord(*fieldlist->fieldlist(), values);
}
-bool KexiDBConnection::insertRecordIntoTable(KexiDBTableSchema* tableschema, QValueList<QVariant> values) {
+bool KexiDBConnection::insertRecordIntoTable(KexiDBTableSchema* tableschema, TQValueList<TQVariant> values) {
return connection()->insertRecord(*tableschema->tableschema(), values);
}
*/
Kross::Api::Object::Ptr KexiDBConnection::insertRecord(Kross::Api::List::Ptr args) {
- QValueList<QVariant> values = Kross::Api::Variant::toList(args->item(1));
+ TQValueList<TQVariant> values = Kross::Api::Variant::toList(args->item(1));
Kross::Api::Object::Ptr obj = args->item(0);
if(obj->getClassName() == "Kross::KexiDB::KexiDBFieldList")
return new Kross::Api::Variant(
- QVariant(connection()->insertRecord(
+ TQVariant(connection()->insertRecord(
*Kross::Api::Object::fromObject<KexiDBFieldList>(obj)->fieldlist(),
values
), 0));
return new Kross::Api::Variant(
- QVariant(connection()->insertRecord(
+ TQVariant(connection()->insertRecord(
*Kross::Api::Object::fromObject<KexiDBTableSchema>(obj)->tableschema(),
values
), 0));
}
-bool KexiDBConnection::createDatabase(const QString& dbname) { return connection()->createDatabase(dbname); }
-bool KexiDBConnection::dropDatabase(const QString& dbname) { return connection()->dropDatabase(dbname); }
+bool KexiDBConnection::createDatabase(const TQString& dbname) { return connection()->createDatabase(dbname); }
+bool KexiDBConnection::dropDatabase(const TQString& dbname) { return connection()->dropDatabase(dbname); }
bool KexiDBConnection::createTable(KexiDBTableSchema* tableschema) { return connection()->createTable(tableschema->tableschema(), false); }
-bool KexiDBConnection::dropTable(const QString& tablename) { return true == connection()->dropTable(tablename); }
+bool KexiDBConnection::dropTable(const TQString& tablename) { return true == connection()->dropTable(tablename); }
bool KexiDBConnection::alterTable(KexiDBTableSchema* fromschema, KexiDBTableSchema* toschema) { return true == connection()->alterTable(*fromschema->tableschema(), *toschema->tableschema()); }
-bool KexiDBConnection::alterTableName(KexiDBTableSchema* tableschema, const QString& newtablename) { return connection()->alterTableName(*tableschema->tableschema(), newtablename); }
+bool KexiDBConnection::alterTableName(KexiDBTableSchema* tableschema, const TQString& newtablename) { return connection()->alterTableName(*tableschema->tableschema(), newtablename); }
-KexiDBTableSchema* KexiDBConnection::tableSchema(const QString& tablename) const {
+KexiDBTableSchema* KexiDBConnection::tableSchema(const TQString& tablename) const {
::KexiDB::TableSchema* tableschema = connection()->tableSchema(tablename);
return tableschema ? new KexiDBTableSchema(tableschema) : 0;
}
@@ -196,7 +196,7 @@ bool KexiDBConnection::isEmptyTable(KexiDBTableSchema* tableschema) const {
return (! (success && notempty));
}
-KexiDBQuerySchema* KexiDBConnection::querySchema(const QString& queryname) const {
+KexiDBQuerySchema* KexiDBConnection::querySchema(const TQString& queryname) const {
::KexiDB::QuerySchema* queryschema = connection()->querySchema(queryname);
return queryschema ? new KexiDBQuerySchema(queryschema) : 0;
}