From 631a19d8c5c5f69dc0d941c1997806fb422c79a6 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:32:24 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- conduits/docconduit/doc-conduit.cc | 72 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'conduits/docconduit/doc-conduit.cc') diff --git a/conduits/docconduit/doc-conduit.cc b/conduits/docconduit/doc-conduit.cc index 0ac14f1..31a075b 100644 --- a/conduits/docconduit/doc-conduit.cc +++ b/conduits/docconduit/doc-conduit.cc @@ -300,7 +300,7 @@ bool DOCConduit::doSync(docSyncInfo &sinfo) } if (!sinfo.pdbfilename.isEmpty() && DOCConduitSettings::keepPDBsLocally() ) { PilotLocalDatabase*database=new PilotLocalDatabase(DOCConduitSettings::pDBDirectory(), - TQString::tqfromLatin1(sinfo.dbinfo.name), false); + TQString::fromLatin1(sinfo.dbinfo.name), false); if (database) { if ( database->deleteDatabase() !=0 ) { WARNINGKPILOT << "Unable to delete database " << sinfo.dbinfo.name << " on the PC" << endl; @@ -378,10 +378,10 @@ bool DOCConduit::doSync(docSyncInfo &sinfo) if (!postSyncAction(database, sinfo, res)) emit logError(i18n("Unable to install the locally created PalmDOC %1 to the handheld.") - .tqarg(TQString::tqfromLatin1(sinfo.dbinfo.name))); + .arg(TQString::fromLatin1(sinfo.dbinfo.name))); if (!res) emit logError(i18n("Conversion of PalmDOC \"%1\" failed.") - .tqarg(TQString::tqfromLatin1(sinfo.dbinfo.name))); + .arg(TQString::fromLatin1(sinfo.dbinfo.name))); // disconnect(&docconverter, TQT_SIGNAL(logError(const TQString &)), TQT_SIGNAL(logError(const TQString &))); // disconnect(&docconverter, TQT_SIGNAL(logMessage(const TQString &)), TQT_SIGNAL(logMessage(const TQString &))); // KPILOT_DELETE(database); @@ -389,7 +389,7 @@ bool DOCConduit::doSync(docSyncInfo &sinfo) else { emit logError(i18n("Unable to open or create the database %1.") - .tqarg(TQString::tqfromLatin1(sinfo.dbinfo.name))); + .arg(TQString::fromLatin1(sinfo.dbinfo.name))); } return res; } @@ -414,21 +414,21 @@ void DOCConduit::syncNextDB() { // if creator and/or type don't match, go to next db if (!isCorrectDBTypeCreator(dbinfo) || - fDBNames.contains(TQString::tqfromLatin1(dbinfo.name))) + fDBNames.contains(TQString::fromLatin1(dbinfo.name))) { TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB())); return; } - TQString txtfilename=constructTXTFileName(TQString::tqfromLatin1(dbinfo.name)); - TQString pdbfilename=constructPDBFileName(TQString::tqfromLatin1(dbinfo.name)); + TQString txtfilename=constructTXTFileName(TQString::fromLatin1(dbinfo.name)); + TQString pdbfilename=constructPDBFileName(TQString::fromLatin1(dbinfo.name)); - docSyncInfo syncInfo(TQString::tqfromLatin1(dbinfo.name), + docSyncInfo syncInfo(TQString::fromLatin1(dbinfo.name), txtfilename, pdbfilename, eSyncNone); syncInfo.dbinfo=dbinfo; needsSync(syncInfo); fSyncInfoList.append(syncInfo); - fDBNames.append(TQString::tqfromLatin1(dbinfo.name)); + fDBNames.append(TQString::fromLatin1(dbinfo.name)); TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB())); return; @@ -476,12 +476,12 @@ void DOCConduit::syncNextTXT() bool alreadySynced=fDBNames.contains(fl.baseName(TRUE)); if (!alreadySynced) { - docSyncInfo syncInfo(TQString::tqfromLatin1(dbinfo.name), + docSyncInfo syncInfo(TQString::fromLatin1(dbinfo.name), txtfilename, pdbfilename, eSyncNone); syncInfo.dbinfo=dbinfo; needsSync(syncInfo); fSyncInfoList.append(syncInfo); - fDBNames.append(TQString::tqfromLatin1(dbinfo.name)); + fDBNames.append(TQString::fromLatin1(dbinfo.name)); } else { #ifdef DEBUG DEBUGKPILOT<isOpen()) sinfo.fPalmtqStatus=eStatNew; - else sinfo.fPalmtqStatus=eStatDoesntExist; + if (TQFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatNew; + else sinfo.fPCStatus=eStatDoesntExist; + if (docdb && docdb->isOpen()) sinfo.fPalmStatus=eStatNew; + else sinfo.fPalmStatus=eStatDoesntExist; KPILOT_DELETE(docdb); switch (eSyncDirection) { case eSyncPDAToPC: - if (sinfo.fPalmtqStatus==eStatDoesntExist) + if (sinfo.fPalmStatus==eStatDoesntExist) sinfo.direction=eSyncDelete; else sinfo.direction=eSyncPDAToPC; break; case eSyncPCToPDA: - if (sinfo.fPCtqStatus==eStatDoesntExist) + if (sinfo.fPCStatus==eStatDoesntExist) sinfo.direction=eSyncDelete; else sinfo.direction=eSyncPCToPDA; break; case eSyncNone: // means actually both directions! - if (sinfo.fPCtqStatus==eStatNew) { - if (sinfo.fPalmtqStatus==eStatNew) sinfo.direction=eSyncConflict; + if (sinfo.fPCStatus==eStatNew) { + if (sinfo.fPalmStatus==eStatNew) sinfo.direction=eSyncConflict; else sinfo.direction=eSyncPCToPDA; } else { - if (sinfo.fPalmtqStatus==eStatNew) sinfo.direction=eSyncPDAToPC; + if (sinfo.fPalmStatus==eStatNew) sinfo.direction=eSyncPDAToPC; else { sinfo.direction=eSyncNone; #ifdef DEBUG @@ -756,9 +756,9 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo) } // Text was included in the last sync - if (!TQFile::exists(sinfo.txtfilename)) sinfo.fPCtqStatus=eStatDeleted; + if (!TQFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatDeleted; else if(pcTextChanged(sinfo.txtfilename)) { - sinfo.fPCtqStatus=eStatChanged; + sinfo.fPCStatus=eStatChanged; #ifdef DEBUG DEBUGKPILOT<<"PC side has changed!"<isOpen()) sinfo.fPalmtqStatus=eStatDeleted; + if (!docdb || !docdb->isOpen()) sinfo.fPalmStatus=eStatDeleted; else if (hhTextChanged(docdb)) { #ifdef DEBUG DEBUGKPILOT<<"Handheld side has changed!"<database(TQString::tqfromLatin1(dbinfo.name)); + return deviceLink()->database(TQString::fromLatin1(dbinfo.name)); } } @@ -950,7 +950,7 @@ bool DOCConduit::postSyncAction(PilotDatabase * database, if (DOCConduitSettings::keepPDBsLocally() && !DOCConduitSettings::localSync()) { PilotDatabase*db=deviceLink()->database( - TQString::tqfromLatin1(sinfo.dbinfo.name)); + TQString::fromLatin1(sinfo.dbinfo.name)); #ifdef DEBUG DEBUGKPILOT<<"Middle 1 Resetting sync flags for database " <