summaryrefslogtreecommitdiffstats
path: root/kpilot/lib/kpilotlocallink.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kpilot/lib/kpilotlocallink.cc')
-rw-r--r--kpilot/lib/kpilotlocallink.cc60
1 files changed, 30 insertions, 30 deletions
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 );