Changeset 1616
- Timestamp:
- 01/19/07 20:56:29 (23 months ago)
- Location:
- plugins/kdepim/src
- Files:
-
- 3 modified
-
kaddrbook.cpp (modified) (2 diffs)
-
kcal.cpp (modified) (2 diffs)
-
knotes.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/kdepim/src/kaddrbook.cpp
r1213 r1616 27 27 28 28 #include "kaddrbook.h" 29 #include <kapplication.h> 30 #include <dcopclient.h> 29 31 #include <qdeepcopy.h> 30 32 … … 59 61 osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx); 60 62 63 DCOPClient *dcopc = KApplication::kApplication()->dcopClient(); 64 if (!dcopc) { 65 osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to initialize dcop client"); 66 osync_trace(TRACE_EXIT_ERROR, "%s: Unable to initialize dcop client", __func__); 67 return false; 68 } 69 70 QString appId = dcopc->registerAs("opensync-kaddrbook"); 71 72 //check if kaddressbook is running, and return an error if it 73 //is running 74 if (dcopc->isApplicationRegistered("kaddressbook")) { 75 osync_context_report_error(ctx, OSYNC_ERROR_APP_RUNNING, "KAddressBook is running. Please finish it"); 76 osync_trace(TRACE_EXIT_ERROR, "%s: KAddressBook is running", __func__); 77 return false; 78 } 79 61 80 //get a handle to the standard KDE addressbook 62 81 addressbookptr = KABC::StdAddressBook::self(); -
plugins/kdepim/src/kcal.cpp
r1472 r1616 26 26 #include "kcal.h" 27 27 28 #include <kapplication.h> 29 #include <dcopclient.h> 30 28 31 KCalDataSource::KCalDataSource(OSyncMember *member, OSyncHashTable *hashtable) 29 32 : hashtable(hashtable), member(member) … … 34 37 bool KCalDataSource::connect(OSyncContext *ctx) 35 38 { 39 40 DCOPClient *dcopc = KApplication::kApplication()->dcopClient(); 41 if (!dcopc) { 42 osync_context_report_error(ctx, OSYNC_ERROR_INITIALIZATION, "Unable to initialize dcop client"); 43 osync_trace(TRACE_EXIT_ERROR, "%s: Unable to initialize dcop client", __func__); 44 return false; 45 } 46 47 QString appId = dcopc->registerAs("opensync-kcal"); 48 49 //check if korganizer running, and return an error if it 50 //is running 51 if (dcopc->isApplicationRegistered("korganizer")) { 52 osync_context_report_error(ctx, OSYNC_ERROR_APP_RUNNING, "KOrganizer is running. Please finish it"); 53 osync_trace(TRACE_EXIT_ERROR, "%s: KOrganizer is running", __func__); 54 return false; 55 } 56 36 57 calendar = new KCal::CalendarResources(QString::fromLatin1( "UTC" )); 37 58 if (!calendar) { -
plugins/kdepim/src/knotes.cpp
r1544 r1616 60 60 QString appId = kn_dcop->registerAs("opensync"); 61 61 62 //check if kontact is running, and return an error if it 63 //is running 64 if (kn_dcop->isApplicationRegistered("kontact")) { 65 osync_context_report_error(ctx, OSYNC_ERROR_APP_RUNNING, "Kontact is running. Please finish it"); 66 osync_trace(TRACE_EXIT_ERROR, "%s: Kontact is running", __func__); 67 return false; 68 } 69 62 70 //check knotes running 63 71 QCStringList apps = kn_dcop->registeredApplications();
