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
|
b
|
bool MythCoreContext::IsFrontendOnly(void) |
747 | 747 | return !backendOnLocalhost; |
748 | 748 | } |
749 | 749 | |
750 | | QString MythCoreContext::GenMythURL(QString host, QString port, QString path, QString storageGroup) |
751 | | { |
752 | | return GenMythURL(host,port.toInt(),path,storageGroup); |
753 | | } |
754 | | |
755 | 750 | QString MythCoreContext::GenMythURL(QString host, int port, QString path, QString storageGroup) |
756 | 751 | { |
757 | 752 | QUrl ret; |
diff --git a/mythtv/libs/libmythbase/mythcorecontext.h b/mythtv/libs/libmythbase/mythcorecontext.h
index b93a889d55..2bd6b845b8 100644
a
|
b
|
class MBASE_PUBLIC MythCoreContext : public QObject, public MythObservable, publ |
83 | 83 | uint timeout_ms = kMythSocketLongTimeout, |
84 | 84 | bool error_dialog_desired = false); |
85 | 85 | |
86 | | QString GenMythURL(QString host = QString(), QString port = QString(), |
87 | | QString path = QString(), QString storageGroup = QString()); |
88 | | |
89 | 86 | QString GenMythURL(QString host = QString(), int port = 0, |
90 | 87 | QString path = QString(), QString storageGroup = QString()); |
91 | 88 | |
diff --git a/mythtv/libs/libmythmetadata/imagemanager.h b/mythtv/libs/libmythmetadata/imagemanager.h
index 0bd2b76f53..717119d32a 100644
a
|
b
|
protected: |
255 | 255 | |
256 | 256 | private: |
257 | 257 | //! Host of SG |
258 | | QString m_hostname, m_hostport; |
| 258 | QString m_hostname; |
| 259 | int m_hostport; |
259 | 260 | //! Images storage group. |
260 | 261 | // Marked mutable as storagegroup.h does not enforce const-correctness |
261 | 262 | mutable StorageGroup m_sg; |
diff --git a/mythtv/programs/mythbackend/mainserver.cpp b/mythtv/programs/mythbackend/mainserver.cpp
index b631d966ff..869e38ab7a 100644
a
|
b
|
void MainServer::HandleQueryRecordings(QString type, PlaybackSock *pbs) |
2150 | 2150 | delete *mit; |
2151 | 2151 | |
2152 | 2152 | QStringList outputlist(QString::number(destination.size())); |
2153 | | QMap<QString, QString> backendPortMap; |
| 2153 | QMap<QString, int> backendPortMap; |
2154 | 2154 | QString ip = gCoreContext->GetBackendServerIP(); |
2155 | 2155 | int port = gCoreContext->GetBackendServerPort(); |
2156 | 2156 | QString host = gCoreContext->GetHostName(); |