diff options
Diffstat (limited to 'kexi/kexidb/drivers/mySQL/mysqlcursor.cpp')
-rw-r--r-- | kexi/kexidb/drivers/mySQL/mysqlcursor.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp b/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp index 7897fa97..abfdb44f 100644 --- a/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp +++ b/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp @@ -31,7 +31,7 @@ using namespace KexiDB; -MySqlCursor::MySqlCursor(KexiDB::Connection* conn, const QString& statement, uint cursor_options) +MySqlCursor::MySqlCursor(KexiDB::Connection* conn, const TQString& statement, uint cursor_options) : Cursor(conn,statement,cursor_options) , d( new MySqlCursorData(conn) ) { @@ -72,7 +72,7 @@ bool MySqlCursor::drv_open() { } } - setError(ERR_DB_SPECIFIC,QString::fromUtf8(mysql_error(d->mysql))); + setError(ERR_DB_SPECIFIC,TQString::fromUtf8(mysql_error(d->mysql))); return false; } @@ -106,9 +106,9 @@ void MySqlCursor::drv_getNextRecord() { } // This isn't going to work right now as it uses d->mysqlrow -QVariant MySqlCursor::value(uint pos) { +TQVariant MySqlCursor::value(uint pos) { if (!d->mysqlrow || pos>=m_fieldCount || d->mysqlrow[pos]==0) - return QVariant(); + return TQVariant(); KexiDB::Field *f = (m_fieldsExpanded && pos<m_fieldsExpanded->count()) ? m_fieldsExpanded->at(pos)->field : 0; @@ -119,20 +119,20 @@ QVariant MySqlCursor::value(uint pos) { /* moved to cstringToVariant() //from most to least frequently used types: if (!f || f->isTextType()) - return QVariant( QString::fromUtf8((const char*)d->mysqlrow[pos], d->lengths[pos]) ); + return TQVariant( TQString::fromUtf8((const char*)d->mysqlrow[pos], d->lengths[pos]) ); else if (f->isIntegerType()) //! @todo support BigInteger - return QVariant( QCString((const char*)d->mysqlrow[pos], d->lengths[pos]).toInt() ); + return TQVariant( TQCString((const char*)d->mysqlrow[pos], d->lengths[pos]).toInt() ); else if (f->isFPNumericType()) - return QVariant( QCString((const char*)d->mysqlrow[pos], d->lengths[pos]).toDouble() ); + return TQVariant( TQCString((const char*)d->mysqlrow[pos], d->lengths[pos]).toDouble() ); //default - return QVariant(QString::fromUtf8((const char*)d->mysqlrow[pos], d->lengths[pos]));*/ + return TQVariant(TQString::fromUtf8((const char*)d->mysqlrow[pos], d->lengths[pos]));*/ } /* As with sqlite, the DB library returns all values (including numbers) as - strings. So just put that string in a QVariant and let KexiDB deal with it. + strings. So just put that string in a TQVariant and let KexiDB deal with it. */ void MySqlCursor::storeCurrentRow(RowData &data) const { @@ -145,7 +145,7 @@ void MySqlCursor::storeCurrentRow(RowData &data) const data.resize(m_fieldCount); const uint fieldsExpandedCount = m_fieldsExpanded ? m_fieldsExpanded->count() : UINT_MAX; - const uint realCount = QMIN(fieldsExpandedCount, m_fieldCount); + const uint realCount = TQMIN(fieldsExpandedCount, m_fieldCount); for( uint i=0; i<realCount; i++) { Field *f = m_fieldsExpanded ? m_fieldsExpanded->at(i)->field : 0; if (m_fieldsExpanded && !f) @@ -153,7 +153,7 @@ void MySqlCursor::storeCurrentRow(RowData &data) const data[i] = KexiDB::cstringToVariant(d->mysqlrow[i], f, d->lengths[i]); /* moved to cstringToVariant() if (f && f->type()==Field::BLOB) { - QByteArray ba; + TQByteArray ba; ba.duplicate(d->mysqlrow[i], d->lengths[i]); data[i] = ba; KexiDBDbg << data[i].toByteArray().size() << endl; @@ -161,7 +161,7 @@ void MySqlCursor::storeCurrentRow(RowData &data) const //! @todo more types! //! @todo look at what type mysql declares! else { - data[i] = QVariant(QString::fromUtf8((const char*)d->mysqlrow[i], d->lengths[i])); + data[i] = TQVariant(TQString::fromUtf8((const char*)d->mysqlrow[i], d->lengths[i])); }*/ } } @@ -183,7 +183,7 @@ void MySqlCursor::drv_bufferMovePointerPrev() { } -void MySqlCursor::drv_bufferMovePointerTo(Q_LLONG to) { +void MySqlCursor::drv_bufferMovePointerTo(TQ_LLONG to) { //MYSQL_ROW_OFFSET ro=mysql_row_tell(d->mysqlres); mysql_data_seek(d->mysqlres, to); d->mysqlrow=mysql_fetch_row(d->mysqlres); @@ -200,9 +200,9 @@ int MySqlCursor::serverResult() return d->res; } -QString MySqlCursor::serverResultName() +TQString MySqlCursor::serverResultName() { - return QString::null; + return TQString(); } void MySqlCursor::drv_clearServerResult() @@ -212,7 +212,7 @@ void MySqlCursor::drv_clearServerResult() d->res = 0; } -QString MySqlCursor::serverErrorMsg() +TQString MySqlCursor::serverErrorMsg() { return d->errmsg; } |