summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/kexidb/drivers/mySQL/mysqlcursor.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/kexidb/drivers/mySQL/mysqlcursor.cpp')
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlcursor.cpp32
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;
}