Ticket #10610: 0001-Treat-iconpath-none-the-same-as-iconpath.isEmpty.patch

File 0001-Treat-iconpath-none-the-same-as-iconpath.isEmpty.patch, 1.4 KB (added by rhansen@…, 8 years ago)

untested patch

  • mythtv/libs/libmythtv/osd.cpp

    From 5d6ad7c167f3da3a1660f4d707e9ab24480b24a2 Mon Sep 17 00:00:00 2001
    From: Richard Hansen <rhansen@bbn.com>
    Date: Sun, 15 Apr 2012 22:58:08 -0400
    Subject: [PATCH] Treat iconpath == "none" the same as iconpath.isEmpty()
    The icon column in the channel table has a default value of "none".
    Other parts of the code treat "none" the same as the empty string;
    this change makes this code match.  Without this fix, the frontend
    goes into an infinite loop asking for a channel icon that doesn't
    Other changes that should probably be made:
     * convert "none" to the empty string in ChannelUtil::GetIcon()
     * do not enter an infinite loop if the channel icon fails to load
     * change the default value of the channel table's icon column to the
       empty string
     mythtv/libs/libmythtv/osd.cpp |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    diff --git a/mythtv/libs/libmythtv/osd.cpp b/mythtv/libs/libmythtv/osd.cpp
    index 207ecef..ad0b7fd 100644
    a b void OSD::SetText(const QString &window, QHash<QString,QString> &map, 
    425425            else
    426426                iconpath = ChannelUtil::GetIcon(chanid);
    428             if (!iconpath.isEmpty())
     428            if (!(iconpath.isEmpty() || iconpath == "none"))
    429429            {
    430430                QString iconurl =
    431431                                gCoreContext->GetMasterHostPrefix("ChannelIcon",