From 302a47b9d6cc68debf3d1feb3da982c08944971f Mon Sep 17 00:00:00 2001
From: Ian Campbell <ijc@hellion.org.uk>
Date: Sun, 9 Dec 2018 17:04:13 +0000
Subject: [PATCH] Drop variant of MythCoreContext::GenMythURL which takes port
 as a QString

There were two places making use of this, but in both cases they were just
assigning an integer port to a QString, causing it to be automatically
converted to a string. Correcting the types of those variables avoids this.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
 mythtv/libs/libmythbase/mythcorecontext.cpp | 5 -----
 mythtv/libs/libmythbase/mythcorecontext.h   | 3 ---
 mythtv/libs/libmythmetadata/imagemanager.h  | 3 ++-
 mythtv/programs/mythbackend/mainserver.cpp  | 2 +-
 4 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp
index a01d434415..2791b8d403 100644
--- a/mythtv/libs/libmythbase/mythcorecontext.cpp
+++ b/mythtv/libs/libmythbase/mythcorecontext.cpp
@@ -747,11 +747,6 @@ bool MythCoreContext::IsFrontendOnly(void)
     return !backendOnLocalhost;
 }
 
-QString MythCoreContext::GenMythURL(QString host, QString port, QString path, QString storageGroup)
-{
-    return GenMythURL(host,port.toInt(),path,storageGroup);
-}
-
 QString MythCoreContext::GenMythURL(QString host, int port, QString path, QString storageGroup)
 {
     QUrl ret;
diff --git a/mythtv/libs/libmythbase/mythcorecontext.h b/mythtv/libs/libmythbase/mythcorecontext.h
index b93a889d55..2bd6b845b8 100644
--- a/mythtv/libs/libmythbase/mythcorecontext.h
+++ b/mythtv/libs/libmythbase/mythcorecontext.h
@@ -83,9 +83,6 @@ class MBASE_PUBLIC MythCoreContext : public QObject, public MythObservable, publ
                            uint timeout_ms = kMythSocketLongTimeout,
                            bool error_dialog_desired = false);
 
-    QString GenMythURL(QString host = QString(), QString port = QString(),
-                       QString path = QString(), QString storageGroup = QString());
-
     QString GenMythURL(QString host = QString(), int port = 0,
                        QString path = QString(), QString storageGroup = QString());
 
diff --git a/mythtv/libs/libmythmetadata/imagemanager.h b/mythtv/libs/libmythmetadata/imagemanager.h
index 0bd2b76f53..717119d32a 100644
--- a/mythtv/libs/libmythmetadata/imagemanager.h
+++ b/mythtv/libs/libmythmetadata/imagemanager.h
@@ -255,7 +255,8 @@ protected:
 
 private:
     //! Host of SG
-    QString m_hostname, m_hostport;
+    QString m_hostname;
+    int m_hostport;
     //! Images storage group.
     // Marked mutable as storagegroup.h does not enforce const-correctness
     mutable StorageGroup m_sg;
diff --git a/mythtv/programs/mythbackend/mainserver.cpp b/mythtv/programs/mythbackend/mainserver.cpp
index b631d966ff..869e38ab7a 100644
--- a/mythtv/programs/mythbackend/mainserver.cpp
+++ b/mythtv/programs/mythbackend/mainserver.cpp
@@ -2150,7 +2150,7 @@ void MainServer::HandleQueryRecordings(QString type, PlaybackSock *pbs)
         delete *mit;
 
     QStringList outputlist(QString::number(destination.size()));
-    QMap<QString, QString> backendPortMap;
+    QMap<QString, int> backendPortMap;
     QString ip   = gCoreContext->GetBackendServerIP();
     int port = gCoreContext->GetBackendServerPort();
     QString host = gCoreContext->GetHostName();
-- 
2.19.2

