summaryrefslogtreecommitdiffstats
path: root/kpilot/lib/recordConduit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kpilot/lib/recordConduit.cc')
-rw-r--r--kpilot/lib/recordConduit.cc86
1 files changed, 43 insertions, 43 deletions
diff --git a/kpilot/lib/recordConduit.cc b/kpilot/lib/recordConduit.cc
index f11b3b57..f7692de4 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;
}