diff options
Diffstat (limited to 'kpilot/hotSync.cc')
-rw-r--r-- | kpilot/hotSync.cc | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/kpilot/hotSync.cc b/kpilot/hotSync.cc index e0bc7e3..a6d4cc4 100644 --- a/kpilot/hotSync.cc +++ b/kpilot/hotSync.cc @@ -65,10 +65,10 @@ #include "hotSync.moc" -class BackupAction::Thread : public QThread +class BackupAction::Thread : public TQThread { public: - Thread( BackupAction *parent, + Thread( BackupAction *tqparent, KPilotLink *link, const TQString &filename, const DBInfo *info ); @@ -151,7 +151,7 @@ public: return false; } - if (fNoBackupCreators.findIndex(info->creator) != -1) + if (fNoBackupCreators.tqfindIndex(info->creator) != -1) { return false; } @@ -270,7 +270,7 @@ static inline void initNoBackup(TQStringList &dbnames, unsigned long tag = *i; pi_untag(buf,tag); buf[4]=0; - creatorids.append(CSL1("[%1]").arg(buf)); + creatorids.append(CSL1("[%1]").tqarg(buf)); } DEBUGKPILOT << fname << ": Will skip creators " << creatorids << endl; } @@ -336,7 +336,7 @@ static inline bool checkBackupDirectory( const TQString &backupDir ) fP->fBackupDir = fP->fPreferBackupDir; } - logMessage(i18n("Backup directory: %1.").arg(fP->fBackupDir)); + logMessage(i18n("Backup directory: %1.").tqarg(fP->fBackupDir)); DEBUGKPILOT << fname << ": This Pilot user's name is \"" @@ -349,18 +349,18 @@ static inline bool checkBackupDirectory( const TQString &backupDir ) if (fP->fFullBackup) { - fActionStatus = FullBackup; + fActiontqStatus = FullBackup; addSyncLogEntry(i18n("Full backup started.")); } else { - fActionStatus = FastBackup; + fActiontqStatus = FastBackup; addSyncLogEntry(i18n("Fast backup started")); } if (!checkBackupDirectory(fP->fBackupDir)) { - fActionStatus=BackupIncomplete; + fActiontqStatus=BackupIncomplete; // Don't issue an error message, checkBackupDirectory // did this already... return false; @@ -380,13 +380,13 @@ static inline bool checkBackupDirectory( const TQString &backupDir ) struct DBInfo info; // TODO: make the progress reporting more accurate - emit logProgress(TQString::null, fP->fDBIndex); + emit logProgress(TQString(), fP->fDBIndex); if (openConduit() < 0) { addSyncLogEntry(i18n("Exiting on cancel.")); endBackup(); - fActionStatus = BackupIncomplete; + fActiontqStatus = BackupIncomplete; return; } @@ -403,7 +403,7 @@ static inline bool checkBackupDirectory( const TQString &backupDir ) addSyncLogEntry( i18n("Fast backup complete.") ); } endBackup(); - fActionStatus = BackupComplete; + fActiontqStatus = BackupComplete; return; } @@ -416,7 +416,7 @@ static inline bool checkBackupDirectory( const TQString &backupDir ) // only backup data, not applications. if ( (fP->fFullBackup) || !PilotDatabase::isResource(&info) ) { - addSyncLogEntry(i18n("Backing up: %1").arg(Pilot::fromPilot(info.name))); + addSyncLogEntry(i18n("Backing up: %1").tqarg(Pilot::fromPilot(info.name))); if (!startBackupThread(&info)) { @@ -445,7 +445,7 @@ static inline bool checkBackupDirectory( const TQString &backupDir ) DEBUGKPILOT << fname << ": Skipping database <" << info.name << "> (no-backup list)" << endl; TQString s = i18n("Skipping %1") - .arg(Pilot::fromPilot(info.name)); + .tqarg(Pilot::fromPilot(info.name)); addSyncLogEntry(s); } TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB())); @@ -480,7 +480,7 @@ bool BackupAction::startBackupThread(DBInfo *info) WARNINGKPILOT << "Unable to open database <" << info->name << ">" << endl; KPILOT_DELETE(serial); addSyncLogEntry(i18n("Backup of %1 failed.\n") - .arg(Pilot::fromPilot(info->name))); + .tqarg(Pilot::fromPilot(info->name))); return false; } @@ -557,7 +557,7 @@ void BackupAction::endBackup() FUNCTIONSETUP; fP->fDBIndex = (-1); - fActionStatus = BackupEnded; + fActiontqStatus = BackupEnded; fP->fDeviceDBs.sort(); TQString old( TQString::null ); TQStringList::Iterator itr = fP->fDeviceDBs.begin(); @@ -660,7 +660,7 @@ FileInstallAction::~FileInstallAction() DEBUGKPILOT << fname << ": Installing file " << filePath << endl; #endif - TQString m = i18n("Installing %1").arg(fileName); + TQString m = i18n("Installing %1").tqarg(fileName); emit logProgress(m,(100 * fDBIndex) / (fList.count()+1)); m+=CSL1("\n"); emit addSyncLogEntry(m,false /* Don't print in KPilot's log. */ ); @@ -748,7 +748,7 @@ bool FileInstallAction::resourceOK(const TQString &fileName, const TQString &fil emit logError(i18n("The database in "%1" has a " "resource name that is longer than 31 characters. " "This suggests a bug in the tool used to create the database. " - "KPilot cannot install this database.").arg(fileName)); + "KPilot cannot install this database.").tqarg(fileName)); } return r; @@ -769,7 +769,7 @@ bool FileInstallAction::resourceOK(const TQString &fileName, const TQString &fil } else { - return TQString(CSL1("Installing %1")).arg(fList[fDBIndex]); + return TQString(CSL1("Installing %1")).tqarg(fList[fDBIndex]); } } } @@ -809,7 +809,7 @@ CheckUser::~CheckUser() "handheld have a username set. " "They <i>should</i> be set. " "Should KPilot set them to a default value " - "(<i>%1</i>)?</qt>").arg(defaultUserName); + "(<i>%1</i>)?</qt>").tqarg(defaultUserName); if (questionYesNo(q, i18n("User Unknown") /* ,"askUserNone" */) == KMessageBox::Yes) @@ -844,7 +844,7 @@ CheckUser::~CheckUser() q += i18n("KPilot has a username set " "(<i>%1</i>) but the handheld does not. " "Should KPilot's username be set in the " - "handheld as well?").arg(guiUserName); + "handheld as well?").tqarg(guiUserName); q += i18n("<br/>(<i>Note:</i> If your handheld " "has been reset to factory defaults, you " "should use <i>Restore</i> instead of a " @@ -885,7 +885,7 @@ CheckUser::~CheckUser() int r = questionYesNoCancel(q, i18n("User Mismatch"), - TQString::null, + TQString(), 20, i18n("Use KPilot Name"), i18n("Use Handheld Name")); @@ -986,14 +986,14 @@ void RestoreAction::setDirectory( const TQString &path ) DEBUGKPILOT << fname << ": Restoring user " << dirname << endl; #endif - TQDir dir(dirname, TQString::null, TQDir::Name, + TQDir dir(dirname, TQString(), TQDir::Name, TQDir::Files | TQDir::Readable | TQDir::NoSymLinks); if (!dir.exists()) { WARNINGKPILOT << "Restore directory " << dirname << " does not exist." << endl; - fActionStatus = Error; + fActiontqStatus = Error; addSyncLogEntry(i18n("Restore directory does not exist.") + CSL1(" ") + i18n("Restore not performed.")); return false; @@ -1021,7 +1021,7 @@ void RestoreAction::setDirectory( const TQString &path ) } - emit logProgress(i18n("Restoring %1...").arg(TQString::null),1); + emit logProgress(i18n("Restoring %1...").tqarg(TQString()),1); for (unsigned int i = 0; i < dir.count(); i++) { @@ -1041,13 +1041,13 @@ void RestoreAction::setDirectory( const TQString &path ) else { WARNINGKPILOT << "Can't open " << s << endl; - logMessage(i18n("File '%1' cannot be read.").arg(s)); + logMessage(i18n("File '%1' cannot be read.").tqarg(s)); } } fP->fDBIndex = 0; fP->fDBIterator = fP->fDBList.begin(); - fActionStatus = InstallingFiles; + fActiontqStatus = InstallingFiles; TQObject::connect(&(fP->fTimer), TQT_SIGNAL(timeout()), this, TQT_SLOT(installNextFile())); @@ -1060,14 +1060,14 @@ void RestoreAction::setDirectory( const TQString &path ) { FUNCTIONSETUP; - Q_ASSERT(fActionStatus == InstallingFiles); + Q_ASSERT(fActiontqStatus == InstallingFiles); if (fP->fDBIterator == fP->fDBList.end()) { fP->fTimer.stop(); - fActionStatus = Done; + fActiontqStatus = Done; addSyncLogEntry(i18n("OK.")); delayDone(); return; @@ -1081,9 +1081,9 @@ void RestoreAction::setDirectory( const TQString &path ) if (openConduit() < 0) { - WARNINGKPILOT << "Restore apparently canceled." << endl; + WARNINGKPILOT << "Restore aptqparently canceled." << endl; logMessage(i18n("Restore incomplete.")); - fActionStatus = Done; + fActiontqStatus = Done; emit syncDone(this); return; @@ -1091,14 +1091,14 @@ void RestoreAction::setDirectory( const TQString &path ) TQFileInfo databaseInfo(dbi.path); addSyncLogEntry(databaseInfo.fileName()); - emit logProgress(i18n("Restoring %1...").arg(databaseInfo.fileName()), + emit logProgress(i18n("Restoring %1...").tqarg(databaseInfo.fileName()), (100*fP->fDBIndex) / (fP->fDBList.count()+1)) ; if ( !deviceLink()->installFiles( dbi.path, false /* don't delete */ ) ) { WARNINGKPILOT << "Couldn't restore " << dbi.path << endl; logError(i18n("Cannot restore file `%1'.") - .arg(databaseInfo.fileName())); + .tqarg(databaseInfo.fileName())); } } @@ -1128,12 +1128,12 @@ void RestoreAction::setDirectory( const TQString &path ) -BackupAction::Thread::Thread( BackupAction *parent, +BackupAction::Thread::Thread( BackupAction *tqparent, KPilotLink *link, const TQString &filename, const DBInfo *info ) { - fParent = parent; + fParent = tqparent; fLink = link; fFilename = filename; memcpy(&fDBInfo,info,sizeof(DBInfo)); |