diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/kexidb/preparedstatement.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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/preparedstatement.cpp')
-rw-r--r-- | kexi/kexidb/preparedstatement.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kexi/kexidb/preparedstatement.cpp b/kexi/kexidb/preparedstatement.cpp index 24947dff..ce96f630 100644 --- a/kexi/kexidb/preparedstatement.cpp +++ b/kexi/kexidb/preparedstatement.cpp @@ -26,11 +26,11 @@ using namespace KexiDB; PreparedStatement::PreparedStatement(StatementType type, ConnectionInternal& conn, - FieldList& fields, const QStringList& where) + FieldList& fields, const TQStringList& where) : KShared() , m_type(type) , m_fields(&fields) - , m_where(where.isEmpty() ? new QStringList(where) : 0) + , m_where(where.isEmpty() ? new TQStringList(where) : 0) , m_whereFields(0) { Q_UNUSED(conn); @@ -42,9 +42,9 @@ PreparedStatement::~PreparedStatement() delete m_whereFields; } -QCString PreparedStatement::generateStatementString() +TQCString PreparedStatement::generateStatementString() { - QCString s(1024); + TQCString s(1024); if (m_type == SelectStatement) { //! @todo only tables and trivial queries supported for select... s = "SELECT "; @@ -62,7 +62,7 @@ QCString PreparedStatement::generateStatementString() // for (uint i=0; i<m_fields->fieldCount(); i++) { m_whereFields = new Field::List(); - for (QStringList::ConstIterator it=m_where->constBegin(); it!=m_where->constEnd(); ++it) { + for (TQStringList::ConstIterator it=m_where->constBegin(); it!=m_where->constEnd(); ++it) { // for (Field::ListIterator it(m_fields->fieldsIterator()); it.current(); ++it) { if (first) first = false; @@ -86,7 +86,7 @@ QCString PreparedStatement::generateStatementString() if (!table) return ""; //err - QCString namesList; + TQCString namesList; bool first = true; const bool allTableFieldsUsed = dynamic_cast<TableSchema*>(m_fields); //we are using a selection of fields only Field::ListIterator it = m_fields->fieldsIterator(); @@ -99,18 +99,18 @@ QCString PreparedStatement::generateStatementString() } else { s.append( ",?" ); if (!allTableFieldsUsed) - namesList.append(QCString(", ")+it.current()->name().latin1()); + namesList.append(TQCString(", ")+it.current()->name().latin1()); } } s.append(")"); - s.prepend(QCString("INSERT INTO ") + table->name().latin1() - + (allTableFieldsUsed ? QCString() : (" (" + namesList + ")")) + s.prepend(TQCString("INSERT INTO ") + table->name().latin1() + + (allTableFieldsUsed ? TQCString() : (" (" + namesList + ")")) + " VALUES ("); } return s; } -PreparedStatement& PreparedStatement::operator<< ( const QVariant& value ) +PreparedStatement& PreparedStatement::operator<< ( const TQVariant& value ) { m_args.append(value); return *this; |