From 21f0092cfbac01f510b52bf50511412ea813f227 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Sat, 18 Jan 2020 18:35:40 +0100
Subject: [PATCH] Mark omniOrb::IIOPurl as deprecated.

---
 include/gepetto/gui/omniorb/url.hh | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/include/gepetto/gui/omniorb/url.hh b/include/gepetto/gui/omniorb/url.hh
index fed02d2..c67b539 100644
--- a/include/gepetto/gui/omniorb/url.hh
+++ b/include/gepetto/gui/omniorb/url.hh
@@ -18,20 +18,19 @@
 #define GEPETTO_GUI_OMNIORB_URL_HH
 
 #include <QString>
+#include <gepetto/viewer/corba/deprecated.hh>
+#warning "This file will be deleted in the future."
 
 namespace gepetto {
   namespace gui {
     namespace omniOrb {
-      static inline QString IIOPurl (const QString& host, const QString& port)
+      static inline QString IIOPurl (const QString& host = "localhost",
+          const QString& port = "2809") GEPETTO_VIEWER_CORBA_DEPRECATED;
+
+      static inline QString IIOPurl (const QString& host,
+          const QString& port)
       {
-        QString hp;
-        if (host.isEmpty ()) {
-          if (!port.isEmpty ()) hp = QString ("localhost:%1").arg (port);
-        } else {
-          if (port.isEmpty ()) hp = QString ("%1:2809").arg (host);
-          else hp = QString ("%1:%2").arg(host).arg(port);
-        }
-        return QString ("corbaloc:iiop:%1/NameService").arg (hp);
+        return QString ("corbaloc:iiop:%1:%2").arg(host).arg(port);
       }
     } // namespace omniOrb
   } // namespace gui
-- 
GitLab