summaryrefslogtreecommitdiffstats
path: root/kpilot/lib
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kpilot/lib
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpilot/lib')
-rw-r--r--kpilot/lib/actionQueue.cc24
-rw-r--r--kpilot/lib/actionQueue.h6
-rw-r--r--kpilot/lib/actions.cc10
-rw-r--r--kpilot/lib/actions.h4
-rw-r--r--kpilot/lib/idmapper.cc58
-rw-r--r--kpilot/lib/idmapper.h44
-rw-r--r--kpilot/lib/idmapperxml.cc44
-rw-r--r--kpilot/lib/idmapperxml.h28
-rw-r--r--kpilot/lib/idmapping.cc12
-rw-r--r--kpilot/lib/idmapping.h22
-rw-r--r--kpilot/lib/kpilotdevicelink.cc120
-rw-r--r--kpilot/lib/kpilotdevicelink.h30
-rw-r--r--kpilot/lib/kpilotdevicelinkPrivate.h34
-rw-r--r--kpilot/lib/kpilotlink.cc34
-rw-r--r--kpilot/lib/kpilotlink.h44
-rw-r--r--kpilot/lib/kpilotlocallink.cc60
-rw-r--r--kpilot/lib/kpilotlocallink.h18
-rw-r--r--kpilot/lib/options.cc20
-rw-r--r--kpilot/lib/options.h24
-rw-r--r--kpilot/lib/pilot.cc48
-rw-r--r--kpilot/lib/pilot.h48
-rw-r--r--kpilot/lib/pilotAddress.cc56
-rw-r--r--kpilot/lib/pilotAddress.h28
-rw-r--r--kpilot/lib/pilotAppInfo.cc2
-rw-r--r--kpilot/lib/pilotAppInfo.h10
-rw-r--r--kpilot/lib/pilotDatabase.cc8
-rw-r--r--kpilot/lib/pilotDatabase.h10
-rw-r--r--kpilot/lib/pilotDateEntry.cc72
-rw-r--r--kpilot/lib/pilotDateEntry.h30
-rw-r--r--kpilot/lib/pilotLocalDatabase.cc76
-rw-r--r--kpilot/lib/pilotLocalDatabase.h24
-rw-r--r--kpilot/lib/pilotMemo.cc16
-rw-r--r--kpilot/lib/pilotMemo.h22
-rw-r--r--kpilot/lib/pilotRecord.cc6
-rw-r--r--kpilot/lib/pilotRecord.h6
-rw-r--r--kpilot/lib/pilotSerialDatabase.cc22
-rw-r--r--kpilot/lib/pilotSerialDatabase.h12
-rw-r--r--kpilot/lib/pilotTodoEntry.cc26
-rw-r--r--kpilot/lib/pilotTodoEntry.h16
-rw-r--r--kpilot/lib/pilotUser.h4
-rw-r--r--kpilot/lib/plugin.cc158
-rw-r--r--kpilot/lib/plugin.h62
-rw-r--r--kpilot/lib/pluginfactory.h14
-rw-r--r--kpilot/lib/recordConduit.cc86
-rw-r--r--kpilot/lib/recordConduit.h18
-rw-r--r--kpilot/lib/syncAction.cc140
-rw-r--r--kpilot/lib/syncAction.h56
47 files changed, 856 insertions, 856 deletions
diff --git a/kpilot/lib/actionQueue.cc b/kpilot/lib/actionQueue.cc
index e4770d369..693629731 100644
--- a/kpilot/lib/actionQueue.cc
+++ b/kpilot/lib/actionQueue.cc
@@ -29,7 +29,7 @@
*/
#include "options.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include "actions.h"
#include "plugin.h"
@@ -70,7 +70,7 @@ void ActionQueue::queueInit()
addAction(new WelcomeAction(fHandle));
}
-void ActionQueue::queueConduits(const QStringList &l,
+void ActionQueue::queueConduits(const TQStringList &l,
const SyncAction::SyncMode &m)
{
FUNCTIONSETUP;
@@ -78,7 +78,7 @@ void ActionQueue::queueConduits(const QStringList &l,
// Add conduits here ...
//
//
- for (QStringList::ConstIterator it = l.begin();
+ for (TQStringList::ConstIterator it = l.begin();
it != l.end();
++it)
{
@@ -156,17 +156,17 @@ void ActionQueue::actionCompleted(SyncAction *b)
<< endl;
#endif
- QObject::connect(a, SIGNAL(logMessage(const QString &)),
- this, SIGNAL(logMessage(const QString &)));
- QObject::connect(a, SIGNAL(logError(const QString &)),
- this, SIGNAL(logMessage(const QString &)));
- QObject::connect(a, SIGNAL(logProgress(const QString &, int)),
- this, SIGNAL(logProgress(const QString &, int)));
- QObject::connect(a, SIGNAL(syncDone(SyncAction *)),
- this, SLOT(actionCompleted(SyncAction *)));
+ TQObject::connect(a, TQT_SIGNAL(logMessage(const TQString &)),
+ this, TQT_SIGNAL(logMessage(const TQString &)));
+ TQObject::connect(a, TQT_SIGNAL(logError(const TQString &)),
+ this, TQT_SIGNAL(logMessage(const TQString &)));
+ TQObject::connect(a, TQT_SIGNAL(logProgress(const TQString &, int)),
+ this, TQT_SIGNAL(logProgress(const TQString &, int)));
+ TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)),
+ this, TQT_SLOT(actionCompleted(SyncAction *)));
// Run the action picked from the queue when we get back
// to the event loop.
- QTimer::singleShot(0,a,SLOT(execConduit()));
+ TQTimer::singleShot(0,a,TQT_SLOT(execConduit()));
}
diff --git a/kpilot/lib/actionQueue.h b/kpilot/lib/actionQueue.h
index bc8b11560..057b4beb0 100644
--- a/kpilot/lib/actionQueue.h
+++ b/kpilot/lib/actionQueue.h
@@ -28,7 +28,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qptrqueue.h>
+#include <tqptrqueue.h>
#include "syncAction.h"
@@ -116,7 +116,7 @@ public:
* ignored since those names are used by KPilot internally
* for administrative purposes.
*/
- void queueConduits(const QStringList &conduits,
+ void queueConduits(const TQStringList &conduits,
const SyncAction::SyncMode &mode);
/**
@@ -155,7 +155,7 @@ protected slots:
private:
/** A queue of actions to take. */
- QPtrQueue < SyncAction > SyncActionQueue;
+ TQPtrQueue < SyncAction > SyncActionQueue;
};
diff --git a/kpilot/lib/actions.cc b/kpilot/lib/actions.cc
index 6cd88273b..212540f7f 100644
--- a/kpilot/lib/actions.cc
+++ b/kpilot/lib/actions.cc
@@ -28,9 +28,9 @@
*/
#include "options.h"
-#include <qapplication.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <ksavefile.h>
@@ -52,13 +52,13 @@ WelcomeAction::WelcomeAction(KPilotLink *p) :
FUNCTIONSETUP;
addSyncLogEntry(i18n("KPilot %1 HotSync starting...\n")
- .arg(QString::fromLatin1(KPILOT_VERSION)));
+ .arg(TQString::fromLatin1(KPILOT_VERSION)));
emit logMessage( i18n("Using encoding %1 on the handheld.").arg(Pilot::codecName()) );
emit syncDone(this);
return true;
}
-SorryAction::SorryAction(KPilotLink *p, const QString &s) :
+SorryAction::SorryAction(KPilotLink *p, const TQString &s) :
SyncAction(p,"sorryAction"),
fMessage(s)
{
diff --git a/kpilot/lib/actions.h b/kpilot/lib/actions.h
index ee353551f..2e3b9b20c 100644
--- a/kpilot/lib/actions.h
+++ b/kpilot/lib/actions.h
@@ -67,14 +67,14 @@ public:
* print that message (it must be i18n()ed already) instead of
* the standard message.
*/
- SorryAction(KPilotLink *device, const QString &s=QString::null);
+ SorryAction(KPilotLink *device, const TQString &s=TQString::null);
protected:
/** Reimplemented from SyncAction. */
virtual bool exec();
/** Message to print to the sync log. */
- QString fMessage;
+ TQString fMessage;
} ;
/**
diff --git a/kpilot/lib/idmapper.cc b/kpilot/lib/idmapper.cc
index 6e1031efe..f4fc38c5c 100644
--- a/kpilot/lib/idmapper.cc
+++ b/kpilot/lib/idmapper.cc
@@ -27,8 +27,8 @@
#include "idmapperxml.h"
#include "options.h"
-#include <qsqldatabase.h>
-#include <qfile.h>
+#include <tqsqldatabase.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -57,9 +57,9 @@ IDMapper::IDMapper()
fP = new IDMapperPrivate();
- QString dbPath = KGlobal::dirs()->
+ TQString dbPath = KGlobal::dirs()->
saveLocation("data", CSL1("kpilot/") );
- QString dbFile = dbPath + CSL1("mapping.xml");
+ TQString dbFile = dbPath + CSL1("mapping.xml");
if( !openDatasource( dbFile ) )
{
@@ -67,7 +67,7 @@ IDMapper::IDMapper()
}
}
-IDMapper::IDMapper( const QString &file)
+IDMapper::IDMapper( const TQString &file)
{
FUNCTIONSETUP;
@@ -84,7 +84,7 @@ IDMapper::~IDMapper()
KPILOT_DELETE(fP);
}
-bool IDMapper::openDatasource( const QString &file )
+bool IDMapper::openDatasource( const TQString &file )
{
FUNCTIONSETUP;
@@ -92,7 +92,7 @@ bool IDMapper::openDatasource( const QString &file )
return fP->fXmlSource->open();
}
-void IDMapper::registerPCObjectId( const QString &conduit, const QString &uid )
+void IDMapper::registerPCObjectId( const TQString &conduit, const TQString &uid )
{
FUNCTIONSETUP;
@@ -103,7 +103,7 @@ void IDMapper::registerPCObjectId( const QString &conduit, const QString &uid )
fP->fXmlSource->save();
}
-void IDMapper::registerHHObjectId( const QString &conduit, recordid_t pid )
+void IDMapper::registerHHObjectId( const TQString &conduit, recordid_t pid )
{
FUNCTIONSETUP;
@@ -114,13 +114,13 @@ void IDMapper::registerHHObjectId( const QString &conduit, recordid_t pid )
fP->fXmlSource->save();
}
-QValueList<QString> IDMapper::getPCObjectIds( const QString &conduit )
+TQValueList<TQString> IDMapper::getPCObjectIds( const TQString &conduit )
{
FUNCTIONSETUP;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
- QValueList<QString> uids;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
+ TQValueList<TQString> uids;
DEBUGKPILOT << fname << ": total " << mappings.count() << endl;
@@ -141,13 +141,13 @@ QValueList<QString> IDMapper::getPCObjectIds( const QString &conduit )
return uids;
}
-QValueList<recordid_t> IDMapper::getHHObjectIds( const QString &conduit )
+TQValueList<recordid_t> IDMapper::getHHObjectIds( const TQString &conduit )
{
FUNCTIONSETUP;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
- QValueList<recordid_t> pids;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
+ TQValueList<recordid_t> pids;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
@@ -164,12 +164,12 @@ QValueList<recordid_t> IDMapper::getHHObjectIds( const QString &conduit )
return pids;
}
-bool IDMapper::hasPCId( const QString &conduit, recordid_t pid )
+bool IDMapper::hasPCId( const TQString &conduit, recordid_t pid )
{
FUNCTIONSETUP;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
@@ -183,12 +183,12 @@ bool IDMapper::hasPCId( const QString &conduit, recordid_t pid )
return false;
}
-bool IDMapper::hasHHId( const QString &conduit, const QString &uid )
+bool IDMapper::hasHHId( const TQString &conduit, const TQString &uid )
{
FUNCTIONSETUP;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
@@ -202,15 +202,15 @@ bool IDMapper::hasHHId( const QString &conduit, const QString &uid )
return false;
}
-void IDMapper::setHHObjectId( const QString &conduit, const QString &uid
+void IDMapper::setHHObjectId( const TQString &conduit, const TQString &uid
, recordid_t pid )
{
FUNCTIONSETUP;
bool modified = false;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
@@ -224,15 +224,15 @@ void IDMapper::setHHObjectId( const QString &conduit, const QString &uid
}
}
-void IDMapper::setPCObjectId( const QString &conduit, recordid_t pid
- , const QString &uid )
+void IDMapper::setPCObjectId( const TQString &conduit, recordid_t pid
+ , const TQString &uid )
{
FUNCTIONSETUP;
bool modified = false;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
diff --git a/kpilot/lib/idmapper.h b/kpilot/lib/idmapper.h
index 0364dbc93..b2ff0efe5 100644
--- a/kpilot/lib/idmapper.h
+++ b/kpilot/lib/idmapper.h
@@ -25,9 +25,9 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#include "pi-macros.h"
@@ -51,85 +51,85 @@ public:
/**
* Creates a new IDMapper with file as datasource.
*/
- IDMapper( const QString &file );
+ IDMapper( const TQString &file );
~IDMapper();
/**
* Adds an uid for PC objects to the database.
*/
- void registerPCObjectId( const QString &conduit, const QString &uid );
+ void registerPCObjectId( const TQString &conduit, const TQString &uid );
/**
* Returns all known uid's for given conduit.
*/
- QValueList<QString> getPCObjectIds( const QString &conduit );
+ TQValueList<TQString> getPCObjectIds( const TQString &conduit );
/**
* Adds a pid for HH objects to the database.
*/
- void registerHHObjectId( const QString &conduit, recordid_t pid );
+ void registerHHObjectId( const TQString &conduit, recordid_t pid );
/**
* Returns all know pids for given conduit.
*/
- QValueList<recordid_t> getHHObjectIds( const QString &conduit );
+ TQValueList<recordid_t> getHHObjectIds( const TQString &conduit );
/**
* Sets the PC uid for the handheld record with pid. Does nothing when
* there is no handheld record with pid.
*/
- void setPCObjectId( const QString &conduit, recordid_t pid
- , const QString &uid );
+ void setPCObjectId( const TQString &conduit, recordid_t pid
+ , const TQString &uid );
/**
* Sets the PC uid for the handheld record with pid. Does nothing when
* there is no handheld record with pid.
*/
- void setHHObjectId( const QString &conduit, const QString &uid
+ void setHHObjectId( const TQString &conduit, const TQString &uid
, recordid_t pid );
/**
* Returns the PC uid for the handheld record with pid. Returns 0 when no
* pid exists for given uid.
*/
- recordid_t getHHObjectId( const QString &conduit, const QString &uid );
+ recordid_t getHHObjectId( const TQString &conduit, const TQString &uid );
/**
* Returns the HH pid for the PC record with uid. Returns an empty string
* when no uid exists for given pid.
*/
- QString getHHObjectId( const QString &conduit, recordid_t pid );
+ TQString getHHObjectId( const TQString &conduit, recordid_t pid );
/**
* Returns true when there is a uid set for given pid. The conduit itself
* must determine if the two objects are in sync if this function returns
* true.
*/
- bool hasPCId( const QString &conduit, recordid_t pid );
+ bool hasPCId( const TQString &conduit, recordid_t pid );
/**
* Returns true when there is a pid set for given uid. The conduit itself
* must determine if the two objects are in sync if this function returns
* true.
*/
- bool hasHHId( const QString &conduit, const QString &uid );
+ bool hasHHId( const TQString &conduit, const TQString &uid );
/**
* Sets the time that the two objects where last synced. The conduits
* should call this method (or the pid version) when two objects are synced.
* When the uid does not exist nothing happens.
*/
- void setLastSyncTime( const QString &conduit, const QString &uid,
- const QDateTime &date );
+ void setLastSyncTime( const TQString &conduit, const TQString &uid,
+ const TQDateTime &date );
/**
* Sets the time that the two objects where last synced. The conduits
* should call this (or the uid version) method when two objects are synced.
* When the pid does not exist nothing happens.
*/
- void setLastSyncTime( const QString &conduit, recordid_t pid
- , const QDateTime &date );
+ void setLastSyncTime( const TQString &conduit, recordid_t pid
+ , const TQDateTime &date );
/**
* Returns the date/time for the last time that the item with uid was
@@ -138,7 +138,7 @@ public:
*
* Returns a null datetime when the pid does not excist.
*/
- QDateTime lastTimeSynced( const QString &conduit, const QString &uid );
+ TQDateTime lastTimeSynced( const TQString &conduit, const TQString &uid );
/**
* Returns the date/time for the last time that the item with pid was
@@ -147,10 +147,10 @@ public:
*
* Returns a null datetime when the pid does not excist.
*/
- QDateTime lastTimeSynced( const QString &conduit, recordid_t pid );
+ TQDateTime lastTimeSynced( const TQString &conduit, recordid_t pid );
protected:
- bool openDatasource( const QString &file );
+ bool openDatasource( const TQString &file );
private:
IDMapperPrivate *fP;
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;
diff --git a/kpilot/lib/idmapperxml.h b/kpilot/lib/idmapperxml.h
index 455673888..87c912379 100644
--- a/kpilot/lib/idmapperxml.h
+++ b/kpilot/lib/idmapperxml.h
@@ -27,15 +27,15 @@
#include "idmapping.h"
-#include <qxml.h>
-#include <qdom.h>
-#include <qstring.h>
-#include <qptrcollection.h>
+#include <tqxml.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqptrcollection.h>
class IDMapperXml : public QXmlDefaultHandler
{
public:
- IDMapperXml( const QString &file );
+ IDMapperXml( const TQString &file );
~IDMapperXml();
@@ -59,26 +59,26 @@ public:
/**
* Returns the collection of mappings.
*/
- QValueList<IDMapping> &mappings();
+ TQValueList<IDMapping> &mappings();
/**
* Overloaded function to parse the xml file.
*/
- bool startElement( const QString &namespaceURI, const QString &localName
- , const QString &qName, const QXmlAttributes &attribs );
+ bool startElement( const TQString &namespaceURI, const TQString &localName
+ , const TQString &qName, const TQXmlAttributes &attribs );
/**
* Overloaded function to parse the xml file.
*/
- bool endElement( const QString &namespaceURI, const QString &localName
- , const QString &qName );
+ bool endElement( const TQString &namespaceURI, const TQString &localName
+ , const TQString &qName );
private:
- QFile fFile;
- QDomDocument doc;
- QDomElement root;
+ TQFile fFile;
+ TQDomDocument doc;
+ TQDomElement root;
IDMapping *fCurrentMapping;
- QValueList<IDMapping> fMappings;
+ TQValueList<IDMapping> fMappings;
};
#endif
diff --git a/kpilot/lib/idmapping.cc b/kpilot/lib/idmapping.cc
index 7a49e9e3e..49a1e334e 100644
--- a/kpilot/lib/idmapping.cc
+++ b/kpilot/lib/idmapping.cc
@@ -29,7 +29,7 @@ IDMapping::IDMapping()
{
}
-IDMapping::IDMapping( const QString &conduit )
+IDMapping::IDMapping( const TQString &conduit )
{
fConduit = conduit;
fPid = 0;
@@ -53,7 +53,7 @@ IDMapping IDMapping::operator=( const IDMapping &m )
return local;
}
-void IDMapping::setUid( const QString &uid )
+void IDMapping::setUid( const TQString &uid )
{
fUid = uid;
}
@@ -63,17 +63,17 @@ void IDMapping::setPid( recordid_t pid )
fPid = pid;
}
-void IDMapping::setLastSyncTime( const QDateTime &datetime )
+void IDMapping::setLastSyncTime( const TQDateTime &datetime )
{
fLastSync = datetime;
}
-QString IDMapping::conduit() const
+TQString IDMapping::conduit() const
{
return fConduit;
}
-QString IDMapping::uid() const
+TQString IDMapping::uid() const
{
return fUid;
}
@@ -83,7 +83,7 @@ recordid_t IDMapping::pid() const
return fPid;
}
-QDateTime IDMapping::lastSyncTime() const
+TQDateTime IDMapping::lastSyncTime() const
{
return fLastSync;
}
diff --git a/kpilot/lib/idmapping.h b/kpilot/lib/idmapping.h
index acb17dc8a..b8ed4d5e4 100644
--- a/kpilot/lib/idmapping.h
+++ b/kpilot/lib/idmapping.h
@@ -28,39 +28,39 @@
#include "pi-macros.h"
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
class IDMapping
{
public:
IDMapping();
- IDMapping( const QString &conduit );
+ IDMapping( const TQString &conduit );
IDMapping( const IDMapping &m );
IDMapping operator=( const IDMapping &m );
- void setUid( const QString &uid );
+ void setUid( const TQString &uid );
void setPid( recordid_t uid );
- void setLastSyncTime( const QDateTime &datetime );
+ void setLastSyncTime( const TQDateTime &datetime );
- QString conduit() const;
+ TQString conduit() const;
- QString uid() const;
+ TQString uid() const;
recordid_t pid() const;
- QDateTime lastSyncTime() const;
+ TQDateTime lastSyncTime() const;
private:
- QString fConduit;
- QString fUid;
+ TQString fConduit;
+ TQString fUid;
recordid_t fPid;
- QDateTime fLastSync;
+ TQDateTime fLastSync;
};
#endif
diff --git a/kpilot/lib/kpilotdevicelink.cc b/kpilot/lib/kpilotdevicelink.cc
index 55027d763..5fed7961a 100644
--- a/kpilot/lib/kpilotdevicelink.cc
+++ b/kpilot/lib/kpilotdevicelink.cc
@@ -45,11 +45,11 @@
#include <pi-file.h>
#include <pi-buffer.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qthread.h>
-#include <qsocketnotifier.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqthread.h>
+#include <tqsocketnotifier.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -71,19 +71,19 @@
DeviceMap *DeviceMap::mThis = 0L;
-static inline void startOpenTimer(DeviceCommThread *dev, QTimer *&t)
+static inline void startOpenTimer(DeviceCommThread *dev, TQTimer *&t)
{
if ( !t)
{
- t = new QTimer(dev);
- QObject::connect(t, SIGNAL(timeout()), dev, SLOT(openDevice()));
+ t = new TQTimer(dev);
+ TQObject::connect(t, TQT_SIGNAL(timeout()), dev, TQT_SLOT(openDevice()));
}
// just a single-shot timer. we'll know when to start it again...
t->start(1000, true);
}
DeviceCommThread::DeviceCommThread(KPilotDeviceLink *d) :
- QThread(),
+ TQThread(),
fDone(true),
fHandle(d),
fOpenTimer(0L),
@@ -144,7 +144,7 @@ void DeviceCommThread::reset()
if (link()->fMessages->shouldPrint(Messages::OpenFailMessage))
{
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
i18n("Could not open device: %1 (will retry)")
.arg(link()->pilotPath() )));
}
@@ -163,7 +163,7 @@ void DeviceCommThread::reset()
* and then bind to it (in open()). If we're able to do those 2 things, then
* we do 2 things: we set a timeout timer (which will tell us that X amount of
* time has transpired before we get into the meat of the sync transaction), and
- * we also set up a QSocketNotifier, which will tell us when data is available
+ * we also set up a TQSocketNotifier, which will tell us when data is available
* to be read from the Palm socket. If we were unable to create a socket
* and/or bind to the Palm in this method, we'll start our timer again.
*/
@@ -183,7 +183,7 @@ void DeviceCommThread::openDevice()
if (link()->fMessages->shouldPrint(Messages::OpenMessage))
{
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
i18n("Trying to open device %1...")
.arg(link()->fPilotPath)));
}
@@ -219,13 +219,13 @@ void DeviceCommThread::openDevice()
}
}
-bool DeviceCommThread::open(const QString &device)
+bool DeviceCommThread::open(const TQString &device)
{
FUNCTIONSETUPL(2);
int ret;
int e = 0;
- QString msg;
+ TQString msg;
if (fTempSocket != -1)
{
@@ -246,7 +246,7 @@ bool DeviceCommThread::open(const QString &device)
link()->fLinkStatus = PilotLinkError;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
return false;
}
@@ -265,7 +265,7 @@ bool DeviceCommThread::open(const QString &device)
link()->fLinkStatus = PilotLinkError;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
return false;
}
@@ -277,7 +277,7 @@ bool DeviceCommThread::open(const QString &device)
DEBUGKPILOT << fname << ": Binding to path: ["
<< link()->fRealPilotPath << "]" << endl;
- ret = pi_bind(fTempSocket, QFile::encodeName(link()->fRealPilotPath));
+ ret = pi_bind(fTempSocket, TQFile::encodeName(link()->fRealPilotPath));
if (ret < 0)
{
@@ -295,7 +295,7 @@ bool DeviceCommThread::open(const QString &device)
if (link()->fMessages->shouldPrint(Messages::OpenFailMessage))
{
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
}
return false;
@@ -304,10 +304,10 @@ bool DeviceCommThread::open(const QString &device)
link()->fLinkStatus = DeviceOpen;
DeviceMap::self()->bindDevice(link()->fRealPilotPath);
- fSocketNotifier = new QSocketNotifier(fTempSocket,
- QSocketNotifier::Read, this);
- QObject::connect(fSocketNotifier, SIGNAL(activated(int)),
- this, SLOT(acceptDevice()));
+ fSocketNotifier = new TQSocketNotifier(fTempSocket,
+ TQSocketNotifier::Read, this);
+ TQObject::connect(fSocketNotifier, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(acceptDevice()));
fSocketNotifierActive=true;
/**
@@ -322,15 +322,15 @@ bool DeviceCommThread::open(const QString &device)
timeout=5000;
}
- fWorkaroundUSBTimer = new QTimer(this);
- connect(fWorkaroundUSBTimer, SIGNAL(timeout()), this, SLOT(workaroundUSB()));
+ fWorkaroundUSBTimer = new TQTimer(this);
+ connect(fWorkaroundUSBTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(workaroundUSB()));
fWorkaroundUSBTimer->start(timeout, true);
return true;
}
/**
- * We've been notified by our QSocketNotifier that we have data available on the
+ * We've been notified by our TQSocketNotifier that we have data available on the
* socket. Try to go through the remaining steps of the connnection process.
* Note: If we return at all from this before the very end without a successful
* connection, we need to make sure we restart our connection open timer, otherwise
@@ -387,14 +387,14 @@ void DeviceCommThread::acceptDevice()
// Presumably, strerror() returns things in
// local8Bit and not latin1.
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
i18n("Cannot listen on Pilot socket (%1)").
- arg(QString::fromLocal8Bit(s))));
+ arg(TQString::fromLocal8Bit(s))));
reset();
return;
}
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 10));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 10));
DEBUGKPILOT << fname <<
": Listening to pilot. Now trying accept..." << endl;
@@ -408,8 +408,8 @@ void DeviceCommThread::acceptDevice()
WARNINGKPILOT << "pi_accept returned: [" << s << "]" << endl;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
- .arg(QString::fromLocal8Bit(s))));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
+ .arg(TQString::fromLocal8Bit(s))));
link()->fLinkStatus = PilotLinkError;
reset();
@@ -423,21 +423,21 @@ void DeviceCommThread::acceptDevice()
link()->fLinkStatus = PilotLinkError;
WARNINGKPILOT << "Already connected or unable to connect!" << endl;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
.arg(i18n("already connected"))));
reset();
return;
}
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 30));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 30));
DEBUGKPILOT << fname << ": doing dlp_ReadSysInfo..." << endl;
struct SysInfo sys_info;
if (dlp_ReadSysInfo(fPilotSocket, &sys_info) < 0)
{
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
i18n("Unable to read system information from Pilot")));
link()->fLinkStatus=PilotLinkError;
@@ -461,7 +461,7 @@ void DeviceCommThread::acceptDevice()
fWorkaroundUSBTimer->stop();
KPILOT_DELETE(fWorkaroundUSBTimer);
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 60));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 60));
KPILOT_DELETE(link()->fPilotUser);
link()->fPilotUser = new KPilotUser;
@@ -471,11 +471,11 @@ void DeviceCommThread::acceptDevice()
/* Ask the pilot who it is. And see if it's who we think it is. */
dlp_ReadUserInfo(fPilotSocket, link()->fPilotUser->data());
- QString n = link()->getPilotUser().name();
+ TQString n = link()->getPilotUser().name();
DEBUGKPILOT << fname
<< ": Read user name: [" << n << "]" << endl;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, i18n("Checking last PC..."), 90));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, i18n("Checking last PC..."), 90));
/* Tell user (via Pilot) that we are starting things up */
if ((ret=dlp_OpenConduit(fPilotSocket)) < 0)
@@ -483,18 +483,18 @@ void DeviceCommThread::acceptDevice()
DEBUGKPILOT << fname
<< ": dlp_OpenConduit returned: [" << ret << "]" << endl;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
i18n("Could not read user information from the Pilot. "
"Perhaps you have a password set on the device?")));
}
link()->fLinkStatus = AcceptedDevice;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 100));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 100));
DeviceCommEvent * ev = new DeviceCommEvent(EventDeviceReady);
ev->setCurrentSocket(fPilotSocket);
- QApplication::postEvent(link(), ev);
+ TQApplication::postEvent(link(), ev);
}
@@ -516,19 +516,19 @@ void DeviceCommThread::run()
// keep the thread alive until we're supposed to be done
while (!fDone)
{
- QThread::sleep(sleepBetweenPoll);
+ TQThread::sleep(sleepBetweenPoll);
}
close();
// now sleep one last bit to make sure the pthread inside
// pilot-link (potentially, if it's libusb) is done before we exit
- QThread::sleep(1);
+ TQThread::sleep(1);
DEBUGKPILOT << fname << ": comm thread now done..." << endl;
}
-KPilotDeviceLink::KPilotDeviceLink(QObject * parent, const char *name,
- const QString &tempDevice) :
+KPilotDeviceLink::KPilotDeviceLink(TQObject * parent, const char *name,
+ const TQString &tempDevice) :
KPilotLink(parent, name), fLinkStatus(Init), fWorkaroundUSB(false),
fPilotSocket(-1), fTempDevice(tempDevice), fMessages(new Messages(this)), fDeviceCommThread(0L)
{
@@ -553,7 +553,7 @@ KPilotDeviceLink::~KPilotDeviceLink()
return fLinkStatus == AcceptedDevice;
}
-/* virtual */bool KPilotDeviceLink::event(QEvent *e)
+/* virtual */bool KPilotDeviceLink::event(TQEvent *e)
{
FUNCTIONSETUP;
@@ -636,7 +636,7 @@ void KPilotDeviceLink::close()
fPilotSocket = (-1);
}
-void KPilotDeviceLink::reset(const QString & dP)
+void KPilotDeviceLink::reset(const TQString & dP)
{
FUNCTIONSETUP;
@@ -645,7 +645,7 @@ void KPilotDeviceLink::reset(const QString & dP)
// Release all resources
//
close();
- fPilotPath = QString::null;
+ fPilotPath = TQString::null;
fPilotPath = dP;
if (fPilotPath.isEmpty())
@@ -667,7 +667,7 @@ void KPilotDeviceLink::startCommThread()
WARNINGKPILOT << "No point in trying empty device."
<< endl;
- QString msg = i18n("The Pilot device is not configured yet.");
+ TQString msg = i18n("The Pilot device is not configured yet.");
WARNINGKPILOT << msg << endl;
fLinkStatus = PilotLinkError;
@@ -699,7 +699,7 @@ void KPilotDeviceLink::checkDevice()
// If the device exists yet doesn't have the right
// permissions, complain and then continue anyway.
//
- QFileInfo fi(fPilotPath);
+ TQFileInfo fi(fPilotPath);
if (fi.exists())
{
// If it exists, it ought to be RW already.
@@ -725,7 +725,7 @@ void KPilotDeviceLink::checkDevice()
}
}
-void KPilotDeviceLink::setTempDevice(const QString &d)
+void KPilotDeviceLink::setTempDevice(const TQString &d)
{
fTempDevice = d;
DeviceMap::self()->bindDevice(fTempDevice);
@@ -738,24 +738,24 @@ void KPilotDeviceLink::setTempDevice(const QString &d)
return pi_tickle(pilotSocket()) >= 0;
}
-/* virtual */void KPilotDeviceLink::addSyncLogEntryImpl(const QString &entry)
+/* virtual */void KPilotDeviceLink::addSyncLogEntryImpl(const TQString &entry)
{
dlp_AddSyncLogEntry(fPilotSocket,
const_cast<char *>((const char *)Pilot::toPilot(entry)));
}
-bool KPilotDeviceLink::installFile(const QString & f, const bool deleteFile)
+bool KPilotDeviceLink::installFile(const TQString & f, const bool deleteFile)
{
FUNCTIONSETUP;
DEBUGKPILOT << fname << ": Installing file " << f << endl;
- if (!QFile::exists(f))
+ if (!TQFile::exists(f))
return false;
char buffer[PATH_MAX];
memset(buffer, 0, PATH_MAX);
- strlcpy(buffer, QFile::encodeName(f), PATH_MAX);
+ strlcpy(buffer, TQFile::encodeName(f), PATH_MAX);
struct pi_file *pf = pi_file_open(buffer);
if (!f)
@@ -778,7 +778,7 @@ bool KPilotDeviceLink::installFile(const QString & f, const bool deleteFile)
pi_file_close(pf);
if (deleteFile)
- QFile::remove(f);
+ TQFile::remove(f);
return true;
}
@@ -788,9 +788,9 @@ int KPilotDeviceLink::openConduit()
return dlp_OpenConduit(fPilotSocket);
}
-QString KPilotDeviceLink::statusString(LinkStatus l)
+TQString KPilotDeviceLink::statusString(LinkStatus l)
{
- QString s= CSL1("KPilotDeviceLink=");
+ TQString s= CSL1("KPilotDeviceLink=");
switch (l)
{
@@ -826,7 +826,7 @@ QString KPilotDeviceLink::statusString(LinkStatus l)
return s;
}
-QString KPilotDeviceLink::statusString() const
+TQString KPilotDeviceLink::statusString() const
{
return statusString(status() );
}
@@ -872,7 +872,7 @@ int KPilotDeviceLink::findDatabase(const char *name, struct DBInfo *dbinfo,
type, creator, dbinfo);
}
-bool KPilotDeviceLink::retrieveDatabase(const QString &fullBackupName,
+bool KPilotDeviceLink::retrieveDatabase(const TQString &fullBackupName,
DBInfo *info)
{
FUNCTIONSETUP;
@@ -886,7 +886,7 @@ bool KPilotDeviceLink::retrieveDatabase(const QString &fullBackupName,
DEBUGKPILOT << fname << ": Writing DB <" << info->name << "> "
<< " to " << fullBackupName << endl;
- QCString encodedName = QFile::encodeName(fullBackupName);
+ TQCString encodedName = TQFile::encodeName(fullBackupName);
struct pi_file *f = pi_file_create(encodedName, info);
if (!f)
@@ -954,7 +954,7 @@ const KPilotCard *KPilotDeviceLink::getCardInfo(int card)
return cardinfo;
}
-PilotDatabase *KPilotDeviceLink::database(const QString &name)
+PilotDatabase *KPilotDeviceLink::database(const TQString &name)
{
return new PilotSerialDatabase( this, name );
}
diff --git a/kpilot/lib/kpilotdevicelink.h b/kpilot/lib/kpilotdevicelink.h
index d2527aee4..2f29a5877 100644
--- a/kpilot/lib/kpilotdevicelink.h
+++ b/kpilot/lib/kpilotdevicelink.h
@@ -58,7 +58,7 @@ enum LinkStatus {
* Custom events we can be handling...
*/
enum DeviceCustomEvents {
- EventLogMessage = QEvent::User + 777,
+ EventLogMessage = TQEvent::User + 777,
EventLogError,
EventLogProgress,
EventDeviceReady
@@ -86,9 +86,9 @@ public:
* @param tempDevice Path to device node to use as an alternative
* to the "normal" one set by KPilot.
*/
- KPilotDeviceLink( QObject *parent = 0,
+ KPilotDeviceLink( TQObject *parent = 0,
const char *name = 0,
- const QString &tempDevice = QString::null );
+ const TQString &tempDevice = TQString::null );
/**
* Destructor. This rudely ends the communication with the handheld.
@@ -107,17 +107,17 @@ public:
}
/** Get a human-readable string for the given status @p l. */
- static QString statusString(LinkStatus l);
+ static TQString statusString(LinkStatus l);
// The following API is the actual implementation of
// the KPilotLink API, for documentation see that file.
//
- virtual QString statusString() const;
+ virtual TQString statusString() const;
virtual bool isConnected() const;
- virtual void reset( const QString & );
+ virtual void reset( const TQString & );
virtual void close();
virtual void reset();
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
virtual bool tickle();
virtual const KPilotCard *getCardInfo(int card);
virtual void endSync( EndOfSyncFlags f );
@@ -125,14 +125,14 @@ public:
virtual int getNextDatabase(int index,struct DBInfo *);
virtual int findDatabase(const char *name, struct DBInfo*,
int index=0, unsigned long type=0, unsigned long creator=0);
- virtual bool retrieveDatabase(const QString &path, struct DBInfo *db);
+ virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db);
virtual DBInfoList getDBList(int cardno=0, int flags=dlpDBListRAM);
- virtual PilotDatabase *database( const QString &name );
+ virtual PilotDatabase *database( const TQString &name );
virtual PilotDatabase *database( const DBInfo *info );
protected:
- virtual bool installFile(const QString &, const bool deleteFile);
- virtual void addSyncLogEntryImpl( const QString &s );
+ virtual bool installFile(const TQString &, const bool deleteFile);
+ virtual void addSyncLogEntryImpl( const TQString &s );
virtual int pilotSocket() const
{
return fPilotSocket;
@@ -161,14 +161,14 @@ public:
* Useful for hotplug enviroments, this device is used @em once
* for accepting a connection.
*/
- void setTempDevice( const QString &device );
+ void setTempDevice( const TQString &device );
/**
* Sets the device to use. Used by probe dialog, since we know
* what device to use, but we don't want to start the detection
* immediately.
*/
- void setDevice( const QString &device )
+ void setDevice( const TQString &device )
{
fPilotPath = device;
}
@@ -191,13 +191,13 @@ protected:
* Path with resolved symlinks, to prevent double binding
* to the same device.
*/
- QString fRealPilotPath;
+ TQString fRealPilotPath;
/**
* Pilot-link library handles for the device once it's opened.
*/
int fPilotSocket;
- QString fTempDevice;
+ TQString fTempDevice;
/**
* Handle cases where we can't accept or open the device,
diff --git a/kpilot/lib/kpilotdevicelinkPrivate.h b/kpilot/lib/kpilotdevicelinkPrivate.h
index be2bbda35..d451e75c5 100644
--- a/kpilot/lib/kpilotdevicelinkPrivate.h
+++ b/kpilot/lib/kpilotdevicelinkPrivate.h
@@ -29,8 +29,8 @@
#include <errno.h>
-#include <qstringlist.h>
-#include <qthread.h>
+#include <tqstringlist.h>
+#include <tqthread.h>
#include "kpilotdevicelink.h"
#include "options.h"
@@ -49,7 +49,7 @@ public:
return mThis;
}
- bool canBind(const QString &device)
+ bool canBind(const TQString &device)
{
FUNCTIONSETUPL(5);
DEBUGKPILOT << fname << ": device: ["
@@ -59,7 +59,7 @@ public:
return !mBoundDevices.contains(device);
}
- void bindDevice(const QString &device)
+ void bindDevice(const TQString &device)
{
FUNCTIONSETUPL(5);
DEBUGKPILOT << fname << ": device: ["
@@ -69,7 +69,7 @@ public:
showList();
}
- void unbindDevice(const QString &device)
+ void unbindDevice(const TQString &device)
{
FUNCTIONSETUPL(5);
DEBUGKPILOT << fname << ": device: ["
@@ -88,7 +88,7 @@ protected:
{
}
- QStringList mBoundDevices;
+ TQStringList mBoundDevices;
static DeviceMap *mThis;
private:
@@ -173,13 +173,13 @@ protected:
class DeviceCommEvent : public QEvent
{
public:
- DeviceCommEvent(DeviceCustomEvents type, QString msg = QString::null,
+ DeviceCommEvent(DeviceCustomEvents type, TQString msg = TQString::null,
int progress = 0) :
- QEvent( (QEvent::Type)type ), fMessage(msg), fProgress(progress),
+ TQEvent( (TQEvent::Type)type ), fMessage(msg), fProgress(progress),
fPilotSocket(-1)
{
}
- QString message() const
+ TQString message() const
{
return fMessage;
}
@@ -198,7 +198,7 @@ public:
return fPilotSocket;
}
private:
- QString fMessage;
+ TQString fMessage;
int fProgress;
/**
* Pilot-link library handles for the device once it's opened.
@@ -211,7 +211,7 @@ private:
Event thread (similar to Swing's AWT event dispatch thread).
*/
-class DeviceCommThread : public QObject, public QThread
+class DeviceCommThread : public TQObject, public QThread
{
friend class KPilotDeviceLink;
@@ -239,7 +239,7 @@ protected:
* Does the low-level opening of the device and handles the
* pilot-link library initialisation.
*/
- bool open(const QString &device = QString::null);
+ bool open(const TQString &device = TQString::null);
protected slots:
/**
@@ -277,7 +277,7 @@ private:
WARNINGKPILOT << "Link asked for, but either I'm "
<< "done or I don't have a valid handle. "
<< "Shutting down comm thread." << endl;
- QThread::exit();
+ TQThread::exit();
return 0;
}
}
@@ -285,12 +285,12 @@ private:
/**
* Timers and Notifiers for detecting activity on the device.
*/
- QTimer *fOpenTimer;
- QSocketNotifier *fSocketNotifier;
+ TQTimer *fOpenTimer;
+ TQSocketNotifier *fSocketNotifier;
bool fSocketNotifierActive;
/** Timer used to check for a badly-connected Z31/72 */
- QTimer *fWorkaroundUSBTimer;
+ TQTimer *fWorkaroundUSBTimer;
/**
* Pilot-link library handles for the device once it's opened.
@@ -298,7 +298,7 @@ private:
int fPilotSocket;
int fTempSocket;
- inline QString errorMessage(int e)
+ inline TQString errorMessage(int e)
{
switch (e)
{
diff --git a/kpilot/lib/kpilotlink.cc b/kpilot/lib/kpilotlink.cc
index 9c0b85ee9..da85d489d 100644
--- a/kpilot/lib/kpilotlink.cc
+++ b/kpilot/lib/kpilotlink.cc
@@ -47,10 +47,10 @@
#include <pi-file.h>
#include <pi-buffer.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qthread.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqthread.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -74,7 +74,7 @@ class TickleThread : public QThread
{
public:
TickleThread(KPilotLink *d, bool *done, int timeout) :
- QThread(),
+ TQThread(),
fHandle(d),
fDone(done),
fTimeout(timeout)
@@ -108,14 +108,14 @@ void TickleThread::run()
while (!(*fDone))
{
- QThread::msleep(1000/ChecksPerSecond);
+ TQThread::msleep(1000/ChecksPerSecond);
if (!(--subseconds))
{
if (timeout)
{
if (!(--timeout))
{
- QApplication::postEvent(fHandle, new QEvent(static_cast<QEvent::Type>(KPilotLink::EventTickleTimeout)));
+ TQApplication::postEvent(fHandle, new TQEvent(static_cast<TQEvent::Type>(KPilotLink::EventTickleTimeout)));
break;
}
}
@@ -137,9 +137,9 @@ void TickleThread::run()
-KPilotLink::KPilotLink( QObject *parent, const char *name ) :
- QObject( parent, name ),
- fPilotPath(QString::null),
+KPilotLink::KPilotLink( TQObject *parent, const char *name ) :
+ TQObject( parent, name ),
+ fPilotPath(TQString::null),
fPilotUser(0L),
fPilotSysInfo(0L),
fTickleDone(true),
@@ -169,7 +169,7 @@ KPilotLink::~KPilotLink()
KPILOT_DELETE(fPilotSysInfo);
}
-/* virtual */ bool KPilotLink::event(QEvent *e)
+/* virtual */ bool KPilotLink::event(TQEvent *e)
{
if ((int)e->type() == EventTickleTimeout)
{
@@ -177,7 +177,7 @@ KPilotLink::~KPilotLink()
emit timeout();
return true;
}
- else return QObject::event(e);
+ else return TQObject::event(e);
}
/*
@@ -218,30 +218,30 @@ void KPilotLink::stopTickle()
}
}
-unsigned int KPilotLink::installFiles(const QStringList & l, const bool deleteFiles)
+unsigned int KPilotLink::installFiles(const TQStringList & l, const bool deleteFiles)
{
FUNCTIONSETUP;
- QStringList::ConstIterator i,e;
+ TQStringList::ConstIterator i,e;
unsigned int k = 0;
unsigned int n = 0;
unsigned int total = l.count();
for (i = l.begin(), e = l.end(); i != e; ++i)
{
- emit logProgress(QString::null,
+ emit logProgress(TQString::null,
(int) ((100.0 / total) * (float) n));
if (installFile(*i, deleteFiles))
k++;
n++;
}
- emit logProgress(QString::null, 100);
+ emit logProgress(TQString::null, 100);
return k;
}
-void KPilotLink::addSyncLogEntry(const QString & entry, bool log)
+void KPilotLink::addSyncLogEntry(const TQString & entry, bool log)
{
FUNCTIONSETUP;
if (entry.isEmpty()) return;
diff --git a/kpilot/lib/kpilotlink.h b/kpilot/lib/kpilotlink.h
index 5c3865c3e..b0c97de0f 100644
--- a/kpilot/lib/kpilotlink.h
+++ b/kpilot/lib/kpilotlink.h
@@ -31,8 +31,8 @@
#include <pi-dlp.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
/** @file
* Encapsulates all the communication with the handheld. Also
@@ -96,7 +96,7 @@ class PilotDatabase;
* The life-cycle of a KPilotLink object is as follows:
*
* # Object is created (one of the concrete subclasses, anyway)
-* # Object gets a location assigned through reset(const QString &)
+* # Object gets a location assigned through reset(const TQString &)
* # Object is connected to the handheld device (somehow, depends on subclass)
* # Object emits signal deviceReady()
*
@@ -104,7 +104,7 @@ class PilotDatabase;
* the handheld. When the device connection is no longer needed, call either
* endOfSync() or finishSync() to wrap up the communications. The object remains
* alive and may be re-used by calling reset() to use the same location or
-* reset(const QString &) to give it a new location.
+* reset(const TQString &) to give it a new location.
*
* @section Tickle handling.
*
@@ -174,10 +174,10 @@ Q_OBJECT
friend class SyncAction;
public:
/** A list of DBInfo structures. */
- typedef QValueList<struct DBInfo> DBInfoList;
+ typedef TQValueList<struct DBInfo> DBInfoList;
/** Constructor. Use reset() to start looking for a device. */
- KPilotLink( QObject *parent = 0, const char *name = 0 );
+ KPilotLink( TQObject *parent = 0, const char *name = 0 );
/** Destructor. This rudely interrupts any communication in progress.
* It is best to call endOfSync() or finishSync() before destroying
@@ -187,7 +187,7 @@ public:
/** Provides a human-readable status string. */
- virtual QString statusString() const = 0;
+ virtual TQString statusString() const = 0;
/**
* True if HotSync has been started but not finished yet
@@ -204,7 +204,7 @@ public:
* Whichever is being used, this function returns its
* name in a human-readable form.
*/
- QString pilotPath() const
+ TQString pilotPath() const
{
return fPilotPath;
}
@@ -217,13 +217,13 @@ public:
* @see reset()
* @see pilotPath()
*/
- virtual void reset(const QString &pilotPath) = 0;
+ virtual void reset(const TQString &pilotPath) = 0;
/** Allows our class to receive custom events that our threads
* will be giving to us, including tickle timeouts and
* device communication events.
*/
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
/**
* Install the list of files (full paths!) named by @p l
@@ -232,7 +232,7 @@ public:
*
* @return the number of files successfully installed.
*/
- unsigned int installFiles(const QStringList &l, const bool deleteFiles);
+ unsigned int installFiles(const TQStringList &l, const bool deleteFiles);
/**
* Write a log entry to the handheld. If @p log is true,
@@ -241,7 +241,7 @@ public:
* log (with a physical device, that is what appears on
* screen at the end of a sync).
*/
- void addSyncLogEntry(const QString &entry,bool log=true);
+ void addSyncLogEntry(const TQString &entry,bool log=true);
/**
* Find a database with the given @p name (and optionally,
@@ -266,7 +266,7 @@ public:
*
* @return @c true on success
*/
- virtual bool retrieveDatabase(const QString &path, struct DBInfo *db) = 0;
+ virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db) = 0;
/**
* Fill the DBInfo structure @p db with information about
@@ -300,12 +300,12 @@ public:
* @note ownership of the database object is given to the caller,
* who must delete the object in time.
*/
- virtual PilotDatabase *database( const QString &name ) = 0;
+ virtual PilotDatabase *database( const TQString &name ) = 0;
/**
* Return a database object for manipulating the database with
* the name stored in the DBInfo structure @p info . The default
- * version goes through method database( const QString & ), above.
+ * version goes through method database( const TQString & ), above.
*
* @return pointer to database object, or 0 on error.
* @note ownership of the database object is given to the caller.
@@ -387,17 +387,17 @@ signals:
void timeout();
/** Signal that a message has been written to the sync log. */
- void logMessage(const QString &);
+ void logMessage(const TQString &);
/** Signal that an error has occurred, for logging. */
- void logError(const QString &);
+ void logError(const TQString &);
/**
* Signal that progress has been made, for logging purposes.
* @p p is the percentage completed (0 <= s <= 100).
* The string @p s is logged as well, if non-Null.
*/
- void logProgress(const QString &s, int p);
+ void logProgress(const TQString &s, int p);
/**
* Emitted once the user information has been read and
@@ -429,7 +429,7 @@ protected:
* Usually /dev/pilot, /dev/ttySx, or /dev/usb/x. May be
* a filesystem path for local links.
*/
- QString fPilotPath;
+ TQString fPilotPath;
/**
* Start tickling the Handheld (every few seconds). This
@@ -453,7 +453,7 @@ protected:
* @p f is used; in addition, if @p deleteFile is true remove
* the source file. Returns @c true if the install succeeded.
*/
- virtual bool installFile( const QString &f, const bool deleteFile ) = 0;
+ virtual bool installFile( const TQString &f, const bool deleteFile ) = 0;
/**
* Notify the Pilot user that a conduit is running now.
@@ -477,7 +477,7 @@ protected:
* Actually write an entry to the device link. The message
* @p s must be guaranteed non-empty.
*/
- virtual void addSyncLogEntryImpl( const QString &s ) = 0;
+ virtual void addSyncLogEntryImpl( const TQString &s ) = 0;
/**
* User information structure. Should be filled in when a sync
@@ -494,7 +494,7 @@ protected:
private:
bool fTickleDone;
- QThread *fTickleThread;
+ TQThread *fTickleThread;
} ;
diff --git a/kpilot/lib/kpilotlocallink.cc b/kpilot/lib/kpilotlocallink.cc
index c3af1d342..8834b4a81 100644
--- a/kpilot/lib/kpilotlocallink.cc
+++ b/kpilot/lib/kpilotlocallink.cc
@@ -47,10 +47,10 @@
#include <pi-file.h>
#include <pi-buffer.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qthread.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqthread.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -65,8 +65,8 @@
#include "kpilotlocallink.moc"
-typedef QPair<QString, struct DBInfo> DatabaseDescriptor;
-typedef QValueList<DatabaseDescriptor> DatabaseDescriptorList;
+typedef QPair<TQString, struct DBInfo> DatabaseDescriptor;
+typedef TQValueList<DatabaseDescriptor> DatabaseDescriptorList;
class KPilotLocalLink::Private
{
@@ -74,13 +74,13 @@ public:
DatabaseDescriptorList fDBs;
} ;
-unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &info, const QString &path )
+unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &info, const TQString &path )
{
FUNCTIONSETUP;
info.fDBs.clear();
- QDir d(path);
+ TQDir d(path);
if (!d.exists())
{
// Perhaps return an error?
@@ -90,16 +90,16 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &
// Use this to fake indexes in the list of DBInfo structs
unsigned int counter = 0;
- QStringList dbs = d.entryList( CSL1("*.pdb"), QDir::Files | QDir::NoSymLinks | QDir::Readable );
- for ( QStringList::ConstIterator i = dbs.begin(); i != dbs.end() ; ++i)
+ TQStringList dbs = d.entryList( CSL1("*.pdb"), TQDir::Files | TQDir::NoSymLinks | TQDir::Readable );
+ for ( TQStringList::ConstIterator i = dbs.begin(); i != dbs.end() ; ++i)
{
struct DBInfo dbi;
// Remove the trailing 4 characters
- QString dbname = (*i);
+ TQString dbname = (*i);
dbname.remove(dbname.length()-4,4);
- QString dbnamecheck = (*i).left((*i).findRev(CSL1(".pdb")));
+ TQString dbnamecheck = (*i).left((*i).findRev(CSL1(".pdb")));
Q_ASSERT(dbname == dbnamecheck);
if (PilotLocalDatabase::infoFromFile( path + CSL1("/") + (*i), &dbi))
@@ -118,7 +118,7 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &
}
-KPilotLocalLink::KPilotLocalLink( QObject *parent, const char *name ) :
+KPilotLocalLink::KPilotLocalLink( TQObject *parent, const char *name ) :
KPilotLink(parent,name),
fReady(false),
d( new Private )
@@ -132,7 +132,7 @@ KPilotLocalLink::~KPilotLocalLink()
KPILOT_DELETE(d);
}
-/* virtual */ QString KPilotLocalLink::statusString() const
+/* virtual */ TQString KPilotLocalLink::statusString() const
{
return fReady ? CSL1("Ready") : CSL1("Waiting") ;
}
@@ -142,7 +142,7 @@ KPilotLocalLink::~KPilotLocalLink()
return fReady;
}
-/* virtual */ void KPilotLocalLink::reset( const QString &p )
+/* virtual */ void KPilotLocalLink::reset( const TQString &p )
{
FUNCTIONSETUP;
fPath = p;
@@ -152,12 +152,12 @@ KPilotLocalLink::~KPilotLocalLink()
/* virtual */ void KPilotLocalLink::reset()
{
FUNCTIONSETUP;
- QFileInfo info( fPath );
+ TQFileInfo info( fPath );
fReady = !fPath.isEmpty() && info.exists() && info.isDir() ;
if (fReady)
{
findAvailableDatabases(*d, fPath);
- QTimer::singleShot(500,this,SLOT(ready()));
+ TQTimer::singleShot(500,this,TQT_SLOT(ready()));
}
else
{
@@ -235,7 +235,7 @@ KPilotLocalLink::~KPilotLocalLink()
return -1;
}
- QString desiredName = Pilot::fromPilot(name);
+ TQString desiredName = Pilot::fromPilot(name);
DEBUGKPILOT << fname << ": Looking for DB " << desiredName << endl;
for ( DatabaseDescriptorList::ConstIterator i = d->fDBs.at(index);
i != d->fDBs.end(); ++i)
@@ -260,19 +260,19 @@ KPilotLocalLink::~KPilotLocalLink()
return -1;
}
-/* virtual */ void KPilotLocalLink::addSyncLogEntryImpl(QString const &s)
+/* virtual */ void KPilotLocalLink::addSyncLogEntryImpl(TQString const &s)
{
FUNCTIONSETUP;
DEBUGKPILOT << fname << ": " << s << endl ;
}
-/* virtual */ bool KPilotLocalLink::installFile(QString const &path, bool deletefile)
+/* virtual */ bool KPilotLocalLink::installFile(TQString const &path, bool deletefile)
{
FUNCTIONSETUP;
- QFileInfo srcInfo(path);
- QString canonicalSrcPath = srcInfo.dir().canonicalPath() + CSL1("/") + srcInfo.fileName() ;
- QString canonicalDstPath = fPath + CSL1("/") + srcInfo.fileName();
+ TQFileInfo srcInfo(path);
+ TQString canonicalSrcPath = srcInfo.dir().canonicalPath() + CSL1("/") + srcInfo.fileName() ;
+ TQString canonicalDstPath = fPath + CSL1("/") + srcInfo.fileName();
if (canonicalSrcPath == canonicalDstPath)
{
@@ -293,18 +293,18 @@ KPilotLocalLink::~KPilotLocalLink()
return true;
}
-/* virtual */ bool KPilotLocalLink::retrieveDatabase( const QString &path, struct DBInfo *db )
+/* virtual */ bool KPilotLocalLink::retrieveDatabase( const TQString &path, struct DBInfo *db )
{
FUNCTIONSETUP;
- QString dbname = Pilot::fromPilot(db->name) + CSL1(".pdb") ;
- QString sourcefile = fPath + CSL1("/") + dbname ;
- QString destfile = path ;
+ TQString dbname = Pilot::fromPilot(db->name) + CSL1(".pdb") ;
+ TQString sourcefile = fPath + CSL1("/") + dbname ;
+ TQString destfile = path ;
DEBUGKPILOT << fname << ": src=" << sourcefile << endl;
DEBUGKPILOT << fname << ": dst=" << destfile << endl;
- QFile in( sourcefile );
+ TQFile in( sourcefile );
if ( !in.exists() )
{
WARNINGKPILOT << "Source file " << sourcefile << " doesn't exist." << endl;
@@ -316,7 +316,7 @@ KPilotLocalLink::~KPilotLocalLink()
return false;
}
- QFile out( destfile );
+ TQFile out( destfile );
if ( !out.open( IO_WriteOnly | IO_Truncate | IO_Raw ) )
{
WARNINGKPILOT << "Can't write destination file " << destfile << endl;
@@ -350,7 +350,7 @@ KPilotLink::DBInfoList KPilotLocalLink::getDBList( int, int )
}
-/* virtual */ PilotDatabase *KPilotLocalLink::database( const QString &name )
+/* virtual */ PilotDatabase *KPilotLocalLink::database( const TQString &name )
{
FUNCTIONSETUP;
return new PilotLocalDatabase( fPath, name );
diff --git a/kpilot/lib/kpilotlocallink.h b/kpilot/lib/kpilotlocallink.h
index f18556b3c..ca37bb57d 100644
--- a/kpilot/lib/kpilotlocallink.h
+++ b/kpilot/lib/kpilotlocallink.h
@@ -44,12 +44,12 @@ class KDE_EXPORT KPilotLocalLink : public KPilotLink
{
Q_OBJECT
public:
- KPilotLocalLink( QObject *parent=0L, const char *name=0L );
+ KPilotLocalLink( TQObject *parent=0L, const char *name=0L );
virtual ~KPilotLocalLink();
- virtual QString statusString() const;
+ virtual TQString statusString() const;
virtual bool isConnected() const;
- virtual void reset( const QString & );
+ virtual void reset( const TQString & );
virtual void close();
virtual void reset();
virtual bool tickle();
@@ -59,16 +59,16 @@ public:
virtual int getNextDatabase(int index,struct DBInfo *);
virtual int findDatabase(const char *name, struct DBInfo*,
int index=0, unsigned long type=0, unsigned long creator=0);
- virtual bool retrieveDatabase(const QString &path, struct DBInfo *db);
+ virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db);
virtual DBInfoList getDBList(int cardno=0, int flags=dlpDBListRAM);
- virtual PilotDatabase *database( const QString &name );
+ virtual PilotDatabase *database( const TQString &name );
public slots:
void ready();
protected:
- virtual bool installFile(const QString &, const bool deleteFile);
- virtual void addSyncLogEntryImpl( const QString &s );
+ virtual bool installFile(const TQString &, const bool deleteFile);
+ virtual void addSyncLogEntryImpl( const TQString &s );
virtual int pilotSocket() const
{
return -1;
@@ -76,7 +76,7 @@ protected:
protected:
bool fReady;
- QString fPath;
+ TQString fPath;
class Private;
Private *d;
@@ -87,7 +87,7 @@ protected:
*
* @return Number of database in @p path.
*/
- unsigned int findAvailableDatabases( Private &, const QString &path );
+ unsigned int findAvailableDatabases( Private &, const TQString &path );
} ;
diff --git a/kpilot/lib/options.cc b/kpilot/lib/options.cc
index 0eb1babf7..be2b5e6e2 100644
--- a/kpilot/lib/options.cc
+++ b/kpilot/lib/options.cc
@@ -33,7 +33,7 @@
#include <iostream>
-#include <qsize.h>
+#include <tqsize.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -55,11 +55,11 @@ static const char debug_spaces[61] =
" ";
-QString rtExpand(const QString &s, Qt::TextFormat richText)
+TQString rtExpand(const TQString &s, Qt::TextFormat richText)
{
if (richText == Qt::RichText)
{
- QString t(s);
+ TQString t(s);
return t.replace(CSL1("\n"), CSL1("<br/>\n"));
}
else
@@ -69,17 +69,17 @@ QString rtExpand(const QString &s, Qt::TextFormat richText)
}
-QDateTime readTm(const struct tm &t)
+TQDateTime readTm(const struct tm &t)
{
- QDateTime dt;
- dt.setDate(QDate(1900 + t.tm_year, t.tm_mon + 1, t.tm_mday));
- dt.setTime(QTime(t.tm_hour, t.tm_min, t.tm_sec));
+ TQDateTime dt;
+ dt.setDate(TQDate(1900 + t.tm_year, t.tm_mon + 1, t.tm_mday));
+ dt.setTime(TQTime(t.tm_hour, t.tm_min, t.tm_sec));
return dt;
}
-struct tm writeTm(const QDateTime &dt)
+struct tm writeTm(const TQDateTime &dt)
{
struct tm t;
@@ -102,9 +102,9 @@ struct tm writeTm(const QDateTime &dt)
-struct tm writeTm(const QDate &d)
+struct tm writeTm(const TQDate &d)
{
- QDateTime dt(d);
+ TQDateTime dt(d);
return writeTm(dt);
}
diff --git a/kpilot/lib/options.h b/kpilot/lib/options.h
index 6e036e82d..9fe0f8be2 100644
--- a/kpilot/lib/options.h
+++ b/kpilot/lib/options.h
@@ -36,9 +36,9 @@
#include "config.h"
-#include <qglobal.h>
-#include <qnamespace.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqnamespace.h>
+#include <tqstring.h>
#if (QT_VERSION < 0x030300)
#error "This is KPilot for KDE3.5 and won't compile with Qt < 3.3.0"
@@ -61,9 +61,9 @@
#include <iostream>
using namespace std;
-inline std::ostream& operator <<(std::ostream &o, const QString &s)
+inline std::ostream& operator <<(std::ostream &o, const TQString &s)
{ if (s.isEmpty()) return o<<"<empty>"; else return o<<s.latin1(); }
-inline std::ostream& operator <<(std::ostream &o, const QCString &s)
+inline std::ostream& operator <<(std::ostream &o, const TQCString &s)
{ if (s.isEmpty()) return o<<"<empty>"; else return o << *s; }
@@ -144,19 +144,19 @@ inline std::ostream& operator <<(std::ostream &o, const KPilotDepthCount &d)
// Function to expand newlines in rich text to <br>\n
-QString rtExpand(const QString &s, Qt::TextFormat richText);
+TQString rtExpand(const TQString &s, Qt::TextFormat richText);
/**
* Convert a struct tm from the pilot-link package to a QDateTime
*/
-KDE_EXPORT QDateTime readTm(const struct tm &t);
+KDE_EXPORT TQDateTime readTm(const struct tm &t);
/**
- * Convert a QDateTime to a struct tm for use with the pilot-link package
+ * Convert a TQDateTime to a struct tm for use with the pilot-link package
*/
-KDE_EXPORT struct tm writeTm(const QDateTime &dt);
-KDE_EXPORT struct tm writeTm(const QDate &dt);
+KDE_EXPORT struct tm writeTm(const TQDateTime &dt);
+KDE_EXPORT struct tm writeTm(const TQDate &dt);
// Some layout macros
@@ -180,7 +180,7 @@ KDE_EXPORT struct tm writeTm(const QDate &dt);
// variant is to handle plurals and is wrong, but unavoidable.
//
//
-#define TODO_I18N(a) QString::fromLatin1(a)
+#define TODO_I18N(a) TQString::fromLatin1(a)
#define TODO_I18N_P(a,b,c) ((c>1) ? a : b)
// Handle some cases for QT_NO_CAST_ASCII and NO_ASCII_CAST.
@@ -194,6 +194,6 @@ KDE_EXPORT struct tm writeTm(const QDate &dt);
// with constant strings.
//
//
-#define CSL1(a) QString::fromLatin1(a "")
+#define CSL1(a) TQString::fromLatin1(a "")
#endif
diff --git a/kpilot/lib/pilot.cc b/kpilot/lib/pilot.cc
index 2585445c1..6a1267a9b 100644
--- a/kpilot/lib/pilot.cc
+++ b/kpilot/lib/pilot.cc
@@ -31,8 +31,8 @@
#include "options.h"
-#include <qtextcodec.h>
-#include <qmutex.h>
+#include <tqtextcodec.h>
+#include <tqmutex.h>
#include <kcharsets.h>
#include <kglobal.h>
@@ -44,41 +44,41 @@
namespace Pilot
{
-static QTextCodec *codec = 0L;
-static QMutex* mutex = 0L;
+static TQTextCodec *codec = 0L;
+static TQMutex* mutex = 0L;
-QString fromPilot( const char *c, int len )
+TQString fromPilot( const char *c, int len )
{
mutex->lock();
- QString str = codec->toUnicode(c,len);
+ TQString str = codec->toUnicode(c,len);
mutex->unlock();
return str;
}
-QString fromPilot( const char *c )
+TQString fromPilot( const char *c )
{
mutex->lock();
- QString str = codec->toUnicode(c);
+ TQString str = codec->toUnicode(c);
mutex->unlock();
return str;
}
-QCString toPilot( const QString &s )
+TQCString toPilot( const TQString &s )
{
mutex->lock();
- QCString str = codec->fromUnicode(s);
+ TQCString str = codec->fromUnicode(s);
mutex->unlock();
return str;
}
-int toPilot( const QString &s, char *buf, int len)
+int toPilot( const TQString &s, char *buf, int len)
{
mutex->lock();
// See toPilot() below.
memset( buf, 0, len );
int used = len;
- QCString cbuf = codec->fromUnicode(s,used);
+ TQCString cbuf = codec->fromUnicode(s,used);
if (used > len)
{
used=len;
@@ -88,7 +88,7 @@ int toPilot( const QString &s, char *buf, int len)
return used;
}
-int toPilot( const QString &s, unsigned char *buf, int len)
+int toPilot( const TQString &s, unsigned char *buf, int len)
{
mutex->lock();
// Clear the buffer
@@ -96,7 +96,7 @@ int toPilot( const QString &s, unsigned char *buf, int len)
// Convert to 8-bit encoding
int used = len;
- QCString cbuf = codec->fromUnicode(s,used);
+ TQCString cbuf = codec->fromUnicode(s,used);
// Will it fit in the buffer?
if (used > len)
@@ -113,12 +113,12 @@ int toPilot( const QString &s, unsigned char *buf, int len)
return used;
}
-bool setupPilotCodec(const QString &s)
+bool setupPilotCodec(const TQString &s)
{
FUNCTIONSETUP;
- mutex = new QMutex();
+ mutex = new TQMutex();
mutex->lock();
- QString encoding(KGlobal::charsets()->encodingForName(s));
+ TQString encoding(KGlobal::charsets()->encodingForName(s));
DEBUGKPILOT << fname << ": Using codec name " << s << endl;
DEBUGKPILOT << fname << ": Creating codec " << encoding << endl;
@@ -135,20 +135,20 @@ bool setupPilotCodec(const QString &s)
return codec;
}
-QString codecName()
+TQString codecName()
{
- return QString::fromLatin1(codec->name());
+ return TQString::fromLatin1(codec->name());
}
-QString category(const struct CategoryAppInfo *info, unsigned int i)
+TQString category(const struct CategoryAppInfo *info, unsigned int i)
{
if (!info || (i>=CATEGORY_COUNT))
{
- return QString::null;
+ return TQString::null;
}
mutex->lock();
- QString str = codec->toUnicode(info->name[i],
+ TQString str = codec->toUnicode(info->name[i],
MIN(strlen(info->name[i]), CATEGORY_SIZE-1));
mutex->unlock();
return str;
@@ -156,7 +156,7 @@ QString category(const struct CategoryAppInfo *info, unsigned int i)
int findCategory(const struct CategoryAppInfo *info,
- const QString &selectedCategory,
+ const TQString &selectedCategory,
bool unknownIsUnfiled)
{
FUNCTIONSETUP;
@@ -194,7 +194,7 @@ int findCategory(const struct CategoryAppInfo *info,
}
int insertCategory(struct CategoryAppInfo *info,
- const QString &label,
+ const TQString &label,
bool unknownIsUnfiled)
{
FUNCTIONSETUP;
diff --git a/kpilot/lib/pilot.h b/kpilot/lib/pilot.h
index d4fec82b2..3ac2918bd 100644
--- a/kpilot/lib/pilot.h
+++ b/kpilot/lib/pilot.h
@@ -35,9 +35,9 @@
#include <pi-buffer.h>
#include <pi-dlp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "pilotLinkVersion.h"
@@ -77,38 +77,38 @@ namespace Pilot
/** Maximum size (in bytes) of a record's data */
static const int MAX_RECORD_SIZE = 65535;
- typedef QValueList<recordid_t> RecordIDList;
+ typedef TQValueList<recordid_t> RecordIDList;
/** Static translation function that maps handheld native (8 bit,
* usually latin1 but sometimes someting else) encoded data to
* a Unicode string. Converts the @p len characters in @p c
* to a Unicode string.
*/
- QString fromPilot( const char *c, int len );
+ TQString fromPilot( const char *c, int len );
/** Static translation function mapping a NUL-terminated
* string from the handheld's encoding to UTF-8.
* @param c the NUL-terminated string to decode
- * @return QString (UTF-8) value of @p c
+ * @return TQString (UTF-8) value of @p c
* @note NUL-terminated strings are rare on the handheld.
*/
- QString fromPilot( const char *c );
+ TQString fromPilot( const char *c );
- /** Static translation function that maps a QString onto the
+ /** Static translation function that maps a TQString onto the
* native 8 bit encoding of the handheld. Writes the result into
* the buffer @p buf which has size @p len. Returns the length
* of the result. Zero-fills the buffer as needed.
*/
- int toPilot( const QString &s, char *buf, int len);
- int toPilot( const QString &s, unsigned char *buf, int len);
+ int toPilot( const TQString &s, char *buf, int len);
+ int toPilot( const TQString &s, unsigned char *buf, int len);
- /** Static translation function that maps a QString onto the
+ /** Static translation function that maps a TQString onto the
* native 8 bit encoding of the handheld.
*
* @param s String to encode
* @return Encoded string in a QCString
*/
- QCString toPilot( const QString &s );
+ TQCString toPilot( const TQString &s );
/** Create a codec for translating handheld native 8 bit to Unicode,
* using the given codec @p name -- this will often be latin1, but
@@ -117,10 +117,10 @@ namespace Pilot
*
* @return @c true on success, @c false otherwise
*/
- bool setupPilotCodec(const QString &name);
+ bool setupPilotCodec(const TQString &name);
/** Returns the name of the codec being used. */
- QString codecName();
+ TQString codecName();
/** For debugging, display category names for the given AppInfo
* structure. Called by dump(). You must pass a valid reference.
@@ -140,12 +140,12 @@ namespace Pilot
return ((unsigned int)c<CATEGORY_COUNT);
}
- /** Returns the QString for the requested category @p i
- * in the category structure @p info. Returns @c QString::null
+ /** Returns the TQString for the requested category @p i
+ * in the category structure @p info. Returns @c TQString::null
* on error (bad pointer or bad category number). May also
- * return @c QString::null if the category name is empty.
+ * return @c TQString::null if the category name is empty.
*/
- inline QString categoryName(const struct CategoryAppInfo *info, unsigned int i)
+ inline TQString categoryName(const struct CategoryAppInfo *info, unsigned int i)
{
if ( ( i < CATEGORY_COUNT ) && ( info->name[i][0] ) )
{
@@ -157,7 +157,7 @@ namespace Pilot
}
else
{
- return QString::null;
+ return TQString::null;
}
}
@@ -166,16 +166,16 @@ namespace Pilot
* all sixteen categories -- empty category names on the
* handheld are skipped.
*/
- inline QStringList categoryNames(const struct CategoryAppInfo *info)
+ inline TQStringList categoryNames(const struct CategoryAppInfo *info)
{
- QStringList l;
+ TQStringList l;
if (!info)
{
return l;
}
for (unsigned int i=0; i<CATEGORY_COUNT; ++i)
{
- QString s = categoryName(info,i);
+ TQString s = categoryName(info,i);
if (!s.isEmpty())
{
l.append(s);
@@ -198,7 +198,7 @@ namespace Pilot
* @p unknownIsUnfiled is true.
*
*/
- int findCategory(const struct CategoryAppInfo *info, const QString &name, bool unknownIsUnfiled);
+ int findCategory(const struct CategoryAppInfo *info, const TQString &name, bool unknownIsUnfiled);
/** Search for the given category @p name in the list
* of categories; returns the category number. If @p unknownIsUnfiled
@@ -218,7 +218,7 @@ namespace Pilot
* are all full.
*
*/
- int insertCategory(struct CategoryAppInfo *info, const QString &label, bool unknownIsUnfiled);
+ int insertCategory(struct CategoryAppInfo *info, const TQString &label, bool unknownIsUnfiled);
/** The handheld also holds data about each database
* in a DBInfo structure; check if the database described
diff --git a/kpilot/lib/pilotAddress.cc b/kpilot/lib/pilotAddress.cc
index 418c705b4..f12e9cc50 100644
--- a/kpilot/lib/pilotAddress.cc
+++ b/kpilot/lib/pilotAddress.cc
@@ -35,8 +35,8 @@
#include <stdlib.h>
#include <assert.h>
-#include <qnamespace.h>
-#include <qstringlist.h>
+#include <tqnamespace.h>
+#include <tqstringlist.h>
#include "pilotAddress.h"
@@ -91,7 +91,7 @@ void PilotAddressInfo::resetToDefault()
}
}
-QString PilotAddressInfo::phoneLabel(EPhoneType i) const
+TQString PilotAddressInfo::phoneLabel(EPhoneType i) const
{
if (i<=eMobile)
{
@@ -99,7 +99,7 @@ QString PilotAddressInfo::phoneLabel(EPhoneType i) const
}
else
{
- return QString();
+ return TQString();
}
}
@@ -169,9 +169,9 @@ unsigned int PhoneSlot::toField() const
}
}
-PhoneSlot::operator QString() const
+PhoneSlot::operator TQString() const
{
- return QString("%1,%2").arg(toOffset()).arg(toField());
+ return TQString("%1,%2").arg(toOffset()).arg(toField());
}
#define MAXFIELDS 19
@@ -273,13 +273,13 @@ PilotAddress::~PilotAddress()
free_Address(&fAddressInfo);
}
-QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const
+TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const
{
- QString text, tmp;
+ TQString text, tmp;
- QString par = (richText==Qt::RichText) ?CSL1("<p>"): QString();
- QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString();
+ TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
@@ -290,11 +290,11 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te
}
tmp = richText ? CSL1("<b><big>%1 %2</big></b>") : CSL1("%1 %2");
- QString firstName = getField(entryFirstname);
+ TQString firstName = getField(entryFirstname);
if (firstName.isEmpty())
{
// So replace placeholder for first name (%1) with empty
- tmp = tmp.arg(QString());
+ tmp = tmp.arg(TQString());
}
else
{
@@ -392,7 +392,7 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te
// category
if (info)
{
- QString categoryName = info->categoryName( category() );
+ TQString categoryName = info->categoryName( category() );
if (!categoryName.isEmpty())
{
text += par;
@@ -413,16 +413,16 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te
return text;
}
-QStringList PilotAddress::getEmails() const
+TQStringList PilotAddress::getEmails() const
{
- QStringList list;
+ TQStringList list;
for ( PhoneSlot i = PhoneSlot::begin(); i.isValid(); ++i)
{
PilotAddressInfo::EPhoneType t = getPhoneType( i );
if ( t == PilotAddressInfo::eEmail )
{
- QString s = getField(i.toField());
+ TQString s = getField(i.toField());
if (!s.isEmpty())
{
list.append(s);
@@ -433,10 +433,10 @@ QStringList PilotAddress::getEmails() const
return list;
}
-void PilotAddress::setEmails(const QStringList &list)
+void PilotAddress::setEmails(const TQStringList &list)
{
FUNCTIONSETUPL(4);
- QString test;
+ TQString test;
// clear all e-mails first
for ( PhoneSlot i = PhoneSlot::begin(); i.isValid(); ++i )
@@ -444,14 +444,14 @@ void PilotAddress::setEmails(const QStringList &list)
PilotAddressInfo::EPhoneType t = getPhoneType( i );
if (t == PilotAddressInfo::eEmail)
{
- setField(i.toField(), QString() );
+ setField(i.toField(), TQString() );
}
}
- for(QStringList::ConstIterator listIter = list.begin();
+ for(TQStringList::ConstIterator listIter = list.begin();
listIter != list.end(); ++listIter)
{
- QString email = *listIter;
+ TQString email = *listIter;
if (!setPhoneField(PilotAddressInfo::eEmail, email, NoFlags).isValid())
{
WARNINGKPILOT << "Email accounts overflowed, silently dropped." << endl;
@@ -459,7 +459,7 @@ void PilotAddress::setEmails(const QStringList &list)
}
}
-QString PilotAddress::getField(int field) const
+TQString PilotAddress::getField(int field) const
{
if ( (entryLastname <= field) && (field <= entryNote) )
{
@@ -467,7 +467,7 @@ QString PilotAddress::getField(int field) const
}
else
{
- return QString();
+ return TQString();
}
}
@@ -487,7 +487,7 @@ PhoneSlot PilotAddress::_getNextEmptyPhoneSlot() const
}
PhoneSlot PilotAddress::setPhoneField(PilotAddressInfo::EPhoneType type,
- const QString &field,
+ const TQString &field,
PhoneHandlingFlags flags)
{
FUNCTIONSETUPL(4);
@@ -531,7 +531,7 @@ PhoneSlot PilotAddress::_findPhoneFieldSlot(PilotAddressInfo::EPhoneType t) cons
return PhoneSlot();
}
-QString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const
+TQString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const
{
FUNCTIONSETUPL(4);
PhoneSlot fieldSlot = _findPhoneFieldSlot(type);
@@ -541,7 +541,7 @@ QString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const
return getField(fieldSlot.toField());
}
- return QString();
+ return TQString();
}
PhoneSlot PilotAddress::getShownPhone() const
@@ -599,7 +599,7 @@ PilotAddressInfo::EPhoneType PilotAddress::getPhoneType( const PhoneSlot &field
}
}
-void PilotAddress::setField(int field, const QString &text)
+void PilotAddress::setField(int field, const TQString &text)
{
FUNCTIONSETUPL(4);
// This will have either been created with unpack_Address, and/or will
diff --git a/kpilot/lib/pilotAddress.h b/kpilot/lib/pilotAddress.h
index d6dd20e45..5bd0a1e0c 100644
--- a/kpilot/lib/pilotAddress.h
+++ b/kpilot/lib/pilotAddress.h
@@ -33,7 +33,7 @@
#include <pi-macros.h>
#include <pi-address.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
#include "pilotRecord.h"
#include "pilotAppInfo.h"
@@ -119,7 +119,7 @@ public:
return (entryPhone1 <= i) && (i <= entryPhone5);
}
- operator QString() const;
+ operator TQString() const;
private:
int i;
} ;
@@ -150,7 +150,7 @@ public:
eNone=-1
} ;
- QString phoneLabel(EPhoneType i) const;
+ TQString phoneLabel(EPhoneType i) const;
} ;
/** @brief A wrapper class around the Address struct provided by pi-address.h
@@ -202,7 +202,7 @@ public:
* is used to figure out the phone labels; if it is NULL then bogus labels are
* used to identify phone types.
*/
- QString getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const;
+ TQString getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const;
/**
* @param text set the field value
@@ -215,9 +215,9 @@ public:
* entryTitle, entryCustom1, entryCustom2, entryCustom3, entryCustom4,
* entryNote };
*/
- void setField(int field, const QString &text);
+ void setField(int field, const TQString &text);
/** Set a field @p i to a given text value. Uses the phone slots only. */
- void setField(const PhoneSlot &i, const QString &t)
+ void setField(const PhoneSlot &i, const TQString &t)
{
if (i.isValid())
{
@@ -225,22 +225,22 @@ public:
}
}
- /** Returns the text value of a given field @p field (or QString::null
+ /** Returns the text value of a given field @p field (or TQString::null
* if there is no such field).
*/
- QString getField(int field) const;
+ TQString getField(int field) const;
/** Returns the value of the phone field @p i . */
- QString getField(const PhoneSlot &i) const
+ TQString getField(const PhoneSlot &i) const
{
- return i.isValid() ? getField(i.toField()) : QString();
+ return i.isValid() ? getField(i.toField()) : TQString();
}
/**
* Return list of all email addresses. This will search through our "phone"
* fields and will return only those which are e-mail addresses.
*/
- QStringList getEmails() const;
- void setEmails(const QStringList &emails);
+ TQStringList getEmails() const;
+ void setEmails(const TQStringList &emails);
enum PhoneHandlingFlags
{
@@ -254,7 +254,7 @@ public:
* for extra phone fields
* @return the field associated with the type
*/
- QString getPhoneField(PilotAddressInfo::EPhoneType type) const;
+ TQString getPhoneField(PilotAddressInfo::EPhoneType type) const;
/**
* @param type is the type of phone
@@ -265,7 +265,7 @@ public:
* with the field, else it will always search for the first available slot
* @return index of the field that this information was set to
*/
- PhoneSlot setPhoneField(PilotAddressInfo::EPhoneType type, const QString &value, PhoneHandlingFlags flags);
+ PhoneSlot setPhoneField(PilotAddressInfo::EPhoneType type, const TQString &value, PhoneHandlingFlags flags);
/**
* Returns the slot of the phone number
diff --git a/kpilot/lib/pilotAppInfo.cc b/kpilot/lib/pilotAppInfo.cc
index e8caf6234..5edc57160 100644
--- a/kpilot/lib/pilotAppInfo.cc
+++ b/kpilot/lib/pilotAppInfo.cc
@@ -62,7 +62,7 @@ PilotAppInfoBase::~PilotAppInfoBase()
}
}
-bool PilotAppInfoBase::setCategoryName(unsigned int i, const QString &s)
+bool PilotAppInfoBase::setCategoryName(unsigned int i, const TQString &s)
{
if ( (i>=Pilot::CATEGORY_COUNT) || // bad category number
(!categoryInfo())) // Nowhere to write to
diff --git a/kpilot/lib/pilotAppInfo.h b/kpilot/lib/pilotAppInfo.h
index d5db9e358..b14cf0ace 100644
--- a/kpilot/lib/pilotAppInfo.h
+++ b/kpilot/lib/pilotAppInfo.h
@@ -96,15 +96,15 @@ public:
return fLen;
} ;
- /** @see findCategory(const QString &name, bool unknownIsUnfiled, struct CategoryAppInfo *info). */
- inline int findCategory(const QString &name, bool unknownIsUnfiled = false) const
+ /** @see findCategory(const TQString &name, bool unknownIsUnfiled, struct CategoryAppInfo *info). */
+ inline int findCategory(const TQString &name, bool unknownIsUnfiled = false) const
{
return Pilot::findCategory(fC,name,unknownIsUnfiled);
} ;
- /** Gets a single category name. Returns QString::null if there is no
+ /** Gets a single category name. Returns TQString::null if there is no
* such category number @p i . */
- inline QString categoryName(unsigned int i) const
+ inline TQString categoryName(unsigned int i) const
{
return Pilot::categoryName(fC,i);
}
@@ -113,7 +113,7 @@ public:
* on failure, e.g. the index @p i was out of range or the category name
* was invalid. Category names that are too long are truncated to 15 characters.
*/
- bool setCategoryName(unsigned int i, const QString &s);
+ bool setCategoryName(unsigned int i, const TQString &s);
/** For debugging, display all the category names */
inline void dump() const
diff --git a/kpilot/lib/pilotDatabase.cc b/kpilot/lib/pilotDatabase.cc
index fd568b703..cc65895e7 100644
--- a/kpilot/lib/pilotDatabase.cc
+++ b/kpilot/lib/pilotDatabase.cc
@@ -34,7 +34,7 @@
#include <time.h> // Needed by pilot-link include
#include <pi-appinfo.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kglobal.h>
@@ -42,9 +42,9 @@
#include "pilotRecord.h"
static int creationCount = 0;
-static QStringList *createdNames = 0L;
+static TQStringList *createdNames = 0L;
-PilotDatabase::PilotDatabase(const QString &s) :
+PilotDatabase::PilotDatabase(const TQString &s) :
fDBOpen(false),
fName(s)
{
@@ -52,7 +52,7 @@ PilotDatabase::PilotDatabase(const QString &s) :
creationCount++;
if (!createdNames)
{
- createdNames = new QStringList();
+ createdNames = new TQStringList();
}
createdNames->append(s.isEmpty() ? CSL1("<empty>") : s);
}
diff --git a/kpilot/lib/pilotDatabase.h b/kpilot/lib/pilotDatabase.h
index 84c922ed4..82a6431d7 100644
--- a/kpilot/lib/pilotDatabase.h
+++ b/kpilot/lib/pilotDatabase.h
@@ -50,11 +50,11 @@
class KDE_EXPORT PilotDatabase
{
public:
- PilotDatabase(const QString &name = QString::null);
+ PilotDatabase(const TQString &name = TQString::null);
virtual ~PilotDatabase();
- QString name() const { return fName; } ;
+ TQString name() const { return fName; } ;
/**
* Debugging information: tally how many databases are created
@@ -90,7 +90,7 @@ public:
*/
virtual unsigned int recordCount() const=0;
- /** Returns a QValueList of all record ids in the database.
+ /** Returns a TQValueList of all record ids in the database.
This implementation is really bad. */
virtual Pilot::RecordIDList idList();
@@ -146,7 +146,7 @@ public:
* the database. Serial databases get Pilot:, local
* databases return the full path.
*/
- virtual QString dbPathName() const = 0;
+ virtual TQString dbPathName() const = 0;
/**
* Use this instead of RTTI to determine the type of a
@@ -170,7 +170,7 @@ protected:
private:
bool fDBOpen;
- QString fName;
+ TQString fName;
};
/** A template class for reading and interpreting a database. This removes
diff --git a/kpilot/lib/pilotDateEntry.cc b/kpilot/lib/pilotDateEntry.cc
index 4fa93eac6..d7844b897 100644
--- a/kpilot/lib/pilotDateEntry.cc
+++ b/kpilot/lib/pilotDateEntry.cc
@@ -31,9 +31,9 @@
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qnamespace.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqnamespace.h>
+#include <tqregexp.h>
#include <kglobal.h>
@@ -160,12 +160,12 @@ PilotDateEntry & PilotDateEntry::operator = (const PilotDateEntry & e)
} // end of assignment operator
-QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
{
- QString text, tmp;
- QString par = (richText==Qt::RichText) ?CSL1("<p>"):QString::null;
- QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString text, tmp;
+ TQString par = (richText==Qt::RichText) ?CSL1("<p>"):TQString::null;
+ TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
@@ -173,8 +173,8 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
text += tmp.arg(rtExpand(getDescription(), richText));
text += ps;
- QDateTime dt(readTm(getEventStart()));
- QString startDate(dt.toString(Qt::LocalDate));
+ TQDateTime dt(readTm(getEventStart()));
+ TQString startDate(dt.toString(Qt::LocalDate));
text+=par;
text+=i18n("Start date: %1").arg(startDate);
text+=ps;
@@ -188,7 +188,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
else
{
dt=readTm(getEventEnd());
- QString endDate(dt.toString(Qt::LocalDate));
+ TQString endDate(dt.toString(Qt::LocalDate));
text+=par;
text+=i18n("End date: %1").arg(endDate);
text+=ps;
@@ -204,7 +204,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
case advMinutes: tmp=tmp.arg(i18n("minutes")); break;
case advHours: tmp=tmp.arg(i18n("hours")); break;
case advDays: tmp=tmp.arg(i18n("days")); break;
- default: tmp=tmp.arg(QString::null); break;;
+ default: tmp=tmp.arg(TQString::null); break;;
}
text+=tmp;
text+=ps;
@@ -224,7 +224,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
case repeatMonthlyByDay:
case repeatMonthlyByDate: tmp=tmp.arg(i18n("month(s)")); break;
case repeatYearly: tmp=tmp.arg(i18n("year(s)")); break;
- default: tmp=tmp.arg(QString::null); break;
+ default: tmp=tmp.arg(TQString::null); break;
}
text+=tmp;
text+=br;
@@ -244,7 +244,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
if (getRepeatType()==repeatMonthlyByDay) text+=i18n("Repeating on the i-th day of week j")+br;
if (getRepeatType()==repeatMonthlyByDate) text+=i18n("Repeating on the n-th day of the month")+br;
// TODO: show the dayArray when repeating weekly
- /*QBitArray dayArray(7);
+ /*TQBitArray dayArray(7);
if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").arg(getRepeatDays
const int *days = dateEntry->getRepeatDays();
// Rotate the days of the week, since day numbers on the Pilot and
@@ -263,7 +263,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
text+=i18n("Exceptions:")+br;
for (int i = 0; i < getExceptionCount(); i++)
{
- QDate exdt=readTm(getExceptions()[i]).date();
+ TQDate exdt=readTm(getExceptions()[i]).date();
text+=exdt.toString(Qt::LocalDate);
text+=br;
}
@@ -282,19 +282,19 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
return text;
}
-QDateTime PilotDateEntry::dtStart() const
+TQDateTime PilotDateEntry::dtStart() const
{
FUNCTIONSETUP;
return readTm( getEventStart() );
}
-QDateTime PilotDateEntry::dtEnd() const
+TQDateTime PilotDateEntry::dtEnd() const
{
FUNCTIONSETUP;
return readTm( getEventEnd() );
}
-QDateTime PilotDateEntry::dtRepeatEnd() const
+TQDateTime PilotDateEntry::dtRepeatEnd() const
{
FUNCTIONSETUP;
return readTm( getRepeatEnd() );
@@ -402,25 +402,25 @@ void PilotDateEntry::setNoteP(const char *note, int l)
}
}
-void PilotDateEntry::setNote(const QString &s)
+void PilotDateEntry::setNote(const TQString &s)
{
- QCString t = Pilot::toPilot(s);
+ TQCString t = Pilot::toPilot(s);
setNoteP( t.data(),t.length() );
}
-void PilotDateEntry::setLocation(const QString &s)
+void PilotDateEntry::setLocation(const TQString &s)
{
- QString note = Pilot::fromPilot(getNoteP());
- QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n");
+ TQString note = Pilot::fromPilot(getNoteP());
+ TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n");
- // per QString docs, this covers null and 0 length
+ // per TQString docs, this covers null and 0 length
if( s.isEmpty() )
{
note.replace(rxp,"");
}
else
{
- QString location = "Location: " + s + "\n";
+ TQString location = "Location: " + s + "\n";
int pos = note.find(rxp);
if(pos >= 0)
@@ -435,18 +435,18 @@ void PilotDateEntry::setLocation(const QString &s)
}
}
-QString PilotDateEntry::getLocation() const
+TQString PilotDateEntry::getLocation() const
{
// Read the complete note here and not the filtered
// one from PilotDateEntry::getNote();
- QString note = Pilot::fromPilot(getNoteP());
- QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n");
+ TQString note = Pilot::fromPilot(getNoteP());
+ TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n");
int pos = note.find(rxp, 0);
if(pos >= 0)
{
- QString location = rxp.capturedTexts().first();
- rxp = QRegExp("^[Ll]ocation:[\\s|\t]*");
+ TQString location = rxp.capturedTexts().first();
+ rxp = TQRegExp("^[Ll]ocation:[\\s|\t]*");
location.replace(rxp,"");
location.replace("\n", "");
return location;
@@ -457,21 +457,21 @@ QString PilotDateEntry::getLocation() const
}
}
-void PilotDateEntry::setDescription(const QString &s)
+void PilotDateEntry::setDescription(const TQString &s)
{
- QCString t = Pilot::toPilot(s);
+ TQCString t = Pilot::toPilot(s);
setDescriptionP( t.data(),t.length() );
}
-QString PilotDateEntry::getNote() const
+TQString PilotDateEntry::getNote() const
{
- QString note = Pilot::fromPilot(getNoteP());
- QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n");
+ TQString note = Pilot::fromPilot(getNoteP());
+ TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n");
note.replace(rxp, "" );
return note;
}
-QString PilotDateEntry::getDescription() const
+TQString PilotDateEntry::getDescription() const
{
return Pilot::fromPilot(getDescriptionP());
}
diff --git a/kpilot/lib/pilotDateEntry.h b/kpilot/lib/pilotDateEntry.h
index d9d5db2a6..43601013d 100644
--- a/kpilot/lib/pilotDateEntry.h
+++ b/kpilot/lib/pilotDateEntry.h
@@ -34,9 +34,9 @@
#include <pi-macros.h>
#include <pi-datebook.h>
-#include <qbitarray.h>
-#include <qdatetime.h>
-#include <qnamespace.h>
+#include <tqbitarray.h>
+#include <tqdatetime.h>
+#include <tqnamespace.h>
#include "pilotRecord.h"
#include "pilotAppInfo.h"
@@ -94,7 +94,7 @@ public:
* If @p richText is true, then the text representation uses qt style
* tags as well.
*/
- QString getTextRepresentation(Qt::TextFormat richText);
+ TQString getTextRepresentation(Qt::TextFormat richText);
/** Is this appointment a "floating" appointment?
*
@@ -151,7 +151,7 @@ public:
* Floating appointments are those that have a day assigned, but no time
* in that day (birthday appointments are like that).
*/
- QDateTime dtStart() const;
+ TQDateTime dtStart() const;
/** Get the end time of this appointment. See dtEnd() for caveats. */
inline struct tm getEventEnd() const
@@ -177,7 +177,7 @@ public:
* Floating appointments are those that have a day assigned, but no time
* in that day (birthday appointments are like that).
*/
- QDateTime dtEnd() const;
+ TQDateTime dtEnd() const;
/** Does this appointment have an alarm set? On the Pilot, an event
* may have an alarm (or not). If it has one, it is also enabled and
@@ -235,7 +235,7 @@ public:
/** Returns the absolute date and time that the alarm should sound for
* this appointment.
*/
- inline QDateTime dtAlarm() const
+ inline TQDateTime dtAlarm() const
{
return dtStart().addSecs(-alarmLeadTime());
}
@@ -271,7 +271,7 @@ public:
/** Returns the date and time that the repeat ends. If there is no repeat,
* returns an invalid date and time.
*/
- QDateTime dtRepeatEnd() const;
+ TQDateTime dtRepeatEnd() const;
inline int getRepeatFrequency() const
{
@@ -302,7 +302,7 @@ public:
fAppointmentInfo.repeatDays[i] = rd[i];
}
}
- inline void setRepeatDays(QBitArray rba)
+ inline void setRepeatDays(TQBitArray rba)
{
for (int i = 0; i < 7; i++)
{
@@ -329,17 +329,17 @@ public:
* entered in the day view on the handheld, and it is called the summary
* in libkcal.
*/
- void setDescription(const QString &);
+ void setDescription(const TQString &);
/** Gets the description of the appointment. See setDescription for meaning. */
- QString getDescription() const;
+ TQString getDescription() const;
/** Sets the note for the appointment. The note is the long text entry
* that is possible - but clumsy - on the handheld. It is called the
* description in libkcal.
*/
- void setNote(const QString &);
+ void setNote(const TQString &);
/** Gets the note for this appointment. See setNote for meaning. */
- QString getNote() const;
+ TQString getNote() const;
/**
* Sets the location for the appointment. For now it will be placed within
@@ -348,10 +348,10 @@ public:
* TODO: Make distinguish between handhelds that support the location field
* and the ones that don't. (Shouldn't this be done in the pilot-link lib?)
*/
- void setLocation(const QString &);
+ void setLocation(const TQString &);
/** Gets the location for this appointment. See setNote for meaning. */
- QString getLocation() const;
+ TQString getLocation() const;
protected:
void setDescriptionP(const char* desc, int l=-1);
diff --git a/kpilot/lib/pilotLocalDatabase.cc b/kpilot/lib/pilotLocalDatabase.cc
index 9f2d5e8a4..735632de7 100644
--- a/kpilot/lib/pilotLocalDatabase.cc
+++ b/kpilot/lib/pilotLocalDatabase.cc
@@ -38,11 +38,11 @@
#include <pi-file.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -52,7 +52,7 @@
#include "pilotRecord.h"
#include "pilotLocalDatabase.h"
-typedef QValueVector<PilotRecord *> Records;
+typedef TQValueVector<PilotRecord *> Records;
class PilotLocalDatabase::Private : public Records
{
@@ -81,8 +81,8 @@ public:
int pending;
} ;
-PilotLocalDatabase::PilotLocalDatabase(const QString & path,
- const QString & dbName, bool useDefaultPath) :
+PilotLocalDatabase::PilotLocalDatabase(const TQString & path,
+ const TQString & dbName, bool useDefaultPath) :
PilotDatabase(dbName),
fPathName(path),
fDBName(dbName),
@@ -115,10 +115,10 @@ PilotLocalDatabase::PilotLocalDatabase(const QString & path,
}
-PilotLocalDatabase::PilotLocalDatabase(const QString &dbName) :
- PilotDatabase( QString() ),
- fPathName( QString() ),
- fDBName( QString() ),
+PilotLocalDatabase::PilotLocalDatabase(const TQString &dbName) :
+ PilotDatabase( TQString() ),
+ fPathName( TQString() ),
+ fDBName( TQString() ),
fAppInfo(0L),
fAppLen(0),
d(0L)
@@ -182,9 +182,9 @@ bool PilotLocalDatabase::createDatabase(long creator, long type, int, int flags,
fDBInfo.version=version;
fDBInfo.modnum=0;
fDBInfo.index=0;
- fDBInfo.createDate=(QDateTime::currentDateTime()).toTime_t();
- fDBInfo.modifyDate=(QDateTime::currentDateTime()).toTime_t();
- fDBInfo.backupDate=(QDateTime::currentDateTime()).toTime_t();
+ fDBInfo.createDate=(TQDateTime::currentDateTime()).toTime_t();
+ fDBInfo.modifyDate=(TQDateTime::currentDateTime()).toTime_t();
+ fDBInfo.backupDate=(TQDateTime::currentDateTime()).toTime_t();
delete[] fAppInfo;
fAppInfo=0L;
@@ -205,9 +205,9 @@ int PilotLocalDatabase::deleteDatabase()
closeDatabase();
}
- QString dbpath=dbPathName();
- QFile fl(dbpath);
- if (QFile::remove(dbPathName()))
+ TQString dbpath=dbPathName();
+ TQFile fl(dbpath);
+ if (TQFile::remove(dbPathName()))
{
return 0;
}
@@ -269,11 +269,11 @@ unsigned int PilotLocalDatabase::recordCount() const
}
-// Returns a QValueList of all record ids in the database.
-QValueList<recordid_t> PilotLocalDatabase::idList()
+// Returns a TQValueList of all record ids in the database.
+TQValueList<recordid_t> PilotLocalDatabase::idList()
{
int idlen=recordCount();
- QValueList<recordid_t> idlist;
+ TQValueList<recordid_t> idlist;
if (idlen<=0)
{
return idlist;
@@ -588,11 +588,11 @@ int PilotLocalDatabase::cleanup()
return 0;
}
-QString PilotLocalDatabase::dbPathName() const
+TQString PilotLocalDatabase::dbPathName() const
{
FUNCTIONSETUP;
- QString tempName(fPathName);
- QString slash = CSL1("/");
+ TQString tempName(fPathName);
+ TQString slash = CSL1("/");
if (!tempName.endsWith(slash)) tempName += slash;
tempName += getDBName();
@@ -608,10 +608,10 @@ void PilotLocalDatabase::openDatabase()
setDBOpen(false);
- dbFile = pi_file_open( QFile::encodeName(dbPathName()) );
+ dbFile = pi_file_open( TQFile::encodeName(dbPathName()) );
if (dbFile == 0L)
{
- QString path = dbPathName();
+ TQString path = dbPathName();
DEBUGKPILOT << fname << ": Failed to open " << path << endl;
return;
}
@@ -665,13 +665,13 @@ void PilotLocalDatabase::closeDatabase()
return;
}
- QString newName = dbPathName() + CSL1(".new");
- QString path = dbPathName();
+ TQString newName = dbPathName() + CSL1(".new");
+ TQString path = dbPathName();
DEBUGKPILOT << fname
<< ": Creating temp file " << newName
<< " for the database file " << path << endl;
- dbFile = pi_file_create(QFile::encodeName(newName),&fDBInfo);
+ dbFile = pi_file_create(TQFile::encodeName(newName),&fDBInfo);
pi_file_set_app_info(dbFile, fAppInfo, fAppLen);
for (unsigned int i = 0; i < d->size(); i++)
@@ -697,16 +697,16 @@ void PilotLocalDatabase::closeDatabase()
}
pi_file_close(dbFile);
- QFile::remove(dbPathName());
- rename((const char *) QFile::encodeName(newName),
- (const char *) QFile::encodeName(dbPathName()));
+ TQFile::remove(dbPathName());
+ rename((const char *) TQFile::encodeName(newName),
+ (const char *) TQFile::encodeName(dbPathName()));
setDBOpen(false);
}
-QString *PilotLocalDatabase::fPathBase = 0L;
+TQString *PilotLocalDatabase::fPathBase = 0L;
-void PilotLocalDatabase::setDBPath(const QString &s)
+void PilotLocalDatabase::setDBPath(const TQString &s)
{
FUNCTIONSETUP;
@@ -717,7 +717,7 @@ void PilotLocalDatabase::setDBPath(const QString &s)
if (!fPathBase)
{
- fPathBase = new QString(s);
+ fPathBase = new TQString(s);
}
else
{
@@ -731,7 +731,7 @@ void PilotLocalDatabase::setDBPath(const QString &s)
}
-/* static */ bool PilotLocalDatabase::infoFromFile( const QString &path, DBInfo *d )
+/* static */ bool PilotLocalDatabase::infoFromFile( const TQString &path, DBInfo *d )
{
FUNCTIONSETUP;
@@ -741,12 +741,12 @@ void PilotLocalDatabase::setDBPath(const QString &s)
{
return false;
}
- if (!QFile::exists(path))
+ if (!TQFile::exists(path))
{
return false;
}
- QCString fileName = QFile::encodeName( path );
+ TQCString fileName = TQFile::encodeName( path );
f = pi_file_open( fileName );
if (!f)
{
diff --git a/kpilot/lib/pilotLocalDatabase.h b/kpilot/lib/pilotLocalDatabase.h
index c33455800..e5d11a63a 100644
--- a/kpilot/lib/pilotLocalDatabase.h
+++ b/kpilot/lib/pilotLocalDatabase.h
@@ -54,14 +54,14 @@ public:
* the database cannot be found, no database is opened. It can then be
* created explicitly at the specified location.
*/
- PilotLocalDatabase( const QString& path,
- const QString& name, bool useDefaultPath=true);
+ PilotLocalDatabase( const TQString& path,
+ const TQString& name, bool useDefaultPath=true);
/**
* Opens the local database. This is primarily for testing
* purposes; only tries the given path.
*/
- PilotLocalDatabase(const QString &name);
+ PilotLocalDatabase(const TQString &name);
virtual ~PilotLocalDatabase();
@@ -85,8 +85,8 @@ public:
virtual int writeAppBlock(unsigned char* buffer, int len);
// returns the number of records in the database, 0 if not open
virtual unsigned int recordCount() const;
- // Returns a QValueList of all record ids in the database.
- virtual QValueList<recordid_t> idList();
+ // Returns a TQValueList of all record ids in the database.
+ virtual TQValueList<recordid_t> idList();
// Reads a record from database by id, returns record
virtual PilotRecord* readRecordById(recordid_t id);
// Reads a record from database, returns the record
@@ -134,14 +134,14 @@ public:
/** Return the name of the database (as it would be on the handheld). */
- QString getDBName() const { return fDBName; }
+ TQString getDBName() const { return fDBName; }
/**
* Returns the full path of the current database, based on
* the path and dbname passed to the constructor, and including
* the .pdb extension.
*/
- virtual QString dbPathName() const;
+ virtual TQString dbPathName() const;
/**
* Accessor functions for the application info block.
@@ -166,7 +166,7 @@ public:
* library doesn't provide a cheap way of getting this
* information.
*/
- static bool infoFromFile( const QString &path, DBInfo *d );
+ static bool infoFromFile( const TQString &path, DBInfo *d );
protected:
// Changes any forward slashes to underscores
@@ -176,7 +176,7 @@ protected:
private:
struct DBInfo fDBInfo;
- QString fPathName,fDBName;
+ TQString fPathName,fDBName;
char* fAppInfo;
size_t fAppLen;
@@ -189,13 +189,13 @@ public:
* preferred one, too) try this path first before the default path.
* Set statically so it's shared for all local databases.
*/
- static void setDBPath(const QString &);
+ static void setDBPath(const TQString &);
/**
* Accessor for the extra search path.
*/
- static const QString &getDBPath() { return *fPathBase; } ;
+ static const TQString &getDBPath() { return *fPathBase; } ;
private:
- static QString *fPathBase;
+ static TQString *fPathBase;
};
#endif
diff --git a/kpilot/lib/pilotMemo.cc b/kpilot/lib/pilotMemo.cc
index 0ce09f8a7..946a995b1 100644
--- a/kpilot/lib/pilotMemo.cc
+++ b/kpilot/lib/pilotMemo.cc
@@ -28,7 +28,7 @@
#include "options.h"
-#include <qnamespace.h>
+#include <tqnamespace.h>
#include "pilotMemo.h"
#include "pilotDatabase.h"
@@ -74,7 +74,7 @@ PilotRecord *PilotMemo::pack()
}
-QString PilotMemo::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotMemo::getTextRepresentation(Qt::TextFormat richText)
{
if (richText==Qt::RichText)
{
@@ -88,19 +88,19 @@ QString PilotMemo::getTextRepresentation(Qt::TextFormat richText)
}
-QString PilotMemo::getTitle() const
+TQString PilotMemo::getTitle() const
{
- if (fText.isEmpty()) return QString::null;
+ if (fText.isEmpty()) return TQString::null;
int memoTitleLen = fText.find('\n');
if (-1 == memoTitleLen) memoTitleLen=fText.length();
return fText.left(memoTitleLen);
}
-QString PilotMemo::shortTitle() const
+TQString PilotMemo::shortTitle() const
{
FUNCTIONSETUP;
- QString t = QString(getTitle()).simplifyWhiteSpace();
+ TQString t = TQString(getTitle()).simplifyWhiteSpace();
if (t.length() < 32)
return t;
@@ -118,10 +118,10 @@ QString PilotMemo::shortTitle() const
return t;
}
-QString PilotMemo::sensibleTitle() const
+TQString PilotMemo::sensibleTitle() const
{
FUNCTIONSETUP;
- QString s = getTitle();
+ TQString s = getTitle();
if (!s.isEmpty())
{
diff --git a/kpilot/lib/pilotMemo.h b/kpilot/lib/pilotMemo.h
index 6897a0417..f4436ab75 100644
--- a/kpilot/lib/pilotMemo.h
+++ b/kpilot/lib/pilotMemo.h
@@ -28,8 +28,8 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qnamespace.h>
-#include <qstring.h>
+#include <tqnamespace.h>
+#include <tqstring.h>
#include <pi-memo.h>
@@ -48,7 +48,7 @@ public:
* Constructor. Create a memo in the Unfiled category with
* text @p s .
*/
- PilotMemo(const QString &s) : PilotRecordBase()
+ PilotMemo(const TQString &s) : PilotRecordBase()
{
setText(s);
} ;
@@ -65,7 +65,7 @@ public:
* attributes from the argument @p r, and set the
* text of the memo from string @p s.
*/
- PilotMemo(const PilotRecordBase *r, const QString &s) :
+ PilotMemo(const PilotRecordBase *r, const TQString &s) :
PilotRecordBase(r)
{
setText(s);
@@ -73,10 +73,10 @@ public:
~PilotMemo() { } ;
- virtual QString getTextRepresentation(Qt::TextFormat richText);
- QString text(void) const { return fText; } ;
- void setText(const QString &text) { fText = text.left(MAX_MEMO_LEN); } ;
- QString getTitle(void) const ;
+ virtual TQString getTextRepresentation(Qt::TextFormat richText);
+ TQString text(void) const { return fText; } ;
+ void setText(const TQString &text) { fText = text.left(MAX_MEMO_LEN); } ;
+ TQString getTitle(void) const ;
PilotRecord* pack();
static const int MAX_MEMO_LEN=8192;
@@ -87,16 +87,16 @@ public:
* and inconvenient. shortTitle() returns about 30
* characters.
*/
- QString shortTitle() const;
+ TQString shortTitle() const;
/**
* Returns a (complete) title if there is one and [unknown]
* otherwise.
*/
- QString sensibleTitle() const;
+ TQString sensibleTitle() const;
private:
- QString fText;
+ TQString fText;
};
diff --git a/kpilot/lib/pilotRecord.cc b/kpilot/lib/pilotRecord.cc
index 44ae4f7be..59f055c3c 100644
--- a/kpilot/lib/pilotRecord.cc
+++ b/kpilot/lib/pilotRecord.cc
@@ -36,7 +36,7 @@
#include <string.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kcharsets.h>
@@ -46,12 +46,12 @@
-/* virtual */ QString PilotRecordBase::textRepresentation() const
+/* virtual */ TQString PilotRecordBase::textRepresentation() const
{
return CSL1("[ %1,%2,%3 ]") . arg(attributes(),category(),id());
}
-/* virtual */ QString PilotRecord::textRepresentation() const
+/* virtual */ TQString PilotRecord::textRepresentation() const
{
return CSL1("[ %1,%2 ]")
.arg(PilotRecordBase::textRepresentation())
diff --git a/kpilot/lib/pilotRecord.h b/kpilot/lib/pilotRecord.h
index a3812b333..fdf8a33e1 100644
--- a/kpilot/lib/pilotRecord.h
+++ b/kpilot/lib/pilotRecord.h
@@ -130,7 +130,7 @@ public:
*
* @return @c true on success, @c false on failure
*/
- bool setCategory(const struct CategoryAppInfo *info, const QString &label)
+ bool setCategory(const struct CategoryAppInfo *info, const TQString &label)
{
if (!info)
{
@@ -221,7 +221,7 @@ public:
#undef SETTER
/** Returns a text representation of this record. */
- virtual QString textRepresentation() const;
+ virtual TQString textRepresentation() const;
private:
int fAttrib, fCat;
@@ -334,7 +334,7 @@ public:
void setData(const char* data, int len);
/** Returns a text representation of this record. */
- virtual QString textRepresentation() const;
+ virtual TQString textRepresentation() const;
private:
char* fData;
diff --git a/kpilot/lib/pilotSerialDatabase.cc b/kpilot/lib/pilotSerialDatabase.cc
index a38898d1d..f57cac934 100644
--- a/kpilot/lib/pilotSerialDatabase.cc
+++ b/kpilot/lib/pilotSerialDatabase.cc
@@ -34,7 +34,7 @@
#include <pi-dlp.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kdebug.h>
@@ -45,7 +45,7 @@
#include "kpilotdevicelink.h"
PilotSerialDatabase::PilotSerialDatabase(KPilotDeviceLink *l,
- const QString &dbName) :
+ const TQString &dbName) :
PilotDatabase(dbName),
fDBName( dbName ),
fDBHandle(-1),
@@ -56,8 +56,8 @@ PilotSerialDatabase::PilotSerialDatabase(KPilotDeviceLink *l,
}
PilotSerialDatabase::PilotSerialDatabase( KPilotDeviceLink *l, const DBInfo *info ) :
- PilotDatabase( info ? Pilot::fromPilot( info->name ) : QString::null ),
- fDBName( QString::null ),
+ PilotDatabase( info ? Pilot::fromPilot( info->name ) : TQString::null ),
+ fDBName( TQString::null ),
fDBHandle( -1 ),
fDBSocket( l->pilotSocket() )
{
@@ -86,9 +86,9 @@ PilotSerialDatabase::~PilotSerialDatabase()
closeDatabase();
}
-QString PilotSerialDatabase::dbPathName() const
+TQString PilotSerialDatabase::dbPathName() const
{
- QString s = CSL1("Pilot:");
+ TQString s = CSL1("Pilot:");
s.append(fDBName);
return s;
}
@@ -140,10 +140,10 @@ unsigned int PilotSerialDatabase::recordCount() const
}
-// Returns a QValueList of all record ids in the database.
-QValueList<recordid_t> PilotSerialDatabase::idList()
+// Returns a TQValueList of all record ids in the database.
+TQValueList<recordid_t> PilotSerialDatabase::idList()
{
- QValueList<recordid_t> idlist;
+ TQValueList<recordid_t> idlist;
int idlen=recordCount();
if (idlen<=0) return idlist;
@@ -346,14 +346,14 @@ void PilotSerialDatabase::openDatabase()
setDBOpen(false);
- QString s = getDBName();
+ TQString s = getDBName();
if (s.isEmpty())
{
WARNINGKPILOT << "Bad DB name, " << s << " string given." << endl;
return;
}
- QCString encodedName = QFile::encodeName(s);
+ TQCString encodedName = TQFile::encodeName(s);
if (encodedName.isEmpty())
{
WARNINGKPILOT << "Bad DB name, "
diff --git a/kpilot/lib/pilotSerialDatabase.h b/kpilot/lib/pilotSerialDatabase.h
index 51a6ba26d..1da2aaacb 100644
--- a/kpilot/lib/pilotSerialDatabase.h
+++ b/kpilot/lib/pilotSerialDatabase.h
@@ -49,7 +49,7 @@ class KDE_EXPORT PilotSerialDatabase : public PilotDatabase
{
friend class KPilotDeviceLink;
protected:
- PilotSerialDatabase( KPilotDeviceLink *l, const QString &dbName );
+ PilotSerialDatabase( KPilotDeviceLink *l, const TQString &dbName );
PilotSerialDatabase( KPilotDeviceLink *l, const DBInfo *info );
public:
@@ -61,8 +61,8 @@ public:
virtual int writeAppBlock(unsigned char* buffer, int len);
/** returns the number of records in the database, 0 if not open */
virtual unsigned int recordCount() const;
- /** Returns a QValueList of all record ids in the database. */
- virtual QValueList<recordid_t> idList();
+ /** Returns a TQValueList of all record ids in the database. */
+ virtual TQValueList<recordid_t> idList();
/** Reads a record from database by id, returns record length */
virtual PilotRecord* readRecordById(recordid_t id);
/** Reads a record from database, returns the record length */
@@ -95,7 +95,7 @@ public:
/** Purges all Archived/Deleted records from Palm Pilot database */
virtual int cleanup();
- virtual QString dbPathName() const;
+ virtual TQString dbPathName() const;
/**
* Deletes the database (by name, as given in the constructor and
@@ -110,7 +110,7 @@ public:
*/
virtual bool createDatabase(long creator=0,
long type=0, int cardno=0, int flags=0, int version=0);
- QString getDBName() { return fDBName; }
+ TQString getDBName() { return fDBName; }
virtual DBType dbType() const;
@@ -130,7 +130,7 @@ protected:
private:
void setDBHandle(int handle) { fDBHandle = handle; }
- QString fDBName;
+ TQString fDBName;
int fDBHandle;
int fDBSocket;
// Pilot-link 0.12 allocates buffers as needed and resizes them.
diff --git a/kpilot/lib/pilotTodoEntry.cc b/kpilot/lib/pilotTodoEntry.cc
index f4c5596fb..1ed9dfa76 100644
--- a/kpilot/lib/pilotTodoEntry.cc
+++ b/kpilot/lib/pilotTodoEntry.cc
@@ -31,8 +31,8 @@
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qnamespace.h>
+#include <tqdatetime.h>
+#include <tqnamespace.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -115,12 +115,12 @@ PilotTodoEntry & PilotTodoEntry::operator = (const PilotTodoEntry & e)
return *this;
}
-QString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
{
- QString text, tmp;
- QString par = (richText==Qt::RichText) ?CSL1("<p>"): QString();
- QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString text, tmp;
+ TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString();
+ TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
@@ -137,8 +137,8 @@ QString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
if (!getIndefinite())
{
- QDate dt(readTm(getDueDate()).date());
- QString dueDate(dt.toString(Qt::LocalDate));
+ TQDate dt(readTm(getDueDate()).date());
+ TQString dueDate(dt.toString(Qt::LocalDate));
text+=par;
text+=i18n("Due date: %1").arg(dueDate);
text+=ps;
@@ -177,7 +177,7 @@ PilotRecord *PilotTodoEntry::pack() const
return new PilotRecord( b, this );
}
-void PilotTodoEntry::setDescription(const QString &desc)
+void PilotTodoEntry::setDescription(const TQString &desc)
{
if (desc.length() < fDescriptionSize)
{
@@ -218,12 +218,12 @@ void PilotTodoEntry::setDescriptionP(const char *desc, int len)
}
}
-QString PilotTodoEntry::getDescription() const
+TQString PilotTodoEntry::getDescription() const
{
return Pilot::fromPilot(getDescriptionP());
}
-void PilotTodoEntry::setNote(const QString &note)
+void PilotTodoEntry::setNote(const TQString &note)
{
if (note.length() < fNoteSize)
{
@@ -263,7 +263,7 @@ void PilotTodoEntry::setNoteP(const char *note, int len)
}
}
-QString PilotTodoEntry::getNote() const
+TQString PilotTodoEntry::getNote() const
{
return Pilot::fromPilot(getNoteP());
}
diff --git a/kpilot/lib/pilotTodoEntry.h b/kpilot/lib/pilotTodoEntry.h
index 3735771b6..020912f9c 100644
--- a/kpilot/lib/pilotTodoEntry.h
+++ b/kpilot/lib/pilotTodoEntry.h
@@ -35,8 +35,8 @@
#include <pi-macros.h>
#include <pi-todo.h>
-#include <qnamespace.h>
-#include <qstring.h>
+#include <tqnamespace.h>
+#include <tqstring.h>
#include "pilotRecord.h"
#include "pilotAppInfo.h"
@@ -72,7 +72,7 @@ public:
/** Return a string for the ToDo item. If @param richText is true, then
* use qt style markup to make the string clearer when displayed.
*/
- QString getTextRepresentation(Qt::TextFormat richText);
+ TQString getTextRepresentation(Qt::TextFormat richText);
/** Assign an existing ToDo item to this one. */
PilotTodoEntry& operator=(const PilotTodoEntry &e);
@@ -131,20 +131,20 @@ public:
/** Get the ToDo item's description (which is the title shown on
* the handheld, and the item's Title in KDE). This uses the default codec.
*/
- QString getDescription() const;
+ TQString getDescription() const;
/** Set the ToDo item's description. */
- void setDescription(const QString &);
+ void setDescription(const TQString &);
/** Get the ToDo item's note (the longer text, not immediately accessible
* on the handheld). This uses the default codec.
*/
- QString getNote() const;
+ TQString getNote() const;
/** Set the ToDo item's note. */
- void setNote(const QString &note);
+ void setNote(const TQString &note);
/** Returns the label for the category this ToDo item is in. */
- QString getCategoryLabel() const;
+ TQString getCategoryLabel() const;
PilotRecord *pack() const;
diff --git a/kpilot/lib/pilotUser.h b/kpilot/lib/pilotUser.h
index 6ba46b007..f7e17489a 100644
--- a/kpilot/lib/pilotUser.h
+++ b/kpilot/lib/pilotUser.h
@@ -60,14 +60,14 @@ public:
}
/** @return The username set on the handheld. */
- QString name() const
+ TQString name() const
{
return Pilot::fromPilot( fUser.username );
}
/** Set the user name to the given @p name , truncated
* if necessary to the size of the field on the handheld.
*/
- void setName( const QString &name )
+ void setName( const TQString &name )
{
Pilot::toPilot( name, fUser.username, sizeof(fUser.username) );
}
diff --git a/kpilot/lib/plugin.cc b/kpilot/lib/plugin.cc
index e9bcc9221..128c8ba99 100644
--- a/kpilot/lib/plugin.cc
+++ b/kpilot/lib/plugin.cc
@@ -35,17 +35,17 @@
#include <stdlib.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qtextview.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqtextview.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kaboutapplication.h>
@@ -65,9 +65,9 @@
#include "plugin.moc"
-ConduitConfigBase::ConduitConfigBase(QWidget *parent,
+ConduitConfigBase::ConduitConfigBase(TQWidget *parent,
const char *name) :
- QObject(parent,name),
+ TQObject(parent,name),
fModified(false),
fWidget(0L),
fConduitName(i18n("Unnamed"))
@@ -86,7 +86,7 @@ ConduitConfigBase::~ConduitConfigBase()
emit changed(true);
}
-/* virtual */ QString ConduitConfigBase::maybeSaveText() const
+/* virtual */ TQString ConduitConfigBase::maybeSaveText() const
{
FUNCTIONSETUP;
@@ -108,36 +108,36 @@ ConduitConfigBase::~ConduitConfigBase()
return true;
}
-QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
+TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad)
{
FUNCTIONSETUP;
- QWidget *w = new QWidget(parent, "aboutpage");
+ TQWidget *w = new TQWidget(parent, "aboutpage");
- QString s;
- QLabel *text;
+ TQString s;
+ TQLabel *text;
KIconLoader *l = KGlobal::iconLoader();
const KAboutData *p = ad ? ad : KGlobal::instance()->aboutData();
- QGridLayout *grid = new QGridLayout(w, 5, 4, SPACING);
+ TQGridLayout *grid = new TQGridLayout(w, 5, 4, SPACING);
grid->addColSpacing(0, SPACING);
grid->addColSpacing(4, SPACING);
- QPixmap applicationIcon =
- l->loadIcon(QString::fromLatin1(p->appName()),
+ TQPixmap applicationIcon =
+ l->loadIcon(TQString::fromLatin1(p->appName()),
KIcon::Desktop,
64, KIcon::DefaultState, 0L,
true);
if (applicationIcon.isNull())
{
- applicationIcon = l->loadIcon(QString::fromLatin1("kpilot"),
+ applicationIcon = l->loadIcon(TQString::fromLatin1("kpilot"),
KIcon::Desktop);
}
- text = new QLabel(w);
+ text = new TQLabel(w);
// Experiment with a long non-<qt> string. Use that to find
// sensible widths for the columns.
//
@@ -148,7 +148,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
int lineheight = text->size().height();
// Use the label to display the applciation icon
- text->setText(QString::null);
+ text->setText(TQString::null);
text->setPixmap(applicationIcon);
text->adjustSize();
grid->addWidget(text, 0, 1);
@@ -165,8 +165,8 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
grid->setColStretch(3,50);
linktext->setMinimumSize(linewidth,kMax(260,60+12*lineheight));
linktext->setFixedHeight(kMax(260,60+12*lineheight));
- linktext->setVScrollBarMode(QScrollView::Auto/*AlwaysOn*/);
- text = new QLabel(w);
+ linktext->setVScrollBarMode(TQScrollView::Auto/*AlwaysOn*/);
+ text = new TQLabel(w);
grid->addMultiCellWidget(text,0,0,2,3);
grid->addMultiCellWidget(linktext,1,2,1,3);
@@ -183,14 +183,14 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
if (!p->homepage().isEmpty())
{
- s = QString::null;
+ s = TQString::null;
s += CSL1("<a href=\"%1\">").arg(p->homepage());
s += p->homepage();
s += CSL1("</a><br>");
linktext->append(s);
}
- s = QString::null;
+ s = TQString::null;
s += i18n("Send questions and comments to <a href=\"mailto:%1\">%2</a>.")
.arg( CSL1("kdepim-users@kde.org") )
.arg( CSL1("kdepim-users@kde.org") );
@@ -203,16 +203,16 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
"<a href=\"help:/kpilot/trademarks.html\">KPilot User's Guide</a>.");
s += CSL1("<br>");
linktext->append(s);
- linktext->append(QString::null);
+ linktext->append(TQString::null);
- QValueList<KAboutPerson> pl = p->authors();
- QValueList<KAboutPerson>::ConstIterator i;
+ TQValueList<KAboutPerson> pl = p->authors();
+ TQValueList<KAboutPerson>::ConstIterator i;
s = i18n("<b>Authors:</b> ");
- QString comma = CSL1(", ");
+ TQString comma = CSL1(", ");
unsigned int count=1;
for (i=pl.begin(); i!=pl.end(); ++i)
@@ -220,13 +220,13 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
s.append(CSL1("%1 (<i>%2</i>)%3")
.arg((*i).name())
.arg((*i).task())
- .arg(count<pl.count() ? comma : QString::null)
+ .arg(count<pl.count() ? comma : TQString::null)
);
count++;
}
linktext->append(s);
- s = QString::null;
+ s = TQString::null;
pl = p->credits();
if (pl.count()>0)
{
@@ -237,7 +237,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
s.append(CSL1("%1 (<i>%2</i>)%3")
.arg((*i).name())
.arg((*i).task())
- .arg(count<pl.count() ? comma : QString::null)
+ .arg(count<pl.count() ? comma : TQString::null)
);
count++;
}
@@ -250,15 +250,15 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
return w;
}
-/* static */ void ConduitConfigBase::addAboutPage(QTabWidget *tw,
+/* static */ void ConduitConfigBase::addAboutPage(TQTabWidget *tw,
KAboutData *ad)
{
FUNCTIONSETUP;
Q_ASSERT(tw);
- QWidget *w = aboutPage(tw,ad);
- QSize sz = w->size();
+ TQWidget *w = aboutPage(tw,ad);
+ TQSize sz = w->size();
if (sz.width() < tw->size().width())
{
@@ -278,7 +278,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
ConduitAction::ConduitAction(KPilotLink *p,
const char *name,
- const QStringList &args) :
+ const TQStringList &args) :
SyncAction(p,name),
fDatabase(0L),
fLocalDatabase(0L),
@@ -290,14 +290,14 @@ ConduitAction::ConduitAction(KPilotLink *p,
{
FUNCTIONSETUP;
- QString cResolution(args.grep(QRegExp(CSL1("--conflictResolution \\d*"))).first());
+ TQString cResolution(args.grep(TQRegExp(CSL1("--conflictResolution \\d*"))).first());
if (cResolution.isEmpty())
{
fConflictResolution=(SyncAction::ConflictResolution)
- cResolution.replace(QRegExp(CSL1("--conflictResolution (\\d*)")), CSL1("\\1")).toInt();
+ cResolution.replace(TQRegExp(CSL1("--conflictResolution (\\d*)")), CSL1("\\1")).toInt();
}
- for (QStringList::ConstIterator it = args.begin();
+ for (TQStringList::ConstIterator it = args.begin();
it != args.end();
++it)
{
@@ -320,7 +320,7 @@ ConduitAction::ConduitAction(KPilotLink *p,
KPILOT_DELETE(fCtrPC);
}
-bool ConduitAction::openDatabases(const QString &name, bool *retrieved)
+bool ConduitAction::openDatabases(const TQString &name, bool *retrieved)
{
FUNCTIONSETUP;
@@ -335,7 +335,7 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved)
KPILOT_DELETE(fLocalDatabase);
- QString localPathName = PilotLocalDatabase::getDBPath() + name;
+ TQString localPathName = PilotLocalDatabase::getDBPath() + name;
// we always want to use the conduits/ directory for our local
// databases. this keeps our backups and data that our conduits use
@@ -359,7 +359,7 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved)
// if there is no backup db yet, fetch it from the palm, open it and set the full sync flag.
if (!localDB->isOpen() )
{
- QString dbpath(localDB->dbPathName());
+ TQString dbpath(localDB->dbPathName());
KPILOT_DELETE(localDB);
DEBUGKPILOT << fname
<< ": Backup database " << dbpath
@@ -383,8 +383,8 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved)
dbinfo.flags &= ~dlpDBFlagOpen;
// make sure the dir for the backup db really exists!
- QFileInfo fi(dbpath);
- QString path(QFileInfo(dbpath).dir(true).absPath());
+ TQFileInfo fi(dbpath);
+ TQString path(TQFileInfo(dbpath).dir(true).absPath());
if (!path.endsWith(CSL1("/"))) path.append(CSL1("/"));
if (!KStandardDirs::exists(path))
{
@@ -477,9 +477,9 @@ void ConduitAction::finished()
// this is a percentage...
int allowedVolatility = 70;
- QString caption = i18n("Large Changes Detected");
+ TQString caption = i18n("Large Changes Detected");
// args are already i18n'd
- QString query = i18n("The %1 conduit has made a "
+ TQString query = i18n("The %1 conduit has made a "
"large number of changes to your %2. Do you want "
"to allow this change?\nDetails:\n\t%3");
@@ -494,7 +494,7 @@ void ConduitAction::finished()
/*
int rc = questionYesNo(query, caption,
- QString::null, 0 );
+ TQString::null, 0 );
if (rc == KMessageBox::Yes)
{
// TODO: add commit and rollback code.
@@ -514,7 +514,7 @@ void ConduitAction::finished()
ConduitProxy::ConduitProxy(KPilotLink *p,
- const QString &name,
+ const TQString &name,
const SyncAction::SyncMode &m) :
ConduitAction(p,name.latin1(),m.list()),
fDesktopName(name)
@@ -548,7 +548,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
<< endl;
KLibrary *library = KLibLoader::self()->library(
- QFile::encodeName(fLibraryName));
+ TQFile::encodeName(fLibraryName));
if (!library)
{
WARNINGKPILOT << "Can't load library "
@@ -582,11 +582,11 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
return false;
}
- QStringList l = syncMode().list();
+ TQStringList l = syncMode().list();
DEBUGKPILOT << fname << ": Flags: " << syncMode().name() << endl;
- QObject *object = factory->create(fHandle,name(),"SyncAction",l);
+ TQObject *object = factory->create(fHandle,name(),"SyncAction",l);
if (!object)
{
@@ -607,17 +607,17 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
addSyncLogEntry(i18n("[Conduit %1]").arg(fDesktopName));
// Handle the syncDone signal properly & unload the conduit.
- QObject::connect(fConduit,SIGNAL(syncDone(SyncAction *)),
- this,SLOT(execDone(SyncAction *)));
+ TQObject::connect(fConduit,TQT_SIGNAL(syncDone(SyncAction *)),
+ this,TQT_SLOT(execDone(SyncAction *)));
// Proxy all the log and error messages.
- QObject::connect(fConduit,SIGNAL(logMessage(const QString &)),
- this,SIGNAL(logMessage(const QString &)));
- QObject::connect(fConduit,SIGNAL(logError(const QString &)),
- this,SIGNAL(logError(const QString &)));
- QObject::connect(fConduit,SIGNAL(logProgress(const QString &,int)),
- this,SIGNAL(logProgress(const QString &,int)));
-
- QTimer::singleShot(0,fConduit,SLOT(execConduit()));
+ TQObject::connect(fConduit,TQT_SIGNAL(logMessage(const TQString &)),
+ this,TQT_SIGNAL(logMessage(const TQString &)));
+ TQObject::connect(fConduit,TQT_SIGNAL(logError(const TQString &)),
+ this,TQT_SIGNAL(logError(const TQString &)));
+ TQObject::connect(fConduit,TQT_SIGNAL(logProgress(const TQString &,int)),
+ this,TQT_SIGNAL(logProgress(const TQString &,int)));
+
+ TQTimer::singleShot(0,fConduit,TQT_SLOT(execConduit()));
return true;
}
@@ -649,11 +649,11 @@ void ConduitProxy::execDone(SyncAction *p)
namespace PluginUtility
{
-QString findArgument(const QStringList &a, const QString &arg)
+TQString findArgument(const TQStringList &a, const TQString &arg)
{
FUNCTIONSETUP;
- QString search;
+ TQString search;
if (arg.startsWith( CSL1("--") ))
{
@@ -666,20 +666,20 @@ QString findArgument(const QStringList &a, const QString &arg)
search.append( CSL1("=") );
- QStringList::ConstIterator end = a.end();
- for (QStringList::ConstIterator i = a.begin(); i != end; ++i)
+ TQStringList::ConstIterator end = a.end();
+ for (TQStringList::ConstIterator i = a.begin(); i != end; ++i)
{
if ((*i).startsWith( search ))
{
- QString s = (*i).mid(search.length());
+ TQString s = (*i).mid(search.length());
return s;
}
}
- return QString::null;
+ return TQString::null;
}
-/* static */ bool isRunning(const QCString &n)
+/* static */ bool isRunning(const TQCString &n)
{
DCOPClient *dcop = KApplication::kApplication()->dcopClient();
QCStringList apps = dcop->registeredApplications();
@@ -689,7 +689,7 @@ QString findArgument(const QStringList &a, const QString &arg)
/* static */ unsigned long pluginVersion(const KLibrary *lib)
{
- QString symbol = CSL1("version_");
+ TQString symbol = CSL1("version_");
symbol.append(lib->name());
if (!lib->hasSymbol(symbol.latin1())) return 0;
@@ -699,21 +699,21 @@ QString findArgument(const QStringList &a, const QString &arg)
}
-/* static */ QString pluginVersionString(const KLibrary *lib)
+/* static */ TQString pluginVersionString(const KLibrary *lib)
{
- QString symbol= CSL1("id_");
+ TQString symbol= CSL1("id_");
symbol.append(lib->name());
- if (!lib->hasSymbol(symbol.latin1())) return QString::null;
+ if (!lib->hasSymbol(symbol.latin1())) return TQString::null;
- return QString::fromLatin1(*((const char **)(lib->symbol(symbol.latin1()))));
+ return TQString::fromLatin1(*((const char **)(lib->symbol(symbol.latin1()))));
}
}
-CUDCounter::CUDCounter(QString s) :
+CUDCounter::CUDCounter(TQString s) :
fC(0),fU(0),fD(0),fStart(0),fEnd(0),fType(s)
{
}
@@ -743,9 +743,9 @@ void CUDCounter::setEndCount(unsigned int t)
fEnd = t;
}
-QString CUDCounter::moo() const
+TQString CUDCounter::moo() const
{
- QString result = fType + ": " +
+ TQString result = fType + ": " +
i18n("Start: %1. End: %2. ").arg(fStart).arg(fEnd);
if (fC > 0) result += i18n("%1 new. ").arg(fC);
diff --git a/kpilot/lib/plugin.h b/kpilot/lib/plugin.h
index b825b899f..d768b6015 100644
--- a/kpilot/lib/plugin.h
+++ b/kpilot/lib/plugin.h
@@ -29,7 +29,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "syncAction.h"
@@ -67,11 +67,11 @@ namespace Pilot
* and it's what is used in the KPilot conduit configuration dialog.
* The factory is asked for a "ConduitConfigBase" object.
*
-* NB. The reason that this is a QObject which needs to create a
-* separate widget - instead of a QWidget subclass - has to do with
+* NB. The reason that this is a TQObject which needs to create a
+* separate widget - instead of a TQWidget subclass - has to do with
* layouting. If you make the widget with designer then the easiest
* thing to do is to use a grid layout there. Making ConduitConfigBase
-* a QWidget subclass would require an additional layout here, which
+* a TQWidget subclass would require an additional layout here, which
* seems a little foolish.
*
*/
@@ -83,7 +83,7 @@ public:
* Constructor. Creates a conduit configuration support object
* with the given parent @p parent and name (optional) @p n.
*/
- ConduitConfigBase(QWidget *parent=0L, const char *n=0L);
+ ConduitConfigBase(TQWidget *parent=0L, const char *n=0L);
/** Destructor. */
virtual ~ConduitConfigBase();
@@ -100,7 +100,7 @@ public:
} ;
/** Accessor for the actual widget for the configuration. */
- QWidget *widget() const
+ TQWidget *widget() const
{
return fWidget;
} ;
@@ -124,7 +124,7 @@ public:
*/
virtual bool maybeSave();
- QString conduitName() const { return fConduitName; } ;
+ TQString conduitName() const { return fConduitName; } ;
/**
* This is the function that does the work of adding an about
@@ -139,7 +139,7 @@ public:
* @param data The KAboutData that is used.
*
*/
- static void addAboutPage(QTabWidget *w,
+ static void addAboutPage(TQTabWidget *w,
KAboutData *data=0L);
/**
@@ -154,20 +154,20 @@ public:
* @param parent The widget that holds the about widget.
* @param data The KAboutData that is used to populate the widget.
*/
- static QWidget *aboutPage(QWidget *parent, KAboutData *data=0L);
+ static TQWidget *aboutPage(TQWidget *parent, KAboutData *data=0L);
protected:
/**
* This function provides the string for the prompt used
* in maybeSave(). Override it to change the text.
*/
- virtual QString maybeSaveText() const;
+ virtual TQString maybeSaveText() const;
void unmodified() { fModified=false; } ;
bool fModified;
- QWidget *fWidget;
- QString fConduitName;
+ TQWidget *fWidget;
+ TQString fConduitName;
protected slots:
@@ -196,7 +196,7 @@ class KDE_EXPORT CUDCounter
public:
/** Create new counter initialized to 0, and be told what
* kind of CUD we're counting (PC or Handheld, etc.) */
- CUDCounter(QString s);
+ CUDCounter(TQString s);
/** Track the creation of @p c items */
void created(unsigned int c=1);
@@ -227,12 +227,12 @@ public:
* objects created, updated, deleted. This
* string is already i18n()ed.
*/
- QString moo() const;
+ TQString moo() const;
/** Type of counter(Handheld or PC). This string is already
* i18n()ed.
*/
- QString type() const { return fType; }
+ TQString type() const { return fType; }
private:
/** keep track of Creates, Updates, Deletes, and Total
* number of records so we can detect abnormal behavior and
@@ -243,7 +243,7 @@ private:
/** What kind of CUD are we keeping track of so we can
* moo() it out later? (PC, Handheld, etc.)
*/
- QString fType;
+ TQString fType;
} ;
@@ -264,7 +264,7 @@ Q_OBJECT
public:
ConduitAction(KPilotLink *,
const char *name=0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~ConduitAction();
/** ConduitAction is done doing work. Allow it to sanity-check the
@@ -272,7 +272,7 @@ public:
*/
void finished();
- QString conduitName() const { return fConduitName; } ;
+ TQString conduitName() const { return fConduitName; } ;
/** Retrieve the sync mode set for this action. */
const SyncMode &syncMode() const { return fSyncDirection; };
@@ -338,13 +338,13 @@ protected:
* @param retrieved indicator whether the database had to be loaded
* from the handheld.
*/
- bool openDatabases(const QString &dbName, bool*retrieved=0L);
+ bool openDatabases(const TQString &dbName, bool*retrieved=0L);
/**
* Name of the conduit; might be changed by subclasses. Should
* normally be set in the constructor.
*/
- QString fConduitName;
+ TQString fConduitName;
/** Every plugin has 2 CUDCounters--one for keeping track of
* changes made to PC data and one for keeping track of Palm data. */
@@ -370,7 +370,7 @@ Q_OBJECT
public:
ConduitProxy(KPilotLink *,
- const QString &desktopName,
+ const TQString &desktopName,
const SyncAction::SyncMode &m);
protected:
@@ -379,17 +379,17 @@ protected slots:
void execDone(SyncAction *);
protected:
- QString fDesktopName;
- QString fLibraryName;
+ TQString fDesktopName;
+ TQString fLibraryName;
ConduitAction *fConduit;
} ;
/** A namespace containing only static helper methods. */
namespace PluginUtility
{
- /** Searches the argument list for --foo=bar and returns bar, QString::null if not found.
+ /** Searches the argument list for --foo=bar and returns bar, TQString::null if not found.
* Don't include the -- in the argname. */
- QString findArgument(const QStringList &a, const QString argname);
+ TQString findArgument(const TQStringList &a, const TQString argname);
/**
* This function attempts to detect whether or not the given
@@ -399,14 +399,14 @@ namespace PluginUtility
* The current approach is to ask the DCOP server if the application
* has registered.
*/
- bool isRunning(const QCString &appName);
+ bool isRunning(const TQCString &appName);
/**
* Check a given library for its version, returning 0 if no
* version symbol is found.
*/
unsigned long pluginVersion(const KLibrary *);
- QString pluginVersionString(const KLibrary *);
+ TQString pluginVersionString(const KLibrary *);
}
/**
@@ -420,7 +420,7 @@ namespace PluginUtility
* Q_OBJECT
*
* public:
-* KPilotPlugin(QObject * = 0L,const char * = 0L) ;
+* KPilotPlugin(TQObject * = 0L,const char * = 0L) ;
* virtual ~KPilotPlugin();
* </pre>
*
@@ -440,10 +440,10 @@ namespace PluginUtility
*
* <pre>
* protected:
-* virtual QObject* createObject( QObject* parent = 0,
+* virtual TQObject* createObject( TQObject* parent = 0,
* const char* name = 0,
-* const char* classname = "QObject",
-* const QStringList &args = QStringList() );
+* const char* classname = "TQObject",
+* const TQStringList &args = TQStringList() );
* </pre>
*
* More boilerplate, and support for an instance and about data, used
diff --git a/kpilot/lib/pluginfactory.h b/kpilot/lib/pluginfactory.h
index 8eecc5584..f43c706db 100644
--- a/kpilot/lib/pluginfactory.h
+++ b/kpilot/lib/pluginfactory.h
@@ -27,7 +27,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <klibloader.h>
@@ -45,22 +45,22 @@ class KPilotLink;
template <class Widget, class Action> class ConduitFactory : public KLibFactory
{
public:
- ConduitFactory(QObject *parent = 0, const char *name = 0) :
+ ConduitFactory(TQObject *parent = 0, const char *name = 0) :
KLibFactory(parent,name)
{ fInstance = new KInstance(name); } ;
virtual ~ConduitFactory()
{ delete fInstance; } ;
protected:
- virtual QObject *createObject(
- QObject* parent = 0,
+ virtual TQObject *createObject(
+ TQObject* parent = 0,
const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList() )
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList() )
{
if (qstrcmp(classname,"ConduitConfigBase")==0)
{
- QWidget *w = dynamic_cast<QWidget *>(parent);
+ TQWidget *w = dynamic_cast<TQWidget *>(parent);
if (w) return new Widget(w,name);
else
{
diff --git a/kpilot/lib/recordConduit.cc b/kpilot/lib/recordConduit.cc
index f11b3b573..f7692de47 100644
--- a/kpilot/lib/recordConduit.cc
+++ b/kpilot/lib/recordConduit.cc
@@ -37,8 +37,8 @@
#include "options.h"
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include "pilotAppCategory.h"
#include "pilotSerialDatabase.h"
@@ -75,8 +75,8 @@ long version_record_conduit = Pilot::PLUGIN_API;
else fIDList=fDatabase->modifiedIDList();
fIDListIterator = fIDList.begin();
- fTimer = new QTimer(this);
- connect(fTimer,SIGNAL(timeout()),this,SLOT(process()));
+ fTimer = new TQTimer(this);
+ connect(fTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(process()));
fTimer->start(0,false); // Fire as often as possible to prompt processing
return true;
}
@@ -170,7 +170,7 @@ long version_record_conduit = Pilot::PLUGIN_API;
}
-QString RecordConduitBase::name(RecordConduitBase::SyncProgress s)
+TQString RecordConduitBase::name(RecordConduitBase::SyncProgress s)
{
switch(s)
{
@@ -184,7 +184,7 @@ QString RecordConduitBase::name(RecordConduitBase::SyncProgress s)
}
-QString RecordConduitBase::name(RecordConduitBase::States s)
+TQString RecordConduitBase::name(RecordConduitBase::States s)
{
switch(s)
{
@@ -216,7 +216,7 @@ bool RecordConduit::PCData::makeArchived( RecordConduit::PCEntry *pcEntry )
/* Builds the map which links record ids to uid's of PCEntry. This is the slow implementation,
* that should always work. subclasses should reimplement it to speed things up.
*/
-bool RecordConduit::PCData::mapContactsToPilot( QMap<recordid_t,QString> &idContactMap )
+bool RecordConduit::PCData::mapContactsToPilot( TQMap<recordid_t,TQString> &idContactMap )
{
FUNCTIONSETUP;
@@ -249,7 +249,7 @@ bool RecordConduit::PCData::mapContactsToPilot( QMap<recordid_t,QString> &idCont
bool RecordConduit::mArchiveDeleted = false;
-RecordConduit::RecordConduit(QString name, KPilotDeviceLink * o, const char *n, const QStringList & a):
+RecordConduit::RecordConduit(TQString name, KPilotDeviceLink * o, const char *n, const TQStringList & a):
ConduitAction(o, n, a),
mPCData(0), mPalmIndex(0),
mEntryMap(), mSyncedIds(), mAllIds()
@@ -327,7 +327,7 @@ RecordConduit::~RecordConduit()
for this, and no longer purge the whole addressbook before the sync to
prevent data loss in case of connection loss. */
- QTimer::singleShot(0, this, SLOT(slotPalmRecToPC()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC()));
return true;
}
@@ -342,7 +342,7 @@ void RecordConduit::slotPalmRecToPC()
if ( getSyncDirection() == SyncAction::eCopyPCToHH )
{
mPCIter = mPCData->begin();
- QTimer::singleShot(0, this, SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm()));
return;
}
@@ -354,7 +354,7 @@ void RecordConduit::slotPalmRecToPC()
if ( !palmRec )
{
mPCIter = mPCData->begin();
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
return;
}
@@ -362,7 +362,7 @@ void RecordConduit::slotPalmRecToPC()
if ( mSyncedIds.contains( palmRec->id() ) )
{
KPILOT_DELETE( palmRec );
- QTimer::singleShot( 0, this, SLOT( slotPalmRecToPC() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPalmRecToPC() ) );
return;
}
@@ -389,7 +389,7 @@ void RecordConduit::slotPalmRecToPC()
KPILOT_DELETE( palmRec );
KPILOT_DELETE( backupRec );
- QTimer::singleShot(0, this, SLOT(slotPalmRecToPC()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC()));
}
@@ -402,7 +402,7 @@ void RecordConduit::slotPCRecToPalm()
mPCData->atEnd( mPCIter ) )
{
mPalmIndex = 0;
- QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) );
return;
}
@@ -418,7 +418,7 @@ void RecordConduit::slotPCRecToPalm()
" marked archived, so don't sync." << endl;
#endif
KPILOT_DELETE( pcEntry );
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
return;
}
@@ -428,7 +428,7 @@ void RecordConduit::slotPCRecToPalm()
// it's a new item(no record ID and not inserted by the Palm -> PC sync), so add it
syncEntry( pcEntry, 0L, 0L );
KPILOT_DELETE( pcEntry );
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
return;
}
@@ -439,7 +439,7 @@ void RecordConduit::slotPCRecToPalm()
DEBUGKPILOT << ": address with id " << recID << " already synced." << endl;
#endif
KPILOT_DELETE( pcEntry );
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
return;
}
@@ -470,7 +470,7 @@ void RecordConduit::slotPCRecToPalm()
mSyncedIds.append( recID );
// done with the sync process, go on with the next one:
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
}
@@ -483,7 +483,7 @@ void RecordConduit::slotDeletedRecord()
if( !backupRec || isFirstSync() )
{
KPILOT_DELETE(backupRec);
- QTimer::singleShot( 0, this, SLOT( slotDeleteUnsyncedPCRecords() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeleteUnsyncedPCRecords() ) );
return;
}
@@ -491,11 +491,11 @@ void RecordConduit::slotDeletedRecord()
if ( mSyncedIds.contains( backupRec->id() ) )
{
KPILOT_DELETE( backupRec );
- QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) );
return;
}
- QString uid = mEntryMap[ backupRec->id() ];
+ TQString uid = mEntryMap[ backupRec->id() ];
PCEntry *pcEntry = mPCData->findByUid( uid );
PilotRecord *palmRec = fDatabase->readRecordById( backupRec->id() );
PilotAppCategory *backupEntry = 0L;
@@ -513,7 +513,7 @@ void RecordConduit::slotDeletedRecord()
KPILOT_DELETE( backupEntry );
KPILOT_DELETE( palmRec );
KPILOT_DELETE( backupRec );
- QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) );
}
@@ -523,9 +523,9 @@ void RecordConduit::slotDeleteUnsyncedPCRecords()
FUNCTIONSETUP;
if ( getSyncDirection() == SyncAction::eCopyHHToPC )
{
- QStringList uids;
+ TQStringList uids;
RecordIDList::iterator it;
- QString uid;
+ TQString uid;
for ( it = mSyncedIds.begin(); it != mSyncedIds.end(); ++it)
{
uid = mEntryMap[ *it ];
@@ -533,8 +533,8 @@ void RecordConduit::slotDeleteUnsyncedPCRecords()
}
// TODO: Does this speed up anything?
// qHeapSort( uids );
- const QStringList alluids( mPCData->uids() );
- QStringList::ConstIterator uidit;
+ const TQStringList alluids( mPCData->uids() );
+ TQStringList::ConstIterator uidit;
for ( uidit = alluids.constBegin(); uidit != alluids.constEnd(); ++uidit )
{
if ( !uids.contains( *uidit ) )
@@ -546,7 +546,7 @@ void RecordConduit::slotDeleteUnsyncedPCRecords()
}
}
}
- QTimer::singleShot(0, this, SLOT(slotDeleteUnsyncedHHRecords()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteUnsyncedHHRecords()));
}
@@ -570,7 +570,7 @@ void RecordConduit::slotDeleteUnsyncedHHRecords()
}
}
}
- QTimer::singleShot( 0, this, SLOT( slotCleanup() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotCleanup() ) );
}
@@ -602,11 +602,11 @@ void RecordConduit::slotCleanup()
/** Return the list of category names on the handheld
*/
-const QStringList RecordConduit::categories() const
+const TQStringList RecordConduit::categories() const
{
- QStringList cats;
+ TQStringList cats;
for ( unsigned int j = 0; j < Pilot::CATEGORY_COUNT; j++ ) {
- QString catName( category( j ) );
+ TQString catName( category( j ) );
if ( !catName.isEmpty() ) cats << catName;
}
return cats;
@@ -684,7 +684,7 @@ void RecordConduit::_setAppInfo()
}
-int RecordConduit::compareStr( const QString & str1, const QString & str2 )
+int RecordConduit::compareStr( const TQString & str1, const TQString & str2 )
{
// FUNCTIONSETUP;
if ( str1.isEmpty() && str2.isEmpty() )
@@ -696,23 +696,23 @@ int RecordConduit::compareStr( const QString & str1, const QString & str2 )
/**
* _getCat returns the id of the category from the given categories list.
- * If the address has no categories on the PC, QString::null is returned.
+ * If the address has no categories on the PC, TQString::null is returned.
* If the current category exists in the list of cats, it is returned
* Otherwise the first cat in the list that exists on the HH is returned
- * If none of the categories exists on the palm, QString::null is returned
+ * If none of the categories exists on the palm, TQString::null is returned
*/
-QString RecordConduit::getCatForHH( const QStringList cats, const QString curr ) const
+TQString RecordConduit::getCatForHH( const TQStringList cats, const TQString curr ) const
{
FUNCTIONSETUP;
if ( cats.size() < 1 )
- return QString::null;
+ return TQString::null;
if ( cats.contains( curr ) )
return curr;
- for ( QStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it)
+ for ( TQStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it)
{
for ( unsigned int j = 0; j < Pilot::CATEGORY_COUNT; j++ )
{
- QString catnm( category( j ) );
+ TQString catnm( category( j ) );
if ( !(*it).isEmpty() && ( (*it)==catnm ) )
{
return catnm;
@@ -720,11 +720,11 @@ QString RecordConduit::getCatForHH( const QStringList cats, const QString curr )
}
}
// If we have a free label, return the first possible cat
- QString lastCat( category( Pilot::CATEGORY_COUNT-1 ) );
- return ( lastCat.isEmpty() ) ? ( cats.first() ) : ( QString::null );
+ TQString lastCat( category( Pilot::CATEGORY_COUNT-1 ) );
+ return ( lastCat.isEmpty() ) ? ( cats.first() ) : ( TQString::null );
}
-void RecordConduit::setCategory(PCEntry * pcEntry, QString cat)
+void RecordConduit::setCategory(PCEntry * pcEntry, TQString cat)
{
if ( !cat.isEmpty() && cat!=category( 0 ) )
pcEntry->insertCategory(cat);
@@ -1096,7 +1096,7 @@ RecordConduit::PCEntry *RecordConduit::findMatch( PilotAppCategory *palmEntry )
// first, use the pilotID to UID map to find the appropriate record
if( !isFirstSync() && ( palmEntry->id() > 0) )
{
- QString id( mEntryMap[palmEntry->id()] );
+ TQString id( mEntryMap[palmEntry->id()] );
#ifdef DEBUG
DEBUGKPILOT << fname << ": PilotRecord has id " << palmEntry->id() << ", mapped to " << id << endl;
#endif
@@ -1131,7 +1131,7 @@ RecordConduit::PCEntry *RecordConduit::findMatch( PilotAppCategory *palmEntry )
KPILOT_DELETE( abEntry );
}
#ifdef DEBUG
- DEBUGKPILOT << fname << ": Could not find any entry matching Palm record with id " << QString::number( palmEntry->id() ) << endl;
+ DEBUGKPILOT << fname << ": Could not find any entry matching Palm record with id " << TQString::number( palmEntry->id() ) << endl;
#endif
return 0;
}
diff --git a/kpilot/lib/recordConduit.h b/kpilot/lib/recordConduit.h
index d12ceef2e..743e326d2 100644
--- a/kpilot/lib/recordConduit.h
+++ b/kpilot/lib/recordConduit.h
@@ -27,7 +27,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klocale.h>
#include "plugin.h"
@@ -57,11 +57,11 @@ class RecordConduitBase : public ConduitAction
{
Q_OBJECT
public:
- /** Constructor. The QStringList @p a sets flags for the ConduitAction.
+ /** Constructor. The TQStringList @p a sets flags for the ConduitAction.
*/
RecordConduitBase(KPilotDeviceLink *o,
const char *n,
- const QStringList a = QStringList()) :
+ const TQStringList a = TQStringList()) :
ConduitAction(o,n,a),
fTimer(0L)
{
@@ -80,12 +80,12 @@ public:
enum SyncProgress { NotDone=0, Done=1, Error=2 } ;
/** Returns a human-readable name for the progress indicator @p s */
- static QString name(SyncProgress s);
+ static TQString name(SyncProgress s);
/** State of the conduit's sync. This is changed by process(). */
enum States { Initialize, PalmToPC, PCToPalm, Cleanup } ;
- static QString name(States s);
+ static TQString name(States s);
protected:
/** Function called at the beginning of a sync to load data from the PC.
@@ -129,14 +129,14 @@ protected:
private:
/** Timer to signal the process() slot. Used to keep the UI responsive. */
- QTimer *fTimer;
+ TQTimer *fTimer;
States fState;
Pilot::RecordIDList fIDList;
Pilot::RecordIDList::Iterator fIDListIterator;
- QString fDBName;
+ TQString fDBName;
} ;
template <class PCEntry, class PCContainer, class HHEntry, class HHAppInfo, class Syncer>
@@ -146,8 +146,8 @@ public:
/** Construct a record conduit on a given device link. */
RecordConduit(
KPilotDeviceLink *o /**< Connection to HH */,
- const char *n /**< Name for QObject */,
- const QStringList a = QStringList() /**< Flags */) :
+ const char *n /**< Name for TQObject */,
+ const TQStringList a = TQStringList() /**< Flags */) :
RecordConduitBase(o,n,a)
{
} ;
diff --git a/kpilot/lib/syncAction.cc b/kpilot/lib/syncAction.cc
index 818503807..d9f539559 100644
--- a/kpilot/lib/syncAction.cc
+++ b/kpilot/lib/syncAction.cc
@@ -34,17 +34,17 @@
#include <pi-socket.h>
#include <pi-dlp.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtl.h>
-#include <qstyle.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtl.h>
+#include <tqstyle.h>
#include <kdialogbase.h>
#include <kglobal.h>
@@ -57,7 +57,7 @@
SyncAction::SyncAction(KPilotLink *p,
const char *name) :
- QObject(p, name),
+ TQObject(p, name),
fHandle(p),
fParent(0L)
{
@@ -65,9 +65,9 @@ SyncAction::SyncAction(KPilotLink *p,
}
SyncAction::SyncAction(KPilotLink *p,
- QWidget * visibleparent,
+ TQWidget * visibleparent,
const char *name) :
- QObject(p, name),
+ TQObject(p, name),
fHandle(p),
fParent(visibleparent)
{
@@ -78,12 +78,12 @@ SyncAction::~SyncAction()
{
}
-/* virtual */ QString SyncAction::statusString() const
+/* virtual */ TQString SyncAction::statusString() const
{
FUNCTIONSETUP;
- QString s = CSL1("status=");
+ TQString s = CSL1("status=");
- s.append(QString::number(status()));
+ s.append(TQString::number(status()));
return s;
}
@@ -101,7 +101,7 @@ SyncAction::~SyncAction()
if (!r)
{
emit logError(i18n("The conduit %1 could not be executed.")
- .arg(QString::fromLatin1(name())));
+ .arg(TQString::fromLatin1(name())));
delayDone();
}
}
@@ -113,7 +113,7 @@ SyncAction::~SyncAction()
bool SyncAction::delayDone()
{
- QTimer::singleShot(0,this,SLOT(delayedDoneSlot()));
+ TQTimer::singleShot(0,this,TQT_SLOT(delayedDoneSlot()));
return true;
}
@@ -134,7 +134,7 @@ static struct
}
;
-SyncAction::SyncMode::SyncMode(const QStringList &args) :
+SyncAction::SyncMode::SyncMode(const TQStringList &args) :
fMode(eHotSync),
fTest(args.contains("--test")),
fLocal(args.contains("--local"))
@@ -142,7 +142,7 @@ SyncAction::SyncMode::SyncMode(const QStringList &args) :
int i = 0;
while(maps[i].name)
{
- if (args.contains(QString::fromLatin1(maps[i].name)))
+ if (args.contains(TQString::fromLatin1(maps[i].name)))
{
fMode = maps[i].mode;
break;
@@ -170,18 +170,18 @@ SyncAction::SyncMode::SyncMode(Mode m, bool test, bool local) :
}
}
-QStringList SyncAction::SyncMode::list() const
+TQStringList SyncAction::SyncMode::list() const
{
FUNCTIONSETUPL(3);
- QStringList l;
+ TQStringList l;
int i=0;
while(maps[i].name)
{
if ( fMode == maps[i].mode )
{
- l.append(QString::fromLatin1(maps[i].name));
+ l.append(TQString::fromLatin1(maps[i].name));
break;
}
i++;
@@ -189,7 +189,7 @@ QStringList SyncAction::SyncMode::list() const
if ( !maps[i].name )
{
WARNINGKPILOT << "Mode " << fMode << " does not have a name." << endl;
- l.append(QString::fromLatin1(maps[0].name));
+ l.append(TQString::fromLatin1(maps[0].name));
}
if (isTest()) l.append(CSL1("--test"));
@@ -197,7 +197,7 @@ QStringList SyncAction::SyncMode::list() const
return l;
}
-/* static */ QString SyncAction::SyncMode::name(SyncAction::SyncMode::Mode e)
+/* static */ TQString SyncAction::SyncMode::name(SyncAction::SyncMode::Mode e)
{
switch(e)
{
@@ -211,9 +211,9 @@ QStringList SyncAction::SyncMode::list() const
return CSL1("<unknown>");
}
-QString SyncAction::SyncMode::name() const
+TQString SyncAction::SyncMode::name() const
{
- QString s = name(fMode);
+ TQString s = name(fMode);
if (isTest())
{
@@ -272,7 +272,7 @@ void SyncAction::startTickle(unsigned timeout)
}
else
{
- connect(deviceLink(),SIGNAL(timeout()),this,SIGNAL(timeout()));
+ connect(deviceLink(),TQT_SIGNAL(timeout()),this,TQT_SIGNAL(timeout()));
deviceLink()->startTickle(timeout);
}
}
@@ -286,18 +286,18 @@ void SyncAction::stopTickle()
}
else
{
- disconnect(deviceLink(),SIGNAL(timeout()),this,SIGNAL(timeout()));
+ disconnect(deviceLink(),TQT_SIGNAL(timeout()),this,TQT_SIGNAL(timeout()));
deviceLink()->stopTickle();
}
}
-int SyncAction::questionYesNo(const QString & text,
- const QString & caption,
- const QString & key,
+int SyncAction::questionYesNo(const TQString & text,
+ const TQString & caption,
+ const TQString & key,
unsigned timeout,
- const QString & yes,
- const QString &no )
+ const TQString & yes,
+ const TQString &no )
{
FUNCTIONSETUP;
@@ -322,17 +322,17 @@ int SyncAction::questionYesNo(const QString & text,
if ( (timeout > 0) && ( deviceLink() ) )
{
- QObject::connect(deviceLink(), SIGNAL(timeout()),
- dialog, SLOT(slotCancel()));
+ TQObject::connect(deviceLink(), TQT_SIGNAL(timeout()),
+ dialog, TQT_SLOT(slotCancel()));
startTickle(timeout);
}
#if KDE_IS_VERSION(3,3,0)
r = (KMessageBox::ButtonCode) KMessageBox::createKMessageBox(dialog,
- QMessageBox::Question,
+ TQMessageBox::Question,
text,
- QStringList(),
- (key.isEmpty() ? QString::null : i18n("&Do not ask again")),
+ TQStringList(),
+ (key.isEmpty() ? TQString::null : i18n("&Do not ask again")),
&checkboxReturn,
0);
@@ -342,32 +342,32 @@ int SyncAction::questionYesNo(const QString & text,
// by Waldo Bastian.
//
//
- QVBox *topcontents = new QVBox(dialog);
+ TQVBox *topcontents = new TQVBox(dialog);
topcontents->setSpacing(KDialog::spacingHint() * 2);
topcontents->setMargin(KDialog::marginHint() * 2);
- QWidget *contents = new QWidget(topcontents);
- QHBoxLayout *lay = new QHBoxLayout(contents);
+ TQWidget *contents = new TQWidget(topcontents);
+ TQHBoxLayout *lay = new TQHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint() * 2);
lay->addStretch(1);
- QLabel *label1 = new QLabel( contents);
- label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
+ TQLabel *label1 = new TQLabel( contents);
+ label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information));
lay->add( label1 );
- QLabel *label2 = new QLabel( text, contents);
+ TQLabel *label2 = new TQLabel( text, contents);
label2->setMinimumSize(label2->sizeHint());
lay->add(label2);
lay->addStretch(1);
- QSize extraSize = QSize(50, 30);
+ TQSize extraSize = TQSize(50, 30);
- QCheckBox *checkbox = 0L;
+ TQCheckBox *checkbox = 0L;
if (!key.isEmpty())
{
- checkbox = new QCheckBox(i18n("Do not ask again"),topcontents);
- extraSize = QSize(50,0);
+ checkbox = new TQCheckBox(i18n("Do not ask again"),topcontents);
+ extraSize = TQSize(50,0);
}
dialog->setMainWidget(topcontents);
@@ -400,12 +400,12 @@ int SyncAction::questionYesNo(const QString & text,
}
-int SyncAction::questionYesNoCancel(const QString & text,
- const QString & caption,
- const QString & key,
+int SyncAction::questionYesNoCancel(const TQString & text,
+ const TQString & caption,
+ const TQString & key,
unsigned timeout,
- const QString &yes,
- const QString &no)
+ const TQString &yes,
+ const TQString &no)
{
FUNCTIONSETUP;
@@ -435,17 +435,17 @@ int SyncAction::questionYesNoCancel(const QString & text,
if ( (timeout > 0) && (deviceLink()) )
{
- QObject::connect(deviceLink(), SIGNAL(timeout()),
- dialog, SLOT(slotCancel()));
+ TQObject::connect(deviceLink(), TQT_SIGNAL(timeout()),
+ dialog, TQT_SLOT(slotCancel()));
startTickle(timeout);
}
#if KDE_IS_VERSION(3,3,0)
r = KMessageBox::createKMessageBox(dialog,
- QMessageBox::Question,
+ TQMessageBox::Question,
text,
- QStringList(),
- (key.isEmpty() ? QString::null : i18n("&Do not ask again")),
+ TQStringList(),
+ (key.isEmpty() ? TQString::null : i18n("&Do not ask again")),
&checkboxReturn,
0);
#else
@@ -454,32 +454,32 @@ int SyncAction::questionYesNoCancel(const QString & text,
// by Waldo Bastian.
//
//
- QVBox *topcontents = new QVBox(dialog);
+ TQVBox *topcontents = new TQVBox(dialog);
topcontents->setSpacing(KDialog::spacingHint() * 2);
topcontents->setMargin(KDialog::marginHint() * 2);
- QWidget *contents = new QWidget(topcontents);
- QHBoxLayout *lay = new QHBoxLayout(contents);
+ TQWidget *contents = new TQWidget(topcontents);
+ TQHBoxLayout *lay = new TQHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint() * 2);
lay->addStretch(1);
- QLabel *label1 = new QLabel( contents);
- label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
+ TQLabel *label1 = new TQLabel( contents);
+ label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information));
lay->add( label1 );
- QLabel *label2 = new QLabel( text, contents);
+ TQLabel *label2 = new TQLabel( text, contents);
label2->setMinimumSize(label2->sizeHint());
lay->add(label2);
lay->addStretch(1);
- QSize extraSize = QSize(50, 30);
+ TQSize extraSize = TQSize(50, 30);
- QCheckBox *checkbox = 0L;
+ TQCheckBox *checkbox = 0L;
if (!key.isEmpty())
{
- checkbox = new QCheckBox(i18n("Do not ask again"),topcontents);
- extraSize = QSize(50,0);
+ checkbox = new TQCheckBox(i18n("Do not ask again"),topcontents);
+ extraSize = TQSize(50,0);
}
dialog->setMainWidget(topcontents);
diff --git a/kpilot/lib/syncAction.h b/kpilot/lib/syncAction.h
index a93bff99c..4643e7c6e 100644
--- a/kpilot/lib/syncAction.h
+++ b/kpilot/lib/syncAction.h
@@ -33,9 +33,9 @@
#include <pi-dlp.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kpilotlink.h"
@@ -55,7 +55,7 @@ public:
SyncAction(KPilotLink *p,
const char *name=0L);
SyncAction(KPilotLink *p,
- QWidget *visibleparent,
+ TQWidget *visibleparent,
const char *name=0L);
~SyncAction();
@@ -70,7 +70,7 @@ public:
return fActionStatus;
}
/** Return a human-readable representation of the status. */
- virtual QString statusString() const;
+ virtual TQString statusString() const;
protected:
/**
@@ -97,9 +97,9 @@ public slots:
signals:
void syncDone(SyncAction *);
- void logMessage(const QString &);
- void logError(const QString &);
- void logProgress(const QString &,int);
+ void logMessage(const TQString &);
+ void logError(const TQString &);
+ void logProgress(const TQString &,int);
protected slots:
/** This slot emits syncDone(), and does nothing else. This
@@ -128,7 +128,7 @@ public:
* @note Having messages appear on the handheld but not in KPilot
* should be a @em very rare occurrence.
*/
- void addSyncLogEntry(const QString &e,bool log=true)
+ void addSyncLogEntry(const TQString &e,bool log=true)
{
if (deviceLink())
{
@@ -138,17 +138,17 @@ public:
/** Public API for adding a message to the log in KPilot.
* Adds @p msg to the synclog maintained on the PC.
*/
- void addLogMessage( const QString &msg )
+ void addLogMessage( const TQString &msg )
{
emit logMessage( msg );
}
/** Log an error message in KPilot (the PC side of things). */
- void addLogError( const QString &msg )
+ void addLogError( const TQString &msg )
{
emit logError( msg );
}
/** Log progress in KPilot (the PC side of things). */
- void addLogProgress( const QString &msg, int prog )
+ void addLogProgress( const TQString &msg, int prog )
{
emit logProgress( msg, prog );
}
@@ -217,7 +217,7 @@ public:
* a string list to pass aparameters to the shared
* library loader.
*/
- SyncMode(const QStringList &l);
+ SyncMode(const TQStringList &l);
/** Returns the kind of sync; this is just incomplete
* information, since a test hot sync is very different from
@@ -311,20 +311,20 @@ public:
/**
* Returns a standard name for each of the sync modes.
*/
- static QString name(Mode);
+ static TQString name(Mode);
/**
* Returns a (human readable) name for this particular mode,
* including extra information about test and local mode.
*/
- QString name() const;
+ TQString name() const;
/**
- * Returns a QStringList that, when passed to the constructor
+ * Returns a TQStringList that, when passed to the constructor
* of SyncMode, will re-create it. Used to pass modes into
* shared library factories.
*/
- QStringList list() const;
+ TQStringList list() const;
private:
Mode fMode;
@@ -378,7 +378,7 @@ signals:
protected:
- QWidget *fParent;
+ TQWidget *fParent;
/**
* Ask a yes-no question of the user. This has a timeout so that
@@ -392,18 +392,18 @@ protected:
* @p key Key for the "Don't ask again" code.
* @p timeout Timeout, in seconds.
*/
- int questionYesNo(const QString &question ,
- const QString &caption = QString::null,
- const QString &key = QString::null,
+ int questionYesNo(const TQString &question ,
+ const TQString &caption = TQString::null,
+ const TQString &key = TQString::null,
unsigned timeout = 20,
- const QString &yes = QString::null,
- const QString &no = QString::null );
- int questionYesNoCancel(const QString &question ,
- const QString &caption = QString::null,
- const QString &key = QString::null,
+ const TQString &yes = TQString::null,
+ const TQString &no = TQString::null );
+ int questionYesNoCancel(const TQString &question ,
+ const TQString &caption = TQString::null,
+ const TQString &key = TQString::null,
unsigned timeout = 20,
- const QString &yes = QString::null,
- const QString &no = QString::null ) ;
+ const TQString &yes = TQString::null,
+ const TQString &no = TQString::null ) ;
};