summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexidb/utils.h')
-rw-r--r--kexi/kexidb/utils.h192
1 files changed, 96 insertions, 96 deletions
diff --git a/kexi/kexidb/utils.h b/kexi/kexidb/utils.h
index a455f5b8e..fff7a0719 100644
--- a/kexi/kexidb/utils.h
+++ b/kexi/kexidb/utils.h
@@ -21,51 +21,51 @@
#ifndef KEXIDB_UTILS_H
#define KEXIDB_UTILS_H
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
#include <kexidb/connection.h>
#include <kexidb/driver.h>
-class QDomNode;
-class QDomElement;
-class QDomDocument;
+class TQDomNode;
+class TQDomElement;
+class TQDomDocument;
namespace KexiDB
{
//! for convenience
inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, TableSchema *table,
- const QString &keyname, const QString &keyval)
+ const TQString &keyname, const TQString &keyval)
{
return table!=0 && conn.executeSQL("DELETE FROM " + table->name() + " WHERE "
- + keyname + "=" + conn.driver()->valueToSQL( Field::Text, QVariant(keyval) ));
+ + keyname + "=" + conn.driver()->valueToSQL( Field::Text, TQVariant(keyval) ));
}
- inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const QString &tableName,
- const QString &keyname, const QString &keyval)
+ inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const TQString &tableName,
+ const TQString &keyname, const TQString &keyval)
{
return conn.executeSQL("DELETE FROM " + tableName + " WHERE "
- + keyname + "=" + conn.driver()->valueToSQL( Field::Text, QVariant(keyval) ));
+ + keyname + "=" + conn.driver()->valueToSQL( Field::Text, TQVariant(keyval) ));
}
inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, TableSchema *table,
- const QString &keyname, int keyval)
+ const TQString &keyname, int keyval)
{
return table!=0 && conn.executeSQL("DELETE FROM " + table->name() + " WHERE "
- + keyname + "=" + conn.driver()->valueToSQL( Field::Integer, QVariant(keyval) ));
+ + keyname + "=" + conn.driver()->valueToSQL( Field::Integer, TQVariant(keyval) ));
}
- inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const QString &tableName,
- const QString &keyname, int keyval)
+ inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const TQString &tableName,
+ const TQString &keyname, int keyval)
{
return conn.executeSQL("DELETE FROM " + tableName + " WHERE "
- + keyname + "=" + conn.driver()->valueToSQL( Field::Integer, QVariant(keyval) ));
+ + keyname + "=" + conn.driver()->valueToSQL( Field::Integer, TQVariant(keyval) ));
}
/*! Delete row with two generic criterias. */
- inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const QString &tableName,
- const QString &keyname1, Field::Type keytype1, const QVariant& keyval1,
- const QString &keyname2, Field::Type keytype2, const QVariant& keyval2)
+ inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const TQString &tableName,
+ const TQString &keyname1, Field::Type keytype1, const TQVariant& keyval1,
+ const TQString &keyname2, Field::Type keytype2, const TQVariant& keyval2)
{
return conn.executeSQL("DELETE FROM " + tableName + " WHERE "
+ keyname1 + "=" + conn.driver()->valueToSQL( keytype1, keyval1 )
@@ -73,26 +73,26 @@ namespace KexiDB
}
inline KEXI_DB_EXPORT bool replaceRow(Connection &conn, TableSchema *table,
- const QString &keyname, const QString &keyval, const QString &valname, QVariant val, int ftype)
+ const TQString &keyname, const TQString &keyval, const TQString &valname, TQVariant val, int ftype)
{
if (!table || !KexiDB::deleteRow(conn, table, keyname, keyval))
return false;
return conn.executeSQL("INSERT INTO " + table->name()
+ " (" + keyname + "," + valname + ") VALUES ("
- + conn.driver()->valueToSQL( Field::Text, QVariant(keyval) ) + ","
+ + conn.driver()->valueToSQL( Field::Text, TQVariant(keyval) ) + ","
+ conn.driver()->valueToSQL( ftype, val) + ")");
}
- typedef QValueList<uint> TypeGroupList;
+ typedef TQValueList<uint> TypeGroupList;
/*! \return list of types for type group \a typeGroup. */
KEXI_DB_EXPORT const TypeGroupList typesForGroup(Field::TypeGroup typeGroup);
/*! \return list of i18n'd type names for type group \a typeGroup. */
- KEXI_DB_EXPORT QStringList typeNamesForGroup(Field::TypeGroup typeGroup);
+ KEXI_DB_EXPORT TQStringList typeNamesForGroup(Field::TypeGroup typeGroup);
/*! \return list of (not-i18n'd) type names for type group \a typeGroup. */
- KEXI_DB_EXPORT QStringList typeStringsForGroup(Field::TypeGroup typeGroup);
+ KEXI_DB_EXPORT TQStringList typeStringsForGroup(Field::TypeGroup typeGroup);
/*! \return default field type for type group \a typeGroup,
for example, Field::Integer for Field::IntegerGroup.
@@ -105,11 +105,11 @@ namespace KexiDB
For numbers (either floating-point or integer) it returns i18n'd "Number: string.
For other types it the same string as Field::typeGroupName() is returned. */
//! @todo support names of other BLOB subtypes
- KEXI_DB_EXPORT QString simplifiedTypeName(const Field& field);
+ KEXI_DB_EXPORT TQString simplifiedTypeName(const Field& field);
/*! \return true if \a v represents an empty (but not null) value.
Values of some types (as for strings) can be both empty and not null. */
- inline bool isEmptyValue(Field *f, const QVariant &v) {
+ inline bool isEmptyValue(Field *f, const TQVariant &v) {
if (f->hasEmptyProperty() && v.toString().isEmpty() && !v.toString().isNull())
return true;
return v.isNull();
@@ -121,11 +121,11 @@ namespace KexiDB
\a msg and \a details strings are not overwritten.
If \a msg is not empty, \a obj's error message is appended to \a details.
*/
- KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, QString& msg, QString &details);
+ KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details);
/*! This methods works like above, but appends both a message and a description
to \a msg. */
- KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, QString& msg);
+ KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, TQString& msg);
/*! This methods works like above, but works on \a result's members instead. */
KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, ResultInfo *result);
@@ -134,8 +134,8 @@ namespace KexiDB
Constructs an sql string like "fielname = value" for specific \a drv driver,
field type \a t, \a fieldName and \a value. If \a value is null, "fieldname is NULL"
string is returned. */
- inline KEXI_DB_EXPORT QString sqlWhere(Driver *drv, Field::Type t,
- const QString fieldName, const QVariant value)
+ inline KEXI_DB_EXPORT TQString sqlWhere(Driver *drv, Field::Type t,
+ const TQString fieldName, const TQVariant value)
{
if (value.isNull())
return fieldName + " is NULL";
@@ -144,7 +144,7 @@ namespace KexiDB
/*! \return identifier for object \a objName of type \a objType
or 0 if such object does not exist. */
- KEXI_DB_EXPORT int idForObjectName( Connection &conn, const QString& objName, int objType );
+ KEXI_DB_EXPORT int idForObjectName( Connection &conn, const TQString& objName, int objType );
/*! Variant class providing a pointer to table or query. */
class KEXI_DB_EXPORT TableOrQuerySchema {
@@ -154,14 +154,14 @@ namespace KexiDB
table has priority over query.
You should check whether a query or table has been found by testing
(query() || table()) expression. */
- TableOrQuerySchema(Connection *conn, const QCString& name);
+ TableOrQuerySchema(Connection *conn, const TQCString& name);
/*! Creates a new TableOrQuerySchema variant object, retrieving table or query schema
using \a conn connection and \a name. If \a table is true, \a name is assumed
to be a table name, otherwise \a name is assumed to be a query name.
You should check whether a query or table has been found by testing
(query() || table()) expression. */
- TableOrQuerySchema(Connection *conn, const QCString& name, bool table);
+ TableOrQuerySchema(Connection *conn, const TQCString& name, bool table);
/*! Creates a new TableOrQuerySchema variant object. \a tableOrQuery must be of
class TableSchema or QuerySchema.
@@ -190,10 +190,10 @@ namespace KexiDB
TableSchema* table() const { return m_table; }
//! \return name of a query or table
- QCString name() const;
+ TQCString name() const;
//! \return caption (if present) or name of the table/query
- QString captionOrName() const;
+ TQString captionOrName() const;
//! \return number of fields
uint fieldCount() const;
@@ -203,37 +203,37 @@ namespace KexiDB
/*! \return a field of the table or the query schema for name \a name
or 0 if there is no such field. */
- Field* field(const QString& name);
+ Field* field(const TQString& name);
- /*! Like Field* field(const QString& name);
+ /*! Like Field* field(const TQString& name);
but returns all information associated with field/column \a name. */
- QueryColumnInfo* columnInfo(const QString& name);
+ QueryColumnInfo* columnInfo(const TQString& name);
/*! \return connection object, for table or query or 0 if there's no table or query defined. */
Connection* connection() const;
/*! \return String for debugging purposes. */
- QString debugString();
+ TQString debugString();
/*! Shows debug information about table or query. */
void debug();
protected:
- QCString m_name; //!< the name is kept here because m_table and m_table can be 0
+ TQCString m_name; //!< the name is kept here because m_table and m_table can be 0
//! and we still want name() and acptionOrName() work.
TableSchema* m_table;
QuerySchema* m_query;
};
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! \return number of rows that can be retrieved after executing \a sql statement
within a connection \a conn. The statement should be of type SELECT.
For SQL data sources it does not fetch any records, only "COUNT(*)"
SQL aggregation is used at the backed.
-1 is returned if error occured. */
- int rowCount(Connection &conn, const QString& sql);
+ int rowCount(Connection &conn, const TQString& sql);
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! \return number of rows that can be retrieved from \a tableSchema.
The table must be created or retrieved using a Connection object,
i.e. tableSchema.connection() must not return 0.
@@ -242,11 +242,11 @@ namespace KexiDB
-1 is returned if error occurred. */
KEXI_DB_EXPORT int rowCount(const TableSchema& tableSchema);
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! Like above but operates on a query schema. */
KEXI_DB_EXPORT int rowCount(QuerySchema& querySchema);
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! Like above but operates on a table or query schema variant. */
KEXI_DB_EXPORT int rowCount(TableOrQuerySchema& tableOrQuery);
@@ -259,14 +259,14 @@ namespace KexiDB
(within a second thread).
\a data is used to perform a (temporary) test connection. \a msgHandler is used to display errors.
On successful connecting, a message is displayed. After testing, temporary connection is closed. */
- KEXI_DB_EXPORT void connectionTestDialog(QWidget* parent, const ConnectionData& data,
+ KEXI_DB_EXPORT void connectionTestDialog(TQWidget* tqparent, const ConnectionData& data,
MessageHandler& msgHandler);
/*! Saves connection data \a data into \a map. */
- KEXI_DB_EXPORT QMap<QString,QString> toMap( const ConnectionData& data );
+ KEXI_DB_EXPORT TQMap<TQString,TQString> toMap( const ConnectionData& data );
/*! Restores connection data \a data from \a map. */
- KEXI_DB_EXPORT void fromMap( const QMap<QString,QString>& map, ConnectionData& data );
+ KEXI_DB_EXPORT void fromMap( const TQMap<TQString,TQString>& map, ConnectionData& data );
//! Used in splitToTableAndFieldParts().
enum SplitToTableAndFieldPartsOptions {
@@ -284,13 +284,13 @@ namespace KexiDB
or field name could become empty what is not allowed).
If \a option is SetFieldNameIfNoTableName and \a string does not contain '.',
- \a string is passed to \a fieldName and \a tableName is set to QString::null
+ \a string is passed to \a fieldName and \a tableName is set to TQString()
without failure.
If function fails, \a tableName and \a fieldName remain unchanged.
\return true on success. */
- KEXI_DB_EXPORT bool splitToTableAndFieldParts(const QString& string,
- QString& tableName, QString& fieldName,
+ KEXI_DB_EXPORT bool splitToTableAndFieldParts(const TQString& string,
+ TQString& tableName, TQString& fieldName,
SplitToTableAndFieldPartsOptions option = FailIfNoTableOrFieldName);
/*! \return true if \a type supports "visibleDecimalPlaces" property. */
@@ -307,17 +307,17 @@ namespace KexiDB
KLocale::formatNumber() and KLocale::decimalSymbol() are used to get locale settings.
@see KexiDB::Field::visibleDecimalPlaces() */
- KEXI_DB_EXPORT QString formatNumberForVisibleDecimalPlaces(double value, int decimalPlaces);
+ KEXI_DB_EXPORT TQString formatNumberForVisibleDecimalPlaces(double value, int decimalPlaces);
//! \return true if \a propertyName is a builtin field property.
- KEXI_DB_EXPORT bool isBuiltinTableFieldProperty( const QCString& propertyName );
+ KEXI_DB_EXPORT bool isBuiltinTableFieldProperty( const TQCString& propertyName );
//! \return true if \a propertyName is an extended field property.
- KEXI_DB_EXPORT bool isExtendedTableFieldProperty( const QCString& propertyName );
+ KEXI_DB_EXPORT bool isExtendedTableFieldProperty( const TQCString& propertyName );
/*! \return type of field for integer value \a type.
If \a type cannot be casted to KexiDB::Field::Type, KexiDB::Field::InvalidType is returned.
- This can be used when type information is deserialized from a string or QVariant. */
+ This can be used when type information is deserialized from a string or TQVariant. */
KEXI_DB_EXPORT Field::Type intToFieldType( int type );
/*! Sets property values for \a field. \return true if all the values are valid and allowed.
@@ -325,65 +325,65 @@ namespace KexiDB
Properties coming from extended schema are also supported.
This function is used e.g. by AlterTableHandler when property information comes in form of text.
*/
- KEXI_DB_EXPORT bool setFieldProperties( Field& field, const QMap<QCString, QVariant>& values );
+ KEXI_DB_EXPORT bool setFieldProperties( Field& field, const TQMap<TQCString, TQVariant>& values );
/*! Sets property value for \a field. \return true if the property has been found and
the value is valid for this property. On failure contents of \a field is undefined.
Properties coming from extended schema are also supported as well as
- QVariant customProperty(const QString& propertyName) const;
+ TQVariant customProperty(const TQString& propertyName) const;
This function is used e.g. by AlterTableHandler when property information comes in form of text.
*/
- KEXI_DB_EXPORT bool setFieldProperty(Field& field, const QCString& propertyName,
- const QVariant& value);
+ KEXI_DB_EXPORT bool setFieldProperty(Field& field, const TQCString& propertyName,
+ const TQVariant& value);
- /*! @return property value loaded from a DOM \a node, written in a QtDesigner-like
+ /*! @return property value loaded from a DOM \a node, written in a TQtDesigner-like
notation: &lt;number&gt;int&lt;/number&gt; or &lt;bool&gt;bool&lt;/bool&gt;, etc. Supported types are
- "string", "cstring", "bool", "number". For invalid values null QVariant is returned.
- You can check the validity of the returned value using QVariant::type(). */
- KEXI_DB_EXPORT QVariant loadPropertyValueFromDom( const QDomNode& node );
+ "string", "cstring", "bool", "number". For invalid values null TQVariant is returned.
+ You can check the validity of the returned value using TQVariant::type(). */
+ KEXI_DB_EXPORT TQVariant loadPropertyValueFromDom( const TQDomNode& node );
/*! Convenience version of loadPropertyValueFromDom(). \return int value. */
- KEXI_DB_EXPORT int loadIntPropertyValueFromDom( const QDomNode& node, bool* ok );
+ KEXI_DB_EXPORT int loadIntPropertyValueFromDom( const TQDomNode& node, bool* ok );
- /*! Convenience version of loadPropertyValueFromDom(). \return QString value. */
- KEXI_DB_EXPORT QString loadStringPropertyValueFromDom( const QDomNode& node, bool* ok );
+ /*! Convenience version of loadPropertyValueFromDom(). \return TQString value. */
+ KEXI_DB_EXPORT TQString loadStringPropertyValueFromDom( const TQDomNode& node, bool* ok );
- /*! Saves integer element for value \a value to \a doc document within parent element
- \a parentEl. The value will be enclosed in "number" element and "elementName" element.
- Example: saveNumberElementToDom(doc, parentEl, "height", 15) will create
+ /*! Saves integer element for value \a value to \a doc document within tqparent element
+ \a tqparentEl. The value will be enclosed in "number" element and "elementName" element.
+ Example: saveNumberElementToDom(doc, tqparentEl, "height", 15) will create
\code
<height><number>15</number></height>
\endcode
\return the reference to element created with tag elementName. */
- KEXI_DB_EXPORT QDomElement saveNumberElementToDom(QDomDocument& doc, QDomElement& parentEl,
- const QString& elementName, int value);
+ KEXI_DB_EXPORT TQDomElement saveNumberElementToDom(TQDomDocument& doc, TQDomElement& tqparentEl,
+ const TQString& elementName, int value);
- /*! Saves boolean element for value \a value to \a doc document within parent element
- \a parentEl. Like saveNumberElementToDom() but creates "bool" tags. True/false values will be
+ /*! Saves boolean element for value \a value to \a doc document within tqparent element
+ \a tqparentEl. Like saveNumberElementToDom() but creates "bool" tags. True/false values will be
saved as "true"/"false" strings.
\return the reference to element created with tag elementName. */
- KEXI_DB_EXPORT QDomElement saveBooleanElementToDom(QDomDocument& doc, QDomElement& parentEl,
- const QString& elementName, bool value);
+ KEXI_DB_EXPORT TQDomElement saveBooleanElementToDom(TQDomDocument& doc, TQDomElement& tqparentEl,
+ const TQString& elementName, bool value);
/*! \return an empty value that can be set for a database field of type \a type having
"null" property set. Empty string is returned for text type, 0 for integer
or floating-point types, false for boolean type, empty null byte array for BLOB type.
For date, time and date/time types current date, time, date+time is returned, respectively.
- Returns null QVariant for unsupported values like KexiDB::Field::InvalidType.
+ Returns null TQVariant for unsupported values like KexiDB::Field::InvalidType.
This function is efficient (uses a cache) and is heavily used by the AlterTableHandler
for filling new columns. */
- KEXI_DB_EXPORT QVariant emptyValueForType( Field::Type type );
+ KEXI_DB_EXPORT TQVariant emptyValueForType( Field::Type type );
/*! \return a value that can be set for a database field of type \a type having
"notEmpty" property set. It works in a similar way as
- @ref QVariant emptyValueForType( KexiDB::Field::Type type ) with the following differences:
+ @ref TQVariant emptyValueForType( KexiDB::Field::Type type ) with the following differences:
- " " string (a single space) is returned for Text and LongText types
- a byte array with saved "filenew" PNG image (icon) for BLOB type
- Returns null QVariant for unsupported values like KexiDB::Field::InvalidType.
+ Returns null TQVariant for unsupported values like KexiDB::Field::InvalidType.
This function is efficient (uses a cache) and is heavily used by the AlterTableHandler
for filling new columns. */
- KEXI_DB_EXPORT QVariant notEmptyValueForType( Field::Type type );
+ KEXI_DB_EXPORT TQVariant notEmptyValueForType( Field::Type type );
//! Escaping types used in escapeBLOB().
enum BLOBEscapingType {
@@ -397,30 +397,30 @@ namespace KexiDB
//! @todo reverse function for BLOBEscapeOctal is available: processBinaryData() in pqxxcursor.cpp - move it here
/*! \return a string containing escaped, printable representation of \a array.
- Escaping is controlled by \a type. For empty array QString::null is returned,
+ Escaping is controlled by \a type. For empty array TQString() is returned,
so if you want to use this function in an SQL statement, empty arrays should be
detected and "NULL" string should be put instead.
This is helper, used in Driver::escapeBLOB() and KexiDB::variantToString(). */
- KEXI_DB_EXPORT QString escapeBLOB(const QByteArray& array, BLOBEscapingType type);
+ KEXI_DB_EXPORT TQString escapeBLOB(const TQByteArray& array, BLOBEscapingType type);
/*! \return byte array converted from \a data of length \a length.
\a data is escaped in format used by PostgreSQL's bytea datatype
described at http://www.postgresql.org/docs/8.1/interactive/datatype-binary.html
This function is used by PostgreSQL KexiDB and migration drivers. */
- KEXI_DB_EXPORT QByteArray pgsqlByteaToByteArray(const char* data, int length);
+ KEXI_DB_EXPORT TQByteArray pgsqlByteaToByteArray(const char* data, int length);
/*! \return string value serialized from a variant value \a v.
- This functions works like QVariant::toString() except the case when \a v is of type ByteArray.
+ This functions works like TQVariant::toString() except the case when \a v is of type ByteArray.
In this case KexiDB::escapeBLOB(v.toByteArray(), KexiDB::BLOBEscapeHex) is used.
This function is needed for handling values of random type, for example "defaultValue"
property of table fields can contain value of any type.
Note: the returned string is an unescaped string. */
- KEXI_DB_EXPORT QString variantToString( const QVariant& v );
+ KEXI_DB_EXPORT TQString variantToString( const TQVariant& v );
/*! \return variant value of type \a type for a string \a s that was previously serialized using
- \ref variantToString( const QVariant& v ) function.
+ \ref variantToString( const TQVariant& v ) function.
\a ok is set to the result of the operation. */
- KEXI_DB_EXPORT QVariant stringToVariant( const QString& s, QVariant::Type type, bool &ok );
+ KEXI_DB_EXPORT TQVariant stringToVariant( const TQString& s, TQVariant::Type type, bool &ok );
/*! \return true if setting default value for \a field field is allowed. Fields with unique
(and thus primary key) flags set do not accept default values.
@@ -442,33 +442,33 @@ namespace KexiDB
If one of the types is not of the integer group, Field::InvalidType is returned. */
KEXI_DB_EXPORT Field::Type maximumForIntegerTypes(Field::Type t1, Field::Type t2);
- /*! \return QVariant value converted from null-terminated \a data string.
+ /*! \return TQVariant value converted from null-terminated \a data string.
In case of BLOB type, \a data is not nul lterminated, so passing length is needed. */
- inline QVariant cstringToVariant(const char* data, KexiDB::Field* f, int length = -1)
+ inline TQVariant cstringToVariant(const char* data, KexiDB::Field* f, int length = -1)
{
if (!data)
- return QVariant();
+ return TQVariant();
// from mo st to least frequently used types:
if (!f || f->isTextType())
- return QString::fromUtf8(data, length);
+ return TQString::fromUtf8(data, length);
if (f->isIntegerType()) {
if (f->type()==KexiDB::Field::BigInteger)
- return QVariant( QString::fromLatin1(data, length).toLongLong() );
- return QVariant( QString::fromLatin1(data, length).toInt() );
+ return TQVariant( TQString::tqfromLatin1(data, length).toLongLong() );
+ return TQVariant( TQString::tqfromLatin1(data, length).toInt() );
}
if (f->isFPNumericType())
- return QString::fromLatin1(data, length).toDouble();
+ return TQString::tqfromLatin1(data, length).toDouble();
if (f->type()==KexiDB::Field::BLOB) {
- QByteArray ba;
+ TQByteArray ba;
ba.duplicate(data, length);
return ba;
}
// the default
//! @todo date/time?
- QVariant result(QString::fromUtf8(data, length));
+ TQVariant result(TQString::fromUtf8(data, length));
if (!result.cast( KexiDB::Field::variantType(f->type()) ))
- return QVariant();
+ return TQVariant();
return result;
}
}