From c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:56:31 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 94844816550ad672ccfcdc25659c625546239998. --- .../mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp') diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp index e7671e033..544f79904 100644 --- a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp +++ b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp @@ -20,7 +20,7 @@ #include "KWQtSqlPowerSerialDataSource.h" #include "KWQtSqlPowerSerialDataSource.moc" #include "KWQtSqlMailMergeOpen.h" -#include +#include #include #include #include @@ -68,7 +68,7 @@ void KWQtSqlPowerSerialDataSource::refresh(bool force) myquery=new KWMySqlCursor(query,true,database); myquery->setMode(TQSqlCursor::ReadOnly); } - kdDebug()<size())<size())< (int)myquery->size() ) return name; if (!myquery->seek(num,false)) return i18n(">>>Illegal position within datasource<<<"); - if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").arg(name); + if (!myquery->contains(name)) return i18n(">>>Field %1 is unknown in the current database query<<<").tqarg(name); return (myquery->value(name)).toString(); } void KWQtSqlPowerSerialDataSource::save( TQDomDocument &doc, TQDomElement &parent) { - TQDomElement def=doc.createElement(TQString::fromLatin1("DEFINITION")); + TQDomElement def=doc.createElement(TQString::tqfromLatin1("DEFINITION")); parent.appendChild(def); { - TQDomElement defEnt=doc.createElement(TQString::fromLatin1("DATABASE")); - defEnt.setAttribute(TQString::fromLatin1("hostname"),hostname); - defEnt.setAttribute(TQString::fromLatin1("port"),port); - defEnt.setAttribute(TQString::fromLatin1("driver"),driver); - defEnt.setAttribute(TQString::fromLatin1("databasename"),databasename); - defEnt.setAttribute(TQString::fromLatin1("username"),username); + TQDomElement defEnt=doc.createElement(TQString::tqfromLatin1("DATABASE")); + defEnt.setAttribute(TQString::tqfromLatin1("hostname"),hostname); + defEnt.setAttribute(TQString::tqfromLatin1("port"),port); + defEnt.setAttribute(TQString::tqfromLatin1("driver"),driver); + defEnt.setAttribute(TQString::tqfromLatin1("databasename"),databasename); + defEnt.setAttribute(TQString::tqfromLatin1("username"),username); def.appendChild(defEnt); - defEnt=doc.createElement(TQString::fromLatin1("QUERY")); - defEnt.setAttribute(TQString::fromLatin1("value"),query); + defEnt=doc.createElement(TQString::tqfromLatin1("QUERY")); + defEnt.setAttribute(TQString::tqfromLatin1("value"),query); def.appendChild(defEnt); - TQDomElement sampleEnt=doc.createElement(TQString::fromLatin1("SAMPLERECORD")); + TQDomElement sampleEnt=doc.createElement(TQString::tqfromLatin1("SAMPLERECORD")); parent.appendChild(sampleEnt); for (DbRecord::Iterator it=sampleRecord.begin();it!=sampleRecord.end();++it) { - TQDomElement fieldEnt=doc.createElement(TQString::fromLatin1("FIELD")); - fieldEnt.setAttribute(TQString::fromLatin1("name"),it.key()); + TQDomElement fieldEnt=doc.createElement(TQString::tqfromLatin1("FIELD")); + fieldEnt.setAttribute(TQString::tqfromLatin1("name"),it.key()); sampleEnt.appendChild(fieldEnt); } } @@ -122,19 +122,19 @@ void KWQtSqlPowerSerialDataSource::load( TQDomElement& parentElem ) if (!dbNd.isNull()) { TQDomElement dbEnt=dbNd.toElement(); - if (dbEnt.tagName()==TQString::fromLatin1("DATABASE")) + if (dbEnt.tagName()==TQString::tqfromLatin1("DATABASE")) { - hostname=dbEnt.attribute(TQString::fromLatin1("hostname")); - port=dbEnt.attribute(TQString::fromLatin1("port")); - driver=dbEnt.attribute(TQString::fromLatin1("driver")); - databasename=dbEnt.attribute(TQString::fromLatin1("databasename")); - username=dbEnt.attribute(TQString::fromLatin1("username")); + hostname=dbEnt.attribute(TQString::tqfromLatin1("hostname")); + port=dbEnt.attribute(TQString::tqfromLatin1("port")); + driver=dbEnt.attribute(TQString::tqfromLatin1("driver")); + databasename=dbEnt.attribute(TQString::tqfromLatin1("databasename")); + username=dbEnt.attribute(TQString::tqfromLatin1("username")); } } TQDomNode queryNd=def.namedItem("QUERY"); if (!queryNd.isNull()) { - query=queryNd.toElement().attribute(TQString::fromLatin1("value")); + query=queryNd.toElement().attribute(TQString::tqfromLatin1("value")); } } @@ -144,7 +144,7 @@ void KWQtSqlPowerSerialDataSource::load( TQDomElement& parentElem ) TQDomElement def1=defNd.toElement(); for (TQDomElement defEnt=defNd.firstChild().toElement();!defEnt.isNull();defEnt=defEnt.nextSibling().toElement()) { - addSampleRecordEntry(defEnt.attribute(TQString::fromLatin1("name"))); + addSampleRecordEntry(defEnt.attribute(TQString::tqfromLatin1("name"))); } } } @@ -203,7 +203,7 @@ void KWQtSqlPowerMailMergeEditor::slotExecute() cur->setMode(TQSqlCursor::ReadOnly); db->clearSampleRecord(); - kdDebug()<count())<count())<count();i++) db->addSampleRecordEntry(cur->fieldName(i)); -- cgit v1.2.3