diff options
Diffstat (limited to 'kpilot/lib/pilotLocalDatabase.cc')
-rw-r--r-- | kpilot/lib/pilotLocalDatabase.cc | 76 |
1 files changed, 38 insertions, 38 deletions
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) { |