Ubuntu Pastebin

Paste from bschaefer at Thu, 19 May 2016 14:58:52 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/input-context/minputcontext.cpp b/input-context/minputcontext.cpp
index 118e027..918fd98 100644
--- a/input-context/minputcontext.cpp
+++ b/input-context/minputcontext.cpp
@@ -73,9 +73,17 @@ MInputContext::MInputContext()
         debug = true;
     }

-    QSharedPointer<Maliit::InputContext::DBus::Address> address(new Maliit::InputContext::DBus::DynamicAddress);
-    imServer = new DBusServerConnection(address);
+    QSharedPointer<Maliit::InputContext::DBus::Address> address;

+    QByteArray maliitServerAddress = qgetenv("MALIIT_SERVER_ADDRESS");
+    if (!maliitServerAddress.isEmpty()) {
+        address.reset(new Maliit::InputContext::DBus::FixedAddress(maliitServerAddress.constData()));
+    } else {
+        address.reset(new Maliit::InputContext::DBus::DynamicAddress);
+    }
+
+    imServer = new DBusServerConnection(address);
+    
     sipHideTimer.setSingleShot(true);
     sipHideTimer.setInterval(SoftwareInputPanelHideTimer);
     connect(&sipHideTimer, SIGNAL(timeout()), SLOT(sendHideInputMethod()));
Download as text