From f6f9c296c3f9d39a8c3d0ee64a542a47f450be28 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 1 Jul 2011 00:37:32 +0000 Subject: TQt4 port kpilot This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpilot@1238903 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- conduits/docconduit/doc-conduit.cc | 52 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'conduits/docconduit/doc-conduit.cc') diff --git a/conduits/docconduit/doc-conduit.cc b/conduits/docconduit/doc-conduit.cc index 54f1ab4..0bce0fe 100644 --- a/conduits/docconduit/doc-conduit.cc +++ b/conduits/docconduit/doc-conduit.cc @@ -163,7 +163,7 @@ bool DOCConduit::pcTextChanged(TQString txtfn) KMD5 docmd5; TQFile txtfile(txtfn); if (txtfile.open(IO_ReadOnly)){ - docmd5.update(txtfile); + docmd5.update(*TQT_TQIODEVICE(&txtfile)); TQString thisDigest(docmd5.hexDigest() /* .data() */); #ifdef DEBUG DEBUGKPILOT<<"New digest is "<config()->writeEntry(docconverter.txtFilename(), thisDigest); DOCConduitSettings::self()->config()->sync(); @@ -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.") - .arg(TQString::tqfromLatin1(sinfo.dbinfo.name))); + .tqarg(TQString::tqfromLatin1(sinfo.dbinfo.name))); if (!res) emit logError(i18n("Conversion of PalmDOC \"%1\" failed.") - .arg(TQString::tqfromLatin1(sinfo.dbinfo.name))); + .tqarg(TQString::tqfromLatin1(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.") - .arg(TQString::tqfromLatin1(sinfo.dbinfo.name))); + .tqarg(TQString::tqfromLatin1(sinfo.dbinfo.name))); } return res; } @@ -665,7 +665,7 @@ void DOCConduit::syncDatabases() { case eSyncDelete: case eSyncPDAToPC: case eSyncPCToPDA: - emit logMessage(i18n("Synchronizing text \"%1\"").arg(sinfo.handheldDB)); + emit logMessage(i18n("Synchronizing text \"%1\"").tqarg(sinfo.handheldDB)); if (!doSync(sinfo)) { // The sync could not be done, so inform the user (the error message should probably issued inside doSync) #ifdef DEBUG @@ -716,29 +716,29 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo) N N | C P H */ - if (TQFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatNew; - else sinfo.fPCStatus=eStatDoesntExist; - if (docdb && docdb->isOpen()) sinfo.fPalmStatus=eStatNew; - else sinfo.fPalmStatus=eStatDoesntExist; + if (TQFile::exists(sinfo.txtfilename)) sinfo.fPCtqStatus=eStatNew; + else sinfo.fPCtqStatus=eStatDoesntExist; + if (docdb && docdb->isOpen()) sinfo.fPalmtqStatus=eStatNew; + else sinfo.fPalmtqStatus=eStatDoesntExist; KPILOT_DELETE(docdb); switch (eSyncDirection) { case eSyncPDAToPC: - if (sinfo.fPalmStatus==eStatDoesntExist) + if (sinfo.fPalmtqStatus==eStatDoesntExist) sinfo.direction=eSyncDelete; else sinfo.direction=eSyncPDAToPC; break; case eSyncPCToPDA: - if (sinfo.fPCStatus==eStatDoesntExist) + if (sinfo.fPCtqStatus==eStatDoesntExist) sinfo.direction=eSyncDelete; else sinfo.direction=eSyncPCToPDA; break; case eSyncNone: // means actually both directions! - if (sinfo.fPCStatus==eStatNew) { - if (sinfo.fPalmStatus==eStatNew) sinfo.direction=eSyncConflict; + if (sinfo.fPCtqStatus==eStatNew) { + if (sinfo.fPalmtqStatus==eStatNew) sinfo.direction=eSyncConflict; else sinfo.direction=eSyncPCToPDA; } else { - if (sinfo.fPalmStatus==eStatNew) sinfo.direction=eSyncPDAToPC; + if (sinfo.fPalmtqStatus==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.fPCStatus=eStatDeleted; + if (!TQFile::exists(sinfo.txtfilename)) sinfo.fPCtqStatus=eStatDeleted; else if(pcTextChanged(sinfo.txtfilename)) { - sinfo.fPCStatus=eStatChanged; + sinfo.fPCtqStatus=eStatChanged; #ifdef DEBUG DEBUGKPILOT<<"PC side has changed!"<isOpen()) sinfo.fPalmStatus=eStatDeleted; + if (!docdb || !docdb->isOpen()) sinfo.fPalmtqStatus=eStatDeleted; else if (hhTextChanged(docdb)) { #ifdef DEBUG DEBUGKPILOT<<"Handheld side has changed!"<