diff options
Diffstat (limited to 'kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp')
-rw-r--r-- | kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp b/kword/mailmerge/sql/KWQtSqlPowerSerialDataSource.cpp index e7671e03..544f7990 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 <layout.h> +#include <tqlayout.h> #include <tqdom.h> #include <kcombobox.h> #include <klineedit.h> @@ -68,7 +68,7 @@ void KWQtSqlPowerSerialDataSource::refresh(bool force) myquery=new KWMySqlCursor(query,true,database); myquery->setMode(TQSqlCursor::ReadOnly); } - kdDebug()<<TQString("There were %1 rows in the query").arg(myquery->size())<<endl; + kdDebug()<<TQString("There were %1 rows in the query").tqarg(myquery->size())<<endl; } TQString KWQtSqlPowerSerialDataSource::getValue( const TQString &name, int record ) const @@ -79,33 +79,33 @@ TQString KWQtSqlPowerSerialDataSource::getValue( const TQString &name, int recor if ( num < 0 || num > (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()<<TQString("Fieldname count %1").arg(cur->count())<<endl; + kdDebug()<<TQString("Fieldname count %1").tqarg(cur->count())<<endl; for (uint i=0;i<cur->count();i++) db->addSampleRecordEntry(cur->fieldName(i)); |