diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 00:37:32 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 00:37:32 +0000 |
commit | f6f9c296c3f9d39a8c3d0ee64a542a47f450be28 (patch) | |
tree | d38fce8091ce66977004a5cb115768c7810aee30 /conduits/knotes | |
parent | e340db64991a06761aa6395ffe760b53e4c1dfbc (diff) | |
download | kpilot-f6f9c296c3f9d39a8c3d0ee64a542a47f450be28.tar.gz kpilot-f6f9c296c3f9d39a8c3d0ee64a542a47f450be28.zip |
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
Diffstat (limited to 'conduits/knotes')
-rw-r--r-- | conduits/knotes/Makefile.am | 2 | ||||
-rw-r--r-- | conduits/knotes/knotes-action.cc | 40 | ||||
-rw-r--r-- | conduits/knotes/knotes-action.h | 3 | ||||
-rw-r--r-- | conduits/knotes/knotes-factory.cc | 2 | ||||
-rw-r--r-- | conduits/knotes/knotes-factory.h | 5 | ||||
-rw-r--r-- | conduits/knotes/knotes-setup.h | 2 | ||||
-rw-r--r-- | conduits/knotes/setup_base.ui | 10 |
7 files changed, 33 insertions, 31 deletions
diff --git a/conduits/knotes/Makefile.am b/conduits/knotes/Makefile.am index b13a2ff..3161798 100644 --- a/conduits/knotes/Makefile.am +++ b/conduits/knotes/Makefile.am @@ -15,7 +15,7 @@ conduit_knotes_la_SOURCES = \ knotes-action.cc \ setup_base.ui -conduit_knotes_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) +conduit_knotes_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(PISOCK_LIB) $(LIB_QT) -lkdecore -lkio -lkdeui -lkcal conduit_knotes_la_LIBADD = ../../lib/libkpilot.la $(LIB_KDEUI) kde_kcfg_DATA = knotesconduit.kcfg diff --git a/conduits/knotes/knotes-action.cc b/conduits/knotes/knotes-action.cc index 26b595e..e29dedc 100644 --- a/conduits/knotes/knotes-action.cc +++ b/conduits/knotes/knotes-action.cc @@ -79,7 +79,7 @@ public: int memo() const { return memoId; } ; KNoteID_t note() const { return noteId; } ; inline bool valid() const { return (memoId>0) && (!noteId.isEmpty()) ; } ; - TQString toString() const { return CSL1("<%1,%2>").arg(noteId).arg(memoId); } ; + TQString toString() const { return CSL1("<%1,%2>").tqarg(noteId).tqarg(memoId); } ; static NoteAndMemo findNote(const TQValueList<NoteAndMemo> &,KNoteID_pt note); static NoteAndMemo findMemo(const TQValueList<NoteAndMemo> &,int memo); @@ -234,7 +234,7 @@ KNotesAction::KNotesAction(KPilotLink *o, } fP->fTimer = new TQTimer(this); - fActionStatus = Init; + fActiontqStatus = Init; // this is not needed. As it is done in the initstate in process(); // resetIndexes(); @@ -269,7 +269,7 @@ bool KNotesAction::openKNotesResource() } else { - emit logError( i18n("Could not load the resource at: %1").arg(mURL.path()) ); + emit logError( i18n("Could not load the resource at: %1").tqarg(mURL.path()) ); return false; } } @@ -308,9 +308,9 @@ void KNotesAction::listNotes() { FUNCTIONSETUP; - DEBUGKPILOT << fname << ": Now in state " << fActionStatus << endl; + DEBUGKPILOT << fname << ": Now in state " << fActiontqStatus << endl; - switch(fActionStatus) + switch(fActiontqStatus) { case Init: resetIndexes(); @@ -321,16 +321,16 @@ void KNotesAction::listNotes() case SyncAction::SyncMode::eBackup: case SyncAction::SyncMode::eRestore: // Impossible! - fActionStatus = Done; + fActiontqStatus = Done; break; case SyncAction::SyncMode::eCopyHHToPC : listNotes(); // Debugging - fActionStatus = MemosToKNotes; + fActiontqStatus = MemosToKNotes; break; case SyncAction::SyncMode::eHotSync: case SyncAction::SyncMode::eFullSync: case SyncAction::SyncMode::eCopyPCToHH: - fActionStatus = ModifiedNotesToPilot; + fActiontqStatus = ModifiedNotesToPilot; break; } break; @@ -338,14 +338,14 @@ void KNotesAction::listNotes() if (modifyNoteOnPilot()) { resetIndexes(); - fActionStatus = DeleteNotesOnPilot; + fActiontqStatus = DeleteNotesOnPilot; } break; case DeleteNotesOnPilot: if (deleteNoteOnPilot()) { resetIndexes(); - fActionStatus = NewNotesToPilot; + fActiontqStatus = NewNotesToPilot; } break; case NewNotesToPilot : @@ -359,14 +359,14 @@ void KNotesAction::listNotes() case SyncAction::SyncMode::eRestore: case SyncAction::SyncMode::eCopyHHToPC : // Impossible! - fActionStatus = Done; + fActiontqStatus = Done; break; case SyncAction::SyncMode::eHotSync: case SyncAction::SyncMode::eFullSync: - fActionStatus = MemosToKNotes; + fActiontqStatus = MemosToKNotes; break; case SyncAction::SyncMode::eCopyPCToHH: - fActionStatus = Cleanup; + fActiontqStatus = Cleanup; break; } } @@ -374,7 +374,7 @@ void KNotesAction::listNotes() case MemosToKNotes : if (syncMemoToKNotes()) { - fActionStatus=Cleanup; + fActiontqStatus=Cleanup; } break; case Cleanup : @@ -791,7 +791,7 @@ void KNotesAction::cleanupMemos() KNotesConduitSettings::setMemoIds(memos); KNotesConduitSettings::self()->writeConfig(); - fActionStatus=Done; + fActiontqStatus=Done; fDatabase->cleanup(); fDatabase->resetSyncFlags(); fLocalDatabase->cleanup(); @@ -848,23 +848,23 @@ void KNotesAction::cleanupMemos() /* virtual */ TQString KNotesAction::statusString() const { - switch(fActionStatus) + switch(fActiontqStatus) { case Init : return CSL1("Init"); case NewNotesToPilot : return CSL1("NewNotesToPilot key=%1"); - // TODO DCOP_REMOVAL .arg(fP->fIndex.key()); + // TODO DCOP_REMOVAL .tqarg(fP->fIndex.key()); case ModifiedNotesToPilot : return CSL1("ModifiedNotesToPilot key=%1"); - //TODO DCOP_REMOVAL .arg(fP->fIndex.key()); + //TODO DCOP_REMOVAL .tqarg(fP->fIndex.key()); case MemosToKNotes : return CSL1("MemosToKNotes rec=%1") - .arg(fP->fRecordIndex); + .tqarg(fP->fRecordIndex); case Cleanup : return CSL1("Cleanup"); case Done : return CSL1("Done"); default : - return CSL1("Unknown (%1)").arg(fActionStatus); + return CSL1("Unknown (%1)").tqarg(fActiontqStatus); } } diff --git a/conduits/knotes/knotes-action.h b/conduits/knotes/knotes-action.h index eb490e0..223dfe2 100644 --- a/conduits/knotes/knotes-action.h +++ b/conduits/knotes/knotes-action.h @@ -37,6 +37,7 @@ class PilotMemo; class KNotesAction : public ConduitAction { Q_OBJECT + TQ_OBJECT public: KNotesAction( KPilotLink *o, @@ -44,7 +45,7 @@ public: const TQStringList &a = TQStringList() ); virtual ~KNotesAction(); - enum Status { Init, + enum tqStatus { Init, ModifiedNotesToPilot, DeleteNotesOnPilot, NewNotesToPilot, diff --git a/conduits/knotes/knotes-factory.cc b/conduits/knotes/knotes-factory.cc index 9601e81..0abc76a 100644 --- a/conduits/knotes/knotes-factory.cc +++ b/conduits/knotes/knotes-factory.cc @@ -123,7 +123,7 @@ KNotesConduitFactory::~KNotesConduitFactory() else { WARNINGKPILOT - << "Couldn't cast parent to KPilotDeviceLink" + << "Couldn't cast tqparent to KPilotDeviceLink" << endl; return 0L; } diff --git a/conduits/knotes/knotes-factory.h b/conduits/knotes/knotes-factory.h index 02b0f61..b8c8311 100644 --- a/conduits/knotes/knotes-factory.h +++ b/conduits/knotes/knotes-factory.h @@ -37,6 +37,7 @@ class KAboutData; class KNotesConduitFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: KNotesConduitFactory(TQObject * = 0L,const char * = 0L); @@ -50,9 +51,9 @@ public: // break its value. We store group and entry keys in here. protected: - virtual TQObject* createObject( TQObject* parent = 0, + virtual TQObject* createObject( TQObject* tqparent = 0, const char* name = 0, - const char* classname = "TQObject", + const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList() ); private: KInstance *fInstance; diff --git a/conduits/knotes/knotes-setup.h b/conduits/knotes/knotes-setup.h index 652f222..96f008c 100644 --- a/conduits/knotes/knotes-setup.h +++ b/conduits/knotes/knotes-setup.h @@ -36,7 +36,7 @@ class KNotesWidget; class KNotesConfigBase : public ConduitConfigBase { public: - KNotesConfigBase(TQWidget *parent, const char *name); + KNotesConfigBase(TQWidget *tqparent, const char *name); virtual void commit(); virtual void load(); diff --git a/conduits/knotes/setup_base.ui b/conduits/knotes/setup_base.ui index 6e0fe44..b2007b8 100644 --- a/conduits/knotes/setup_base.ui +++ b/conduits/knotes/setup_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KNotesWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KNotesWidget</cstring> </property> @@ -22,11 +22,11 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -37,7 +37,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>fDeleteNoteForMemo</cstring> </property> @@ -51,7 +51,7 @@ <string><qt>Check this box if you wish to delete notes from KNotes automatically when the corresponding Pilot memo is deleted. Use this option with care, as the notes you want to keep in the handheld and in the desktop are not necessarily the same.</qt></string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>fSuppressConfirm</cstring> </property> |