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/memofileconduit/Makefile.am | 2 +- conduits/memofileconduit/memofile-conduit.cc | 8 +++---- conduits/memofileconduit/memofile-conduit.h | 5 ++-- conduits/memofileconduit/memofile-factory.cc | 2 +- conduits/memofileconduit/memofile.h | 2 +- conduits/memofileconduit/memofileconduit.xmi | 36 ++++++++++++++-------------- conduits/memofileconduit/memofiles.cc | 16 ++++++------- conduits/memofileconduit/memofiles.h | 4 ++-- conduits/memofileconduit/setup_base.ui | 12 +++++----- 9 files changed, 44 insertions(+), 43 deletions(-) (limited to 'conduits/memofileconduit') diff --git a/conduits/memofileconduit/Makefile.am b/conduits/memofileconduit/Makefile.am index 1f51105..020c569 100644 --- a/conduits/memofileconduit/Makefile.am +++ b/conduits/memofileconduit/Makefile.am @@ -10,7 +10,7 @@ kde_module_LTLIBRARIES = conduit_memofile.la conduit_memofile_la_SOURCES = memofileSettings.kcfgc setup_base.ui \ memofile-factory.cc memofile.cc memofiles.cc memofile-conduit.cc -conduit_memofile_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) +conduit_memofile_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(PISOCK_LIB) $(LIB_QT) -lkdecore -lkio -lkdeui conduit_memofile_la_LIBADD = ../../lib/libkpilot.la $(LIB_KDEUI) $(LIB_KFILE) kde_kcfg_DATA = memofileconduit.kcfg diff --git a/conduits/memofileconduit/memofile-conduit.cc b/conduits/memofileconduit/memofile-conduit.cc index 954af38..233f6af 100644 --- a/conduits/memofileconduit/memofile-conduit.cc +++ b/conduits/memofileconduit/memofile-conduit.cc @@ -31,7 +31,7 @@ // Only include what we really need: // First UNIX system stuff, then std C++, -// then Qt, then KDE, then local includes. +// then TQt, then KDE, then local includes. // // @@ -120,7 +120,7 @@ MemofileConduit::~MemofileConduit() fCtrPC->setStartCount(_memofiles->count()); setFirstSync( _memofiles->isFirstSync() ); - addSyncLogEntry(i18n(" Syncing with %1.").arg(_memo_directory)); + addSyncLogEntry(i18n(" Syncing with %1.").tqarg(_memo_directory)); if ( (syncMode() == SyncAction::SyncMode::eCopyHHToPC) || _memofiles->isFirstSync() ) { addSyncLogEntry(i18n(" Copying Pilot to PC...")); @@ -368,7 +368,7 @@ void MemofileConduit::getModifiedFromPilot() { FUNCTIONSETUP; - DEBUGKPILOT << fname << ": Now in state " << fActionStatus << endl; + DEBUGKPILOT << fname << ": Now in state " << fActiontqStatus << endl; } @@ -448,7 +448,7 @@ void MemofileConduit::deleteUnsyncedHHRecords() Pilot::RecordIDList::iterator it; for ( it = ids.begin(); it != ids.end(); ++it ) { - if (!_memofiles->find(*it)) + if (!_memofiles->tqfind(*it)) { DEBUGKPILOT << fname << "Deleting record with ID "<< *it <<" from handheld " diff --git a/conduits/memofileconduit/memofile-conduit.h b/conduits/memofileconduit/memofile-conduit.h index c795066..d2d07d1 100644 --- a/conduits/memofileconduit/memofile-conduit.h +++ b/conduits/memofileconduit/memofile-conduit.h @@ -37,6 +37,7 @@ class PilotMemo; class MemofileConduit : public ConduitAction { Q_OBJECT + TQ_OBJECT public: MemofileConduit(KPilotLink *, const char *name=0L, @@ -52,8 +53,8 @@ protected slots: private: // configuration settings... - QString _DEFAULT_MEMODIR; - QString _memo_directory; + TQString _DEFAULT_MEMODIR; + TQString _memo_directory; bool _sync_private; PilotMemoInfo *fMemoAppInfo; diff --git a/conduits/memofileconduit/memofile-factory.cc b/conduits/memofileconduit/memofile-factory.cc index 795edc3..8b2d9df 100644 --- a/conduits/memofileconduit/memofile-factory.cc +++ b/conduits/memofileconduit/memofile-factory.cc @@ -46,7 +46,7 @@ class MemofileConduitConfig : public ConduitConfigBase { public: - MemofileConduitConfig(TQWidget *parent=0L, const char *n=0L); + MemofileConduitConfig(TQWidget *tqparent=0L, const char *n=0L); virtual void commit(); virtual void load(); protected: diff --git a/conduits/memofileconduit/memofile.h b/conduits/memofileconduit/memofile.h index 4bd5fb7..1308e98 100644 --- a/conduits/memofileconduit/memofile.h +++ b/conduits/memofileconduit/memofile.h @@ -32,7 +32,7 @@ // Only include what we really need: // First UNIX system stuff, then std C++, -// then Qt, then KDE, then local includes. +// then TQt, then KDE, then local includes. // // diff --git a/conduits/memofileconduit/memofileconduit.xmi b/conduits/memofileconduit/memofileconduit.xmi index 33ff89f..9088d35 100644 --- a/conduits/memofileconduit/memofileconduit.xmi +++ b/conduits/memofileconduit/memofileconduit.xmi @@ -34,7 +34,7 @@ - + @@ -43,7 +43,7 @@ - + @@ -54,8 +54,8 @@ - - + + @@ -65,7 +65,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -92,39 +92,39 @@ - - - + + + - + - + - + - - + + - + - - + + - + diff --git a/conduits/memofileconduit/memofiles.cc b/conduits/memofileconduit/memofiles.cc index c51915b..c8ce67b 100644 --- a/conduits/memofileconduit/memofiles.cc +++ b/conduits/memofileconduit/memofiles.cc @@ -89,7 +89,7 @@ void Memofiles::load (bool loadAll) // DEBUGKPILOT << fname // << ": checking category: [" << categoryName // << "], file: [" << file << "]." << endl; - Memofile * memofile = find(categoryName, file); + Memofile * memofile = tqfind(categoryName, file); if (NULL == memofile) { memofile = new Memofile(category, categoryName, file, _baseDirectory); memofile->setModified(true); @@ -316,7 +316,7 @@ bool Memofiles::loadFromMetadata () return true; } -Memofile * Memofiles::find (recordid_t id) +Memofile * Memofiles::tqfind (recordid_t id) { Memofile * memofile; @@ -331,7 +331,7 @@ Memofile * Memofiles::find (recordid_t id) } -Memofile * Memofiles::find (const TQString & category, const TQString & filename) +Memofile * Memofiles::tqfind (const TQString & category, const TQString & filename) { Memofile * memofile; @@ -353,7 +353,7 @@ void Memofiles::deleteMemo(PilotMemo * memo) if (! memo->isDeleted()) return; - Memofile * memofile = find(memo->id()); + Memofile * memofile = tqfind(memo->id()); if (memofile) { memofile->deleteFile(); _memofiles.remove(memofile); @@ -375,7 +375,7 @@ void Memofiles::addModifiedMemo (PilotMemo * memo) + TQString::number(memo->id()) + CSL1("], title: [") + memo->getTitle() + CSL1("]. "); - Memofile * memofile = find(memo->id()); + Memofile * memofile = tqfind(memo->id()); if (NULL == memofile) { _cudCounter.created(); @@ -653,7 +653,7 @@ TQString Memofiles::filename(PilotMemo * memo) if (filename.isEmpty()) { TQString text = memo->text(); - int i = text.find(CSL1("\n")); + int i = text.tqfind(CSL1("\n")); if (i > 1) { filename = text.left(i); } @@ -666,7 +666,7 @@ TQString Memofiles::filename(PilotMemo * memo) TQString category = _categories[memo->category()]; - Memofile * memofile = find(category, filename); + Memofile * memofile = tqfind(category, filename); // if we couldn't find a memofile with this filename, or if the // memofile that is found is the same as the memo that we're looking @@ -683,7 +683,7 @@ TQString Memofiles::filename(PilotMemo * memo) // for trouble. while (NULL != memofile && uniq <=20) { newfilename = TQString(filename + CSL1(".") + TQString::number(uniq++) ); - memofile = find(category, newfilename); + memofile = tqfind(category, newfilename); } return newfilename; diff --git a/conduits/memofileconduit/memofiles.h b/conduits/memofileconduit/memofiles.h index 72b6ed4..290cf3a 100644 --- a/conduits/memofileconduit/memofiles.h +++ b/conduits/memofileconduit/memofiles.h @@ -55,8 +55,8 @@ public: TQPtrList getModified(); TQPtrList getAll() { return _memofiles; } ; - Memofile * find (const TQString & category, const TQString & filename); - Memofile * find (recordid_t id); + Memofile * tqfind (const TQString & category, const TQString & filename); + Memofile * tqfind (recordid_t id); MemoCategoryMap readCategoryMetadata(); void setCategories(MemoCategoryMap map) { _categories = map; } ; diff --git a/conduits/memofileconduit/setup_base.ui b/conduits/memofileconduit/setup_base.ui index 5053469..606bf5e 100644 --- a/conduits/memofileconduit/setup_base.ui +++ b/conduits/memofileconduit/setup_base.ui @@ -3,7 +3,7 @@ A tabWidget for configuring the Memofile-conduit settings. Jason 'vanRijn' Kasper - + Form1 @@ -46,7 +46,7 @@ the Memofile-conduit settings. 6 - + tabWidget @@ -60,7 +60,7 @@ the Memofile-conduit settings. - + Widget2 @@ -88,7 +88,7 @@ the Memofile-conduit settings. - + textLabel2 @@ -96,7 +96,7 @@ the Memofile-conduit settings. Sync private records: - + textLabel1 @@ -115,7 +115,7 @@ the Memofile-conduit settings. Select the directory you want to store your PDA's memos in - + fSyncPrivate -- cgit v1.2.1