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 --- .../abbrowserconduit/KPilotCustomFieldEditor.ui | 34 ++++++------ conduits/abbrowserconduit/Makefile.am | 2 +- conduits/abbrowserconduit/abbrowser-conduit.cc | 24 ++++----- conduits/abbrowserconduit/abbrowser-conduit.h | 1 + conduits/abbrowserconduit/abbrowser-setup.cc | 2 +- conduits/abbrowserconduit/kabcRecord.cc | 4 +- conduits/abbrowserconduit/kaddressbookConduit.ui | 60 +++++++++++----------- conduits/abbrowserconduit/resolutionDialog.cc | 28 +++++----- conduits/abbrowserconduit/resolutionDialog.h | 3 +- conduits/abbrowserconduit/resolutionDialog_base.ui | 18 +++---- 10 files changed, 89 insertions(+), 87 deletions(-) (limited to 'conduits/abbrowserconduit') diff --git a/conduits/abbrowserconduit/KPilotCustomFieldEditor.ui b/conduits/abbrowserconduit/KPilotCustomFieldEditor.ui index 54782b8..63f6897 100644 --- a/conduits/abbrowserconduit/KPilotCustomFieldEditor.ui +++ b/conduits/abbrowserconduit/KPilotCustomFieldEditor.ui @@ -2,7 +2,7 @@ KPilotCustomFields This form lets you edit the custom fields synced from PalmOS handhelds by the addressbook conduit of KPilot. Reinhold Kainhofer <reinhold@kainhofer.com> - + KPILOT @@ -24,7 +24,7 @@ 0 - + mCustomFieldsGroups @@ -38,7 +38,7 @@ unnamed - + mCustom3Label @@ -52,7 +52,7 @@ <qt>Edit or enter the value of the third custom field here. Using KPilot, you can synchronize these values with the handheld's Address application custom fields.</qt> - + mCustom4Label @@ -66,7 +66,7 @@ <qt>Edit or enter the value of the fourth custom field here. Using KPilot, you can synchronize these values with the handheld's Address application custom fields.</qt> - + X_CUSTOM2 @@ -74,7 +74,7 @@ <qt>Edit or enter the value of the third custom field here. Using KPilot, you can synchronize these values with the handheld's Address application custom fields.</qt> - + X_CUSTOM1 @@ -82,7 +82,7 @@ <qt>Edit or enter the value of the second custom field here. Using KPilot, you can synchronize these values with the handheld's Address application custom fields.</qt> - + X_CUSTOM3 @@ -90,7 +90,7 @@ <qt>Edit or enter the value of the fourth custom field here. Using KPilot, you can synchronize these values with the handheld's Address application custom fields.</qt> - + mCustom2Label @@ -104,7 +104,7 @@ <qt>Edit or enter the value of the second custom field here. Using KPilot, you can synchronize these values with the handheld's Address application custom fields.</qt> - + mCustom1Label @@ -118,7 +118,7 @@ <qt>Edit or enter the value of the first custom field here. Using KPilot, you can synchronize these values with the handheld's Address application custom fields.</qt> - + X_CUSTOM0 @@ -134,7 +134,7 @@ <qt>Edit or enter the value of the first custom field here. Using KPilot, you can synchronize these values with the handheld's Address application custom fields.</qt> - + mCustomFieldsExplanation @@ -147,7 +147,7 @@ - + mMetaSyncGroup @@ -161,7 +161,7 @@ unnamed - + mRecordIDLabel @@ -172,7 +172,7 @@ X_RecordID - + mSyncFlagLabel @@ -217,7 +217,7 @@ - + mMetaSyncSettingsWarning @@ -229,7 +229,7 @@ Do NOT change these values: doing so will almost certainly result in data loss w WordBreak|AlignVCenter - + X_RecordID @@ -240,7 +240,7 @@ Do NOT change these values: doing so will almost certainly result in data loss w 2147483647 - + X_Flag diff --git a/conduits/abbrowserconduit/Makefile.am b/conduits/abbrowserconduit/Makefile.am index 6985522..40c739a 100644 --- a/conduits/abbrowserconduit/Makefile.am +++ b/conduits/abbrowserconduit/Makefile.am @@ -11,7 +11,7 @@ conduit_address_la_SOURCES = \ abbrowser-setup.cc \ kabcRecord.cc \ abbrowser-conduit.cc -conduit_address_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lkdecore -lkio -lkdeui +conduit_address_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(PISOCK_LIB) $(LIB_QT) -lkdecore -lkio -lkdeui conduit_address_la_LIBADD = ../../lib/libkpilot.la -lkabc -lkabc_file servicedir = $(kde_servicesdir) diff --git a/conduits/abbrowserconduit/abbrowser-conduit.cc b/conduits/abbrowserconduit/abbrowser-conduit.cc index e4f674a..7de5582 100644 --- a/conduits/abbrowserconduit/abbrowser-conduit.cc +++ b/conduits/abbrowserconduit/abbrowser-conduit.cc @@ -291,7 +291,7 @@ bool AbbrowserConduit::_loadAddressBook() emit logError(i18n("You chose to sync with the file \"%1\", which " "cannot be opened. Please make sure to supply a " "valid file name in the conduit's configuration dialog. " - "Aborting the conduit.").arg(AbbrowserSettings::fileName())); + "Aborting the conduit.").tqarg(AbbrowserSettings::fileName())); KIO::NetAccess::removeTempFile(fABookFile); stopTickle(); return false; @@ -395,7 +395,7 @@ bool AbbrowserConduit::_saveAddressBook() if(!KIO::NetAccess::upload(fABookFile, AbbrowserSettings::fileName(), 0L)) { emit logError(i18n("An error occurred while uploading \"%1\". You can try to upload " "the temporary local file \"%2\" manually") - .arg(AbbrowserSettings::fileName()).arg(fABookFile)); + .tqarg(AbbrowserSettings::fileName()).tqarg(fABookFile)); } else { KIO::NetAccess::removeTempFile(fABookFile); @@ -476,7 +476,7 @@ void AbbrowserConduit::showPilotAddress(const PilotAddress *pilotAddress) } DEBUGKPILOT << fname << "\n" << pilotAddress->getTextRepresentation( - fAddressAppInfo,Qt::PlainText) << endl; + fAddressAppInfo,TQt::PlainText) << endl; } @@ -762,7 +762,7 @@ void AbbrowserConduit::slotDeletedRecord() recordid_t id = backupRec->id(); TQString uid = addresseeMap[id]; - Addressee e = aBook->tqfindByUid(uid); + Addressee e = aBook->findByUid(uid); DEBUGKPILOT << fname << ": now looking at palm id: [" << id << "], kabc uid: [" << uid << "]." << endl; @@ -779,7 +779,7 @@ void AbbrowserConduit::slotDeletedRecord() DEBUGKPILOT << fname << ": no Addressee found for this id." << endl; DEBUGKPILOT << fname << "\n" << backupAddr->getTextRepresentation( - fAddressAppInfo,Qt::PlainText) << endl; + fAddressAppInfo,TQt::PlainText) << endl; if (palmRec) { DEBUGKPILOT << fname << ": deleting from database on palm." << endl; @@ -1493,7 +1493,7 @@ TQString AbbrowserConduit::_smartMergeString(const TQString &pc, const TQString // If this is a first sync, we don't have a backup record, so if(isFirstSync() || backup.isEmpty()) { - if (pc.isEmpty() && palm.isEmpty() ) return TQString::null; + if (pc.isEmpty() && palm.isEmpty() ) return TQString(); if(pc.isEmpty()) return palm; if(palm.isEmpty()) return pc; } else { @@ -1512,7 +1512,7 @@ TQString AbbrowserConduit::_smartMergeString(const TQString &pc, const TQString case SyncAction::ePreviousSyncOverrides: return backup; break; default: break; } - return TQString::null; + return TQString(); } @@ -1535,9 +1535,9 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse #define appendGen(desc, abfield, palmfield) \ tab->append(new ResolutionItem(desc, tab->fExistItems, \ - (!pcAddr.isEmpty())?(abfield):(TQString::null), \ - (palmAddr)?(palmAddr->palmfield):(TQString::null), \ - (backupAddr)?(backupAddr->palmfield):(TQString::null) )) + (!pcAddr.isEmpty())?(abfield):(TQString()), \ + (palmAddr)?(palmAddr->palmfield):(TQString()), \ + (backupAddr)?(backupAddr->palmfield):(TQString()) )) #define appendAddr(desc, abfield, palmfield) \ appendGen(desc, abfield, getField(palmfield)) #define appendGenPhone(desc, abfield, palmfield) \ @@ -1588,7 +1588,7 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse tab->fExistItems, !pcAddr.isEmpty() ? KABCSync::bestMatchedCategoryName(pcAddr.categories(), *fAddressAppInfo, category) : - TQString::null, + TQString(), palmAddrCategoryLabel, backupAddrCategoryLabel)); #undef appendGen @@ -1843,7 +1843,7 @@ Addressee AbbrowserConduit::_findMatch(const PilotAddress & pilotAddress) const DEBUGKPILOT << fname << ": PilotRecord has id " << pilotAddress.id() << ", mapped to " << id << endl; if(!id.isEmpty()) { - Addressee res(aBook->tqfindByUid(id)); + Addressee res(aBook->findByUid(id)); if(!res.isEmpty()) return res; DEBUGKPILOT << fname << ": PilotRecord has id " << pilotAddress.id() << ", but could not be found in the addressbook" << endl; } diff --git a/conduits/abbrowserconduit/abbrowser-conduit.h b/conduits/abbrowserconduit/abbrowser-conduit.h index 22e9446..464378f 100644 --- a/conduits/abbrowserconduit/abbrowser-conduit.h +++ b/conduits/abbrowserconduit/abbrowser-conduit.h @@ -54,6 +54,7 @@ typedef TQValueList RecordIDList; class AbbrowserConduit : public ConduitAction { Q_OBJECT + TQ_OBJECT public: AbbrowserConduit(KPilotLink *o,const char *n = 0L, const TQStringList &a = TQStringList() ); diff --git a/conduits/abbrowserconduit/abbrowser-setup.cc b/conduits/abbrowserconduit/abbrowser-setup.cc index f4d80d2..b275d3b 100644 --- a/conduits/abbrowserconduit/abbrowser-setup.cc +++ b/conduits/abbrowserconduit/abbrowser-setup.cc @@ -132,7 +132,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup() #endif int fmtindex=fConfigWidget->fCustomDate->currentItem(); AbbrowserSettings::setCustomDateFormat( - (fmtindex==0)?(TQString::null):fConfigWidget->fCustomDate->currentText() ); + (fmtindex==0)?(TQString()):fConfigWidget->fCustomDate->currentText() ); AbbrowserSettings::self()->writeConfig(); unmodified(); diff --git a/conduits/abbrowserconduit/kabcRecord.cc b/conduits/abbrowserconduit/kabcRecord.cc index b713b84..b503031 100644 --- a/conduits/abbrowserconduit/kabcRecord.cc +++ b/conduits/abbrowserconduit/kabcRecord.cc @@ -362,7 +362,7 @@ void KABCSync::setFieldFromHHCustom( bdate = KGlobal::locale()->readDate(value, format, &ok); } DEBUGKPILOT << "Birthdate from " << index << "-th custom field: " - << bdate.toString() << endl; + << TQString(bdate.toString()) << endl; DEBUGKPILOT << "Is Valid: " << bdate.isValid() << endl; if (bdate.isValid()) { @@ -437,7 +437,7 @@ TQString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, cons case eTTYTTDPhone: return abEntry.phoneNumber(KABC::PhoneNumber::Pcs).number(); default: - return TQString::null; + return TQString(); } } diff --git a/conduits/abbrowserconduit/kaddressbookConduit.ui b/conduits/abbrowserconduit/kaddressbookConduit.ui index 169311f..81e5202 100644 --- a/conduits/abbrowserconduit/kaddressbookConduit.ui +++ b/conduits/abbrowserconduit/kaddressbookConduit.ui @@ -1,7 +1,7 @@ AbbrowserWidget Adriaan de Groot and David Bishop - + Form2 @@ -23,14 +23,14 @@ 6 - + tabWidget true - + tab @@ -58,7 +58,7 @@ - + fSyncDestination @@ -69,7 +69,7 @@ unnamed - + fSyncStdAbook @@ -80,7 +80,7 @@ <qt>Select this option to synchronize with KDE's standard addressbook (i.e. the addressbook that you edit in KAddressBook, and which you use in KMail)</qt> - + fSyncFile @@ -115,7 +115,7 @@ - + fArchive @@ -128,7 +128,7 @@ - + tab @@ -139,7 +139,7 @@ unnamed - + groupBox4 @@ -150,7 +150,7 @@ unnamed - + textLabel1_2_2 @@ -172,7 +172,7 @@ <qt>Select in this list how conflicting entries (entries which were edited both on your handheld and on the PC) are resolved. Possibly values are "Use KPilot's Global Setting" to use the settings defined in KPilot HotSync configuration, "Ask User" to let you decide case by case, "Do Nothing" to allow the entries to be different, "PC overrides", "Handheld overrides", "Use values from last sync" and "Use both entries" to create a new entry on both the PC and handheld.</qt> - + Use KPilot's Global Setting @@ -218,7 +218,7 @@ <qt>Select in this list how conflicting entries (entries which were edited both on your handheld and on the PC) are resolved. Possibly values are "Use KPilot's Global Setting" to use the settings defined in KPilot HotSync configuration, "Ask User" to let you decide case by case, "Do Nothing" to allow the entries to be different, "PC overrides", "Handheld overrides", "Use values from last sync" and "Use both entries" to create a new entry on both the PC and handheld.</qt> - + textLabel1_7 @@ -250,7 +250,7 @@ - + tab @@ -267,7 +267,7 @@ 6 - + TextLabel2 @@ -278,7 +278,7 @@ <qt>Select which KAddressBook field should be used to store the Pilot's &quot;Other&quot; phone here.</qt> - + Other Phone @@ -334,7 +334,7 @@ <qt>Select which KAddressBook field should be used to store the Pilot's &quot;Other&quot; phone here.</qt> - + TextLabel4 @@ -345,7 +345,7 @@ <qt>Select which KAddressBook field should be used to store the Pilot's Street Address here.</qt> - + Preferred, then Home Address @@ -363,7 +363,7 @@ <qt>Select which KAddressBook field should be used to store the Pilot's Street Address here.</qt> - + TextLabel5 @@ -374,7 +374,7 @@ <qt>Select which KAddressBook field should be used to store the Fax number from the Pilot here.</qt> - + Home Fax @@ -411,7 +411,7 @@ - + tab @@ -422,7 +422,7 @@ unnamed - + textLabel1 @@ -441,7 +441,7 @@ <qt>Select the field from this list that represents best the meaning given by your use of the first custom field on your handheld.</qt> - + textLabel1_2 @@ -452,7 +452,7 @@ <qt>Select the field from this list that represents best the meaning given by your use of the second custom field on your handheld.</qt> - + textLabel1_3 @@ -463,7 +463,7 @@ <qt>Select the field from this list that represents best the meaning given by your use of the third custom field on your handheld.</qt> - + textLabel1_4 @@ -474,7 +474,7 @@ <qt>Select the field from this list that represents best the meaning given by your use of the fourth custom field on your handheld.</qt> - + Store as Custom Field @@ -510,7 +510,7 @@ <qt>Select the field from this list that represents best the meaning given by your use of the first custom field on your handheld.</qt> - + Store as Custom Field @@ -546,7 +546,7 @@ <qt>Select the field from this list that represents best the meaning given by your use of the second custom field on your handheld.</qt> - + Store as Custom Field @@ -582,7 +582,7 @@ <qt>Select the field from this list that represents best the meaning given by your use of the third custom field on your handheld.</qt> - + Store as Custom Field @@ -632,7 +632,7 @@ Horizontal - + textLabel1_5 @@ -646,7 +646,7 @@ <qt>Select the birthdate format here, if you selected "birthdate" for any of the custom fields above. Possible placeholders are:<br> %d for the day, %m for the month, %y for the two-digit year, %Y for the four-digit year. For example, %d.%m.%Y would generate a date like 27.3.1952, while %m/%d/%y would write the same date as 03/27/52. </qt> - + Locale Settings diff --git a/conduits/abbrowserconduit/resolutionDialog.cc b/conduits/abbrowserconduit/resolutionDialog.cc index d9b7089..0064a68 100644 --- a/conduits/abbrowserconduit/resolutionDialog.cc +++ b/conduits/abbrowserconduit/resolutionDialog.cc @@ -43,15 +43,15 @@ * as well as its child radio buttons. There are two different constructors * for them. * Each controller has three child radio buttons, and if any of them is - * activated (stateChange), it sets the text of its parent (which is the + * activated (stateChange), it sets the text of its tqparent (which is the * controller, which is an instance of ResolutionCheckListItem, too). **/ class ResolutionCheckListItem : TQCheckListItem { public: ResolutionCheckListItem(ResolutionItem*it, ResolutionTable*tb, - TQListView*parent); + TQListView*tqparent); ResolutionCheckListItem(TQString header, TQString text, - ResolutionCheckListItem*parent); + ResolutionCheckListItem*tqparent); ~ResolutionCheckListItem() {}; virtual void stateChange(bool newstate); virtual void setValue(TQString text); @@ -73,12 +73,12 @@ protected: ResolutionCheckListItem::ResolutionCheckListItem(ResolutionItem*it, - ResolutionTable*tb, TQListView*parent) : - TQCheckListItem(parent, TQString::null, TQCheckListItem::Controller), + ResolutionTable*tb, TQListView*tqparent) : + TQCheckListItem(tqparent, TQString(), TQCheckListItem::Controller), fResItem(it), isController(true), - fCaption(it?(it->fName):(TQString::null)), - fText(it?(it->fResolved):(TQString::null)) + fCaption(it?(it->fName):(TQString())), + fText(it?(it->fResolved):(TQString())) { FUNCTIONSETUP; if (it && tb) @@ -119,8 +119,8 @@ ResolutionCheckListItem::ResolutionCheckListItem(ResolutionItem*it, } ResolutionCheckListItem::ResolutionCheckListItem(TQString text, TQString header, - ResolutionCheckListItem*parent) : - TQCheckListItem(parent, TQString(), TQCheckListItem::RadioButton), + ResolutionCheckListItem*tqparent) : + TQCheckListItem(tqparent, TQString(), TQCheckListItem::RadioButton), fResItem(0L), isController(false), fCaption(header), @@ -133,7 +133,7 @@ void ResolutionCheckListItem::stateChange(bool newstate) { if (newstate && !isController) { - ResolutionCheckListItem*par=static_cast(parent()); + ResolutionCheckListItem*par=static_cast(tqparent()); { par->setValue(fText); } @@ -159,7 +159,7 @@ void ResolutionCheckListItem::setCaption(TQString caption) void ResolutionCheckListItem::updateText() { - TQString newText(i18n("Entries in the resolution dialog. First the name of the field, then the entry from the Handheld or PC after the colon", "%1: %2").arg(fCaption).arg(fText)); + TQString newText(i18n("Entries in the resolution dialog. First the name of the field, then the entry from the Handheld or PC after the colon", "%1: %2").tqarg(fCaption).tqarg(fText)); newText.tqreplace(TQRegExp(CSL1("\n")), i18n("Denoting newlines in Address entries. No need to translate", " | ")); setText(0, newText); @@ -171,9 +171,9 @@ void ResolutionCheckListItem::updateText() * *****************************************************************/ -ResolutionDlg::ResolutionDlg( TQWidget* parent, KPilotLink*fH, +ResolutionDlg::ResolutionDlg( TQWidget* tqparent, KPilotLink*fH, const TQString &caption, const TQString &helpText, ResolutionTable*tab) : - KDialogBase( parent, "ResolutionDlg", false, caption, Apply|Cancel, Apply), + KDialogBase( tqparent, "ResolutionDlg", false, caption, Apply|Cancel, Apply), tickleTimer(0L), fHandle(fH), fTable(tab) @@ -319,5 +319,5 @@ void ResolutionDlg::_tickle() */ ResolutionDlg::~ResolutionDlg() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } diff --git a/conduits/abbrowserconduit/resolutionDialog.h b/conduits/abbrowserconduit/resolutionDialog.h index 2c7a8b0..68a1d58 100644 --- a/conduits/abbrowserconduit/resolutionDialog.h +++ b/conduits/abbrowserconduit/resolutionDialog.h @@ -40,9 +40,10 @@ class ResolutionTable; class ResolutionDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ResolutionDlg( TQWidget* parent=0, + ResolutionDlg( TQWidget* tqparent=0, KPilotLink*fH=0L, const TQString &caption=TQString(), const TQString &helpText=TQString(), diff --git a/conduits/abbrowserconduit/resolutionDialog_base.ui b/conduits/abbrowserconduit/resolutionDialog_base.ui index c561599..5f5442f 100644 --- a/conduits/abbrowserconduit/resolutionDialog_base.ui +++ b/conduits/abbrowserconduit/resolutionDialog_base.ui @@ -1,6 +1,6 @@ ResolutionDialogBase - + widget2 @@ -19,7 +19,7 @@ unnamed - + fIntroText @@ -30,7 +30,7 @@ WordBreak|AlignVCenter - + Field @@ -55,7 +55,7 @@ <qt>Use this list to resolve, field by field, the conflicts created when a record was edited both on the handheld and on the PC. For each record, the different values from the last sync, the handheld and PC are displayed for each field, allowing you to choose the desired value.</qt> - + textLabel1 @@ -66,7 +66,7 @@ WordBreak|AlignVCenter - + frame3 @@ -77,7 +77,7 @@ unnamed - + fKeepBoth @@ -88,7 +88,7 @@ <qt>Click this button to use both values, resulting in the duplication of the record.</qt> - + fPCValues @@ -99,7 +99,7 @@ <qt>Click this button to use the PC values for synchronizing all conflicting fields in this record.</qt> - + fBackupValues @@ -110,7 +110,7 @@ <qt>Click this button to use the last sync values (old values) for synchronizing all conflicting fields in this record.</qt> - + fPalmValues -- cgit v1.2.1