summaryrefslogtreecommitdiffstats
path: root/kpilot/lib/idmapperxml.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kpilot/lib/idmapperxml.cc')
-rw-r--r--kpilot/lib/idmapperxml.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/kpilot/lib/idmapperxml.cc b/kpilot/lib/idmapperxml.cc
index a2a78a0c9..89fe51d91 100644
--- a/kpilot/lib/idmapperxml.cc
+++ b/kpilot/lib/idmapperxml.cc
@@ -27,7 +27,7 @@
#include "options.h"
-IDMapperXml::IDMapperXml( const QString &file ) : fFile(file)
+IDMapperXml::IDMapperXml( const TQString &file ) : fFile(file)
, fCurrentMapping( 0l )
{
}
@@ -42,7 +42,7 @@ bool IDMapperXml::open()
FUNCTIONSETUP;
root = doc.createElement( CSL1("mappings") );
- QDomNode node = doc.createProcessingInstruction(CSL1("xml")
+ TQDomNode node = doc.createProcessingInstruction(CSL1("xml")
,CSL1("version=\"1.0\" encoding=\"UTF-8\""));
doc.appendChild( node );
@@ -54,7 +54,7 @@ bool IDMapperXml::open()
if( fFile.open( IO_ReadWrite ) )
{
- QTextStream out( &fFile );
+ TQTextStream out( &fFile );
doc.save( out, 4 );
fFile.close();
return true;
@@ -68,7 +68,7 @@ bool IDMapperXml::open()
else
{
DEBUGKPILOT << fname << ": Parsing file " << fFile.name() << endl;
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setContentHandler( this );
// Make sure that the file is closed after parsing.
@@ -87,7 +87,7 @@ void IDMapperXml::save()
<< " mappings..." << endl;
DEBUGKPILOT << fname << ": ";
- QValueList<IDMapping>::const_iterator it;
+ TQValueList<IDMapping>::const_iterator it;
for ( it = fMappings.begin(); it != fMappings.end(); ++it )
{
DEBUGKPILOT << ".";
@@ -96,27 +96,27 @@ void IDMapperXml::save()
DEBUGKPILOT << fname << ": " << mapping.conduit();
- QDomElement mappingElement = doc.createElement( CSL1("mapping") );
+ TQDomElement mappingElement = doc.createElement( CSL1("mapping") );
mappingElement.setAttribute( CSL1("conduit"), mapping.conduit() );
if( !mapping.uid().isNull() )
{
- QDomElement uidElement = doc.createElement( CSL1("uid") );
+ TQDomElement uidElement = doc.createElement( CSL1("uid") );
uidElement.setAttribute( CSL1("value"), mapping.uid() );
mappingElement.appendChild( uidElement );
}
if( mapping.pid() != 0 )
{
- QDomElement uidElement = doc.createElement( CSL1("pid") );
+ TQDomElement uidElement = doc.createElement( CSL1("pid") );
uidElement.setAttribute( CSL1("value"), mapping.pid() );
mappingElement.appendChild( uidElement );
}
if( !mapping.lastSyncTime().isNull() )
{
- QDomElement uidElement = doc.createElement( CSL1("pid") );
- uidElement.setAttribute( CSL1("value"), QString::number( mapping.pid() ) );
+ TQDomElement uidElement = doc.createElement( CSL1("pid") );
+ uidElement.setAttribute( CSL1("value"), TQString::number( mapping.pid() ) );
mappingElement.appendChild( uidElement );
}
@@ -125,7 +125,7 @@ void IDMapperXml::save()
if( fFile.open( IO_ReadWrite ) )
{
- QTextStream out( &fFile );
+ TQTextStream out( &fFile );
doc.save( out, 4 );
fFile.close();
@@ -144,14 +144,14 @@ void IDMapperXml::addMapping( const IDMapping &mapping )
DEBUGKPILOT << fname << ": " << fMappings.first().conduit() << endl;
}
-QValueList<IDMapping>& IDMapperXml::mappings()
+TQValueList<IDMapping>& IDMapperXml::mappings()
{
return fMappings;
}
-bool IDMapperXml::startElement( const QString &namespaceURI
- , const QString &localName, const QString &qName
- , const QXmlAttributes &attribs )
+bool IDMapperXml::startElement( const TQString &namespaceURI
+ , const TQString &localName, const TQString &qName
+ , const TQXmlAttributes &attribs )
{
FUNCTIONSETUP;
Q_UNUSED(namespaceURI);
@@ -159,7 +159,7 @@ bool IDMapperXml::startElement( const QString &namespaceURI
if( qName == CSL1("mapping") )
{
- QString conduit( attribs.value( CSL1("conduit") ) );
+ TQString conduit( attribs.value( CSL1("conduit") ) );
fCurrentMapping = new IDMapping( conduit );
}
@@ -175,7 +175,7 @@ bool IDMapperXml::startElement( const QString &namespaceURI
{
// NOTE: this isn't very robuust!
// Parses only dates in the form: dd-mm-yyyy hh:mm:ss
- QString date = attribs.value( CSL1("value") );
+ TQString date = attribs.value( CSL1("value") );
int day = date.left(2).toInt();
int month = date.mid(3,2).toInt();
int year = date.mid(6, 4).toInt();
@@ -184,17 +184,17 @@ bool IDMapperXml::startElement( const QString &namespaceURI
int minute = date.mid(14,2).toInt();
int second = date.mid(17,2).toInt();
- QDate tmpDate = QDate( year, month, day );
- QTime tmpTime = QTime( hour, minute, second );
+ TQDate tmpDate = TQDate( year, month, day );
+ TQTime tmpTime = TQTime( hour, minute, second );
- fCurrentMapping->setLastSyncTime( QDateTime( tmpDate, tmpTime ) );
+ fCurrentMapping->setLastSyncTime( TQDateTime( tmpDate, tmpTime ) );
}
return true;
}
-bool IDMapperXml::endElement( const QString &namespaceURI
- , const QString &localName, const QString &qName )
+bool IDMapperXml::endElement( const TQString &namespaceURI
+ , const TQString &localName, const TQString &qName )
{
FUNCTIONSETUP;