Ticket #13362: 0001-Drop-variant-of-MythCoreContext-GenMythURL-which-tak.patch

File 0001-Drop-variant-of-MythCoreContext-GenMythURL-which-tak.patch, 3.3 KB (added by ijc, 5 years ago)
  • mythtv/libs/libmythbase/mythcorecontext.cpp

    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) 
    747747    return !backendOnLocalhost;
    748748}
    749749
    750 QString MythCoreContext::GenMythURL(QString host, QString port, QString path, QString storageGroup)
    751 {
    752     return GenMythURL(host,port.toInt(),path,storageGroup);
    753 }
    754 
    755750QString MythCoreContext::GenMythURL(QString host, int port, QString path, QString storageGroup)
    756751{
    757752    QUrl ret;
  • mythtv/libs/libmythbase/mythcorecontext.h

    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 
    8383                           uint timeout_ms = kMythSocketLongTimeout,
    8484                           bool error_dialog_desired = false);
    8585
    86     QString GenMythURL(QString host = QString(), QString port = QString(),
    87                        QString path = QString(), QString storageGroup = QString());
    88 
    8986    QString GenMythURL(QString host = QString(), int port = 0,
    9087                       QString path = QString(), QString storageGroup = QString());
    9188
  • mythtv/libs/libmythmetadata/imagemanager.h

    diff --git a/mythtv/libs/libmythmetadata/imagemanager.h b/mythtv/libs/libmythmetadata/imagemanager.h
    index 0bd2b76f53..717119d32a 100644
    a b protected: 
    255255
    256256private:
    257257    //! Host of SG
    258     QString m_hostname, m_hostport;
     258    QString m_hostname;
     259    int m_hostport;
    259260    //! Images storage group.
    260261    // Marked mutable as storagegroup.h does not enforce const-correctness
    261262    mutable StorageGroup m_sg;
  • mythtv/programs/mythbackend/mainserver.cpp

    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) 
    21502150        delete *mit;
    21512151
    21522152    QStringList outputlist(QString::number(destination.size()));
    2153     QMap<QString, QString> backendPortMap;
     2153    QMap<QString, int> backendPortMap;
    21542154    QString ip   = gCoreContext->GetBackendServerIP();
    21552155    int port = gCoreContext->GetBackendServerPort();
    21562156    QString host = gCoreContext->GetHostName();