summaryrefslogtreecommitdiffstats
path: root/dcop
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-23 15:17:26 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-23 15:18:27 -0600
commit9ea35022d237e93f456d8649725ce1c52c2b61e9 (patch)
tree39ffd0dd78a3e5c35cf4ce3bb17cd8116c4bf6b5 /dcop
parent41b8113879feb45e5570d5d549b62dc07915be54 (diff)
downloadtdelibs-9ea35022d237e93f456d8649725ce1c52c2b61e9.tar.gz
tdelibs-9ea35022d237e93f456d8649725ce1c52c2b61e9.zip
Fix compositing manager detection
Add advanced option to allow a DCOP call to bypass the local call-->send translation shortcut
Diffstat (limited to 'dcop')
-rw-r--r--dcop/dcopclient.cpp16
-rw-r--r--dcop/dcopclient.h13
2 files changed, 25 insertions, 4 deletions
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index 40cfd41c8..cfa912362 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -1737,7 +1737,7 @@ bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
TQCString& replyType, TQByteArray &replyData,
bool useEventLoop)
{
- return call( remApp, remObjId, remFun, data, replyType, replyData, useEventLoop, -1 );
+ return call( remApp, remObjId, remFun, data, replyType, replyData, useEventLoop, -1, false );
}
bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
@@ -1745,23 +1745,31 @@ bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
TQCString& replyType, TQByteArray &replyData,
bool useEventLoop, int timeout)
{
+ return call( remApp, remObjId, remFun, data, replyType, replyData, useEventLoop, timeout, false );
+}
+
+bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
+ bool useEventLoop, int timeout, bool forceRemote)
+{
if (remApp.isEmpty())
return false;
DCOPClient *localClient = findLocalClient( remApp );
- if ( localClient ) {
+ if ( localClient && !forceRemote ) {
bool saveTransaction = d->transaction;
TQ_INT32 saveTransactionId = d->transactionId;
TQCString saveSenderId = d->senderId;
d->senderId = 0; // Local call
bool b = localClient->receive( remApp, remObjId, remFun, data, replyType, replyData );
-
+
TQ_INT32 id = localClient->transactionId();
if (id) {
// Call delayed. We have to wait till it has been processed.
do {
- TQApplication::eventLoop()->processEvents( TQEventLoop::WaitForMore);
+ TQApplication::eventLoop()->processEvents(TQEventLoop::WaitForMore);
} while( !localClient->isLocalTransactionFinished(id, replyType, replyData));
b = true;
}
diff --git a/dcop/dcopclient.h b/dcop/dcopclient.h
index 8421c7b80..4cb4b2f6e 100644
--- a/dcop/dcopclient.h
+++ b/dcop/dcopclient.h
@@ -292,12 +292,25 @@ class DCOP_EXPORT DCOPClient : public TQObject
* @param useEventLoop if true the event loop will be started when
* the call blocks too long
* @param timeout timeout for the call in miliseconds, or -1 for no timeout
+ * @param forceRemote if set do not allow calls within the current application
+ * to bypass the remote call mechanism
* @return true if successful, false otherwise
*
* @since 3.2
*
* @see send()
*/
+
+ bool call(const TQCString &remApp, const TQCString &remObj,
+ const TQCString &remFun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData,
+ bool useEventLoop/*=false*/, int timeout/*=-1*/,
+ bool forceRemote/*=false*/);
+
+ /**
+ * @deprecated
+ */
+ // KDE4 merge with above
bool call(const TQCString &remApp, const TQCString &remObj,
const TQCString &remFun, const TQByteArray &data,
TQCString& replyType, TQByteArray &replyData,