summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeloptes <deloptes@gmail.com>2016-11-03 00:36:32 -0700
committerPatrick Ohly <patrick.ohly@intel.com>2016-11-03 00:36:32 -0700
commit7f3ec05c05b752aa58ff893aae1754a43af16f49 (patch)
treeb620a5880064081eca931e0f5d0a6b7b88a731ff
parent46a81a3cb8cd93551acfc3068d68d5cb5945528f (diff)
TDE: various fixes
Prevents the wallet backend from crashing SyncEvolution when enabled. Functionality not really tested, though. PIM backend had compile problems when enabled.
-rw-r--r--src/backends/tde/TDEPlatform.cpp32
-rw-r--r--src/backends/tdepim/TDEPIMNotesSource.h2
2 files changed, 16 insertions, 18 deletions
diff --git a/src/backends/tde/TDEPlatform.cpp b/src/backends/tde/TDEPlatform.cpp
index d262f57e..bf459b13 100644
--- a/src/backends/tde/TDEPlatform.cpp
+++ b/src/backends/tde/TDEPlatform.cpp
@@ -37,12 +37,13 @@
#include <syncevo/UserInterface.h>
#include <syncevo/SyncConfig.h>
+
+#include <tdewallet.h>
+#include <dcopclient.h>
#include <tdeapplication.h>
#include <tdeaboutdata.h>
#include <tdecmdlineargs.h>
-#include <tdewallet.h>
-
#include <syncevo/declarations.h>
SE_BEGIN_CXX
@@ -51,22 +52,18 @@ SE_BEGIN_CXX
void TDEInitMainSlot(const char *appname)
{
-
- int argc = 1;
- static char *argv[] = { const_cast<char *>(appname), NULL };
- TDEAboutData aboutData( "syncevotdewlt", // internal program name
- "SyncEvolution-TDEPIM-plugin", // displayable program name.
- "0.1", // version string
- "SyncEvolution TDEPIM plugin", // short porgram description
- TDEAboutData::License_GPL, // license type
- "(c) 2016, emanoil.kotsev@fincom.at" // copyright statement
- );
+ //connect to dcop
+ DCOPClient *kn_dcop = TDEApplication::kApplication()->dcopClient();
+ if (!kn_dcop)
+ Exception::throwError(SE_HERE, "internal init error, unable to make new dcop instance for tdenotes");
- TDECmdLineArgs::init(argc, argv, &aboutData);
-
- TDEApplication syncevotdewallet( "syncevolution-tdewallet" );
- syncevotdewlt.dcopClient()->registerAs(syncevotdewallet.name());
+ TQString appId = kn_dcop->registerAs("syncevolution-tdewallet");
+
+/* SyncSourceLogging::init(InitList<std::string>("SUMMARY") + "LOCATION",
+ " ",
+ m_operations);
+*/
}
@@ -125,7 +122,8 @@ bool TDEWalletLoadPasswordSlot(const InitStateTri &keyring,
TQString(key.authtype.c_str())+','+
TQString::number(key.port);
- TQString wallet_name = TDEWallet::Wallet::NetworkWallet();
+// TQString wallet_name = TDEWallet::Wallet::NetworkWallet();
+ TQString wallet_name = TDEWallet::Wallet::LocalWallet();
const TQString folder("Syncevolution");
diff --git a/src/backends/tdepim/TDEPIMNotesSource.h b/src/backends/tdepim/TDEPIMNotesSource.h
index 3276924f..632a89da 100644
--- a/src/backends/tdepim/TDEPIMNotesSource.h
+++ b/src/backends/tdepim/TDEPIMNotesSource.h
@@ -27,13 +27,13 @@
#include "config.h"
#include <syncevo/declarations.h>
-SE_BEGIN_CXX
#ifdef ENABLE_TDEPIMNOTES
#include "KNotesIface_stub.h"
#include <syncevo/TrackingSyncSource.h>
+SE_BEGIN_CXX
/**
* Implements access to TDE memo lists (stored as knotes items),
* exporting/importing the memos in plain UTF-8 text.